⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mgcclodmesh.inl

📁 《3D游戏引擎设计》的源码
💻 INL
字号:
// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000, All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement.  The various license agreements may be found at
// the Magic Software web site.  This file is subject to the license
//
// RESTRICTED USE SOURCE CODE
// http://www.magic-software.com/License/restricted.pdf

//----------------------------------------------------------------------------
inline void MgcCLodMesh::SetTargetRecord (int iTargetRecord)
{
    if ( iTargetRecord < -1 )
        m_iTargetRecord = -1;
    else if ( iTargetRecord >= int(m_uiVertexQuantity - 1) )
        m_iTargetRecord = m_uiVertexQuantity - 2;
    else
        m_iTargetRecord = iTargetRecord;
}
//----------------------------------------------------------------------------
inline int MgcCLodMesh::GetTargetRecord () const
{
    return m_iTargetRecord;
}
//----------------------------------------------------------------------------
inline int MgcCLodMesh::GetAutomatedTargetRecord ()
{
    return m_iTargetRecord;
}
//----------------------------------------------------------------------------
inline MgcCLodMesh::KeyType::KeyType (unsigned int uiI0, unsigned int uiI1)
{
    if ( uiI0 <= uiI1 )
    {
        m_uiI0 = uiI0;
        m_uiI1 = uiI1;
    }
    else
    {
        m_uiI0 = uiI1;
        m_uiI1 = uiI0;
    }
}
//----------------------------------------------------------------------------
inline MgcCLodMesh::KeyType& MgcCLodMesh::KeyType::operator= (
    const KeyType& rkKey)
{
    m_uiI0 = rkKey.m_uiI0;
    m_uiI1 = rkKey.m_uiI1;
    return *this;
}
//----------------------------------------------------------------------------
inline bool MgcCLodMesh::KeyType::operator== (const KeyType& rkKey) const
{
    return m_uiI0 == rkKey.m_uiI0 && m_uiI1 == rkKey.m_uiI1;
}
//----------------------------------------------------------------------------
inline bool MgcCLodMesh::KeyType::operator!= (const KeyType& rkKey) const
{
    return m_uiI0 != rkKey.m_uiI0 || m_uiI1 != rkKey.m_uiI1;
}
//----------------------------------------------------------------------------
inline MgcCLodMesh::KeyType::operator unsigned int () const
{
    return m_uiI0 ^ m_uiI1;
}
//----------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -