libcmo21/LibCmo/CK2/ObjImpls/CK3dEntity.hpp
yyc12345 e682a87d25 refactor: refactor project
- rename LIBCMO_DISABLE_COPY_MOVE -> YYCC_DEL_CLS_COPY_MOVE and LIBCMO_DEFAULT_COPY_MOVE -> YYCC_DEF_CLS_COPY_MOVE.
- fix Vector declaration generator. throw exception when operator[] face invalid index, instead of do fallback.
- rename VTAll.hpp -> VTInternal.hpp and VYUserAll -> VTAll.hpp for easy to understand.
- fix project name error in Doxygen template.
- replace all LIBCMO_OS_WIN32 to YYCC_OS == YYCC_OS_WINDOWS.
- fix some compile error (involving utf8 encoding) but not the final result.
- use correct way to include std-image library (use <> instead of "")
- finish documentation for VTUtils.hpp and VTEncoding.hpp.
2024-08-17 20:43:27 +08:00

56 lines
1.6 KiB
C++

#pragma once
#include "../../VTInternal.hpp"
#include "CKRenderObject.hpp"
namespace LibCmo::CK2::ObjImpls {
class CK3dEntity : public CKRenderObject {
public:
CK3dEntity(CKContext* ctx, CK_ID ckid, CKSTRING name);
virtual ~CK3dEntity();
YYCC_DEL_CLS_COPY_MOVE(CK3dEntity);
virtual CK_CLASSID GetClassID(void) override {
return CK_CLASSID::CKCID_3DENTITY;
}
virtual void CheckPreDeletion() override;
// 2 RW functions
virtual bool Save(CKStateChunk* chunk, CKFileVisitor* file, CKDWORD flags) override;
virtual bool Load(CKStateChunk* chunk, CKFileVisitor* file) override;
// it have special Show and IsVisible method
virtual void Show(CK_OBJECT_SHOWOPTION show = CK_OBJECT_SHOWOPTION::CKSHOW) override;
virtual bool IsVisible() const override;
const VxMath::VxMatrix& GetWorldMatrix() const;
void SetWorldMatrix(const VxMath::VxMatrix& mat);
CK_3DENTITY_FLAGS GetEntityFlags() const;
void SetEntityFlags(CK_3DENTITY_FLAGS flags);
VxMath::VX_MOVEABLE_FLAGS GetMoveableFlags() const;
void SetMoveableFlags(VxMath::VX_MOVEABLE_FLAGS flags);
CKDWORD GetZOrder() const;
void SetZOrder(CKDWORD ord);
void AddPotentialMesh(CKMesh* mesh);
void RemovePotentialMesh(CKMesh* mesh);
CKDWORD GetPotentialMeshCount() const;
CKMesh* GetPotentialMesh(CKDWORD idx) const;
CKMesh* GetCurrentMesh() const;
void SetCurrentMesh(CKMesh* mesh);
protected:
XContainer::XObjectPointerArray m_PotentialMeshes;
CKMesh* m_CurrentMesh;
VxMath::VxMatrix m_WorldMatrix;
CKDWORD m_ZOrder; // replace the whole heavy CKSceneGraphNode
VxMath::VX_MOVEABLE_FLAGS m_MoveableFlags;
CK_3DENTITY_FLAGS m_3dEntityFlags;
};
}