22 #ifndef INCLUDED_MODELDEF 23 #define INCLUDED_MODELDEF 36 #include <unordered_map> 101 return !memcmp(m_Bone, o.
m_Bone,
sizeof(m_Bone)) && !memcmp(m_Weight, o.
m_Weight,
sizeof(m_Weight));
146 enum { FILE_VERSION = 3 };
148 enum { FILE_READ_VERSION = 1 };
194 const SPropPoint* FindPropPoint(
const char* name)
const;
222 static void(*SkinPointsAndNormals)(
227 const size_t* blendIndices,
233 void BlendBoneMatrices(
CMatrix3D boneMatrices[]);
#define NONCOPYABLE(className)
Indicates that a class is noncopyable (usually due to const or reference members, or because the clas...
Definition: code_annotation.h:227
u8 m_BoneIndex
Index of parent bone to which this prop point is relative, if any.
Definition: ModelDef.h:85
CQuaternion m_Rotation
Rotation of the prop model that will be attached at this point.
Definition: ModelDef.h:70
const std::vector< CVector2D > & GetUVCoordinates() const
Definition: ModelDef.h:176
size_t GetNumFaces() const
Definition: ModelDef.h:179
SModelFace * m_pFaces
Definition: ModelDef.h:265
std::unordered_map< u32, CBoundingBoxAligned > m_MaxBoundsPerAnimDef
Definition: ModelDef.h:281
Describes the position of a prop point within its parent model.
Definition: ModelDef.h:54
RenderDataMap m_RenderData
Definition: ModelDef.h:286
void ModelDefActivateFastImpl()
Detects CPU caps and activates the best possible codepath.
Definition: ModelDef.cpp:525
bool operator==(const SVertexBlend &o) const
Definition: ModelDef.h:99
CVector3D m_Norm
Definition: ModelDef.h:112
SModelVertex * m_pVertices
Definition: ModelDef.h:260
uint16_t u16
Definition: types.h:38
float m_Weight[SIZE]
Definition: ModelDef.h:97
SVertexBlend * GetBlends() const
Definition: ModelDef.h:189
Definition: SkeletonAnimDef.h:34
Definition: Vector3D.h:30
Definition: ModelDef.h:129
virtual ~CModelDefRPrivate()
Definition: ModelDef.h:133
std::vector< SPropPoint > m_PropPoints
Definition: ModelDef.h:275
SModelFace * GetFaces() const
Definition: ModelDef.h:180
Definition: ModelDef.h:140
size_t m_NumBones
Definition: ModelDef.h:267
uint8_t u8
Definition: types.h:37
size_t m_NumFaces
Definition: ModelDef.h:264
SVertexBlend * m_pBlends
Definition: ModelDef.h:272
const VfsPath & GetName() const
Definition: ModelDef.h:255
size_t GetNumVertices() const
Definition: ModelDef.h:170
Definition: ModelDef.h:107
Definition: Matrix3D.h:33
u8 m_Bone[SIZE]
Definition: ModelDef.h:95
CMatrix3D * GetInverseBindBoneMatrices()
Definition: ModelDef.h:185
Definition: SkeletonAnimDef.h:47
Definition: CCmpRangeManager.cpp:211
VfsPath m_Name
Definition: ModelDef.h:278
size_t m_NumBlends
Definition: ModelDef.h:271
size_t * m_pBlendIndices
Definition: ModelDef.h:273
pthread_key_t key
Definition: wpthread.cpp:140
size_t m_NumVertices
Definition: ModelDef.h:259
CStr m_Name
Name of the prop point.
Definition: ModelDef.h:57
static Status Load(const OsPath &pathname, void *buf, size_t size, const Parameters &p=Parameters(), const CompletedHook &completedHook=CompletedHook(), const IssueHook &issueHook=IssueHook())
Definition: io.h:347
CMatrix3D * m_InverseBindBoneMatrices
Definition: ModelDef.h:269
Definition: ModelDef.h:91
Definition: ModelDef.h:120
CMatrix3D m_Transform
Object to parent space transformation.
Definition: ModelDef.h:79
CModelDefRPrivate()
Definition: ModelDef.h:132
Status Save(const CStrW &name, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone)
Create new saved game archive with given name and simulation data.
Definition: SavedGame.cpp:56
std::map< const void *, CModelDefRPrivate * > RenderDataMap
Definition: ModelDef.h:285
CBoneState * GetBones() const
Definition: ModelDef.h:184
size_t * GetBlendIndices() const
Definition: ModelDef.h:190
Definition: Quaternion.h:25
Definition: BoundingBoxAligned.h:33
CVector3D m_Coords
Definition: ModelDef.h:110
SVertexBlend m_Blend
Definition: ModelDef.h:114
SModelVertex * GetVertices() const
Definition: ModelDef.h:171
size_t GetNumBlends() const
Definition: ModelDef.h:188
CVector3D m_Position
Position of the point within the parent model, relative to either the parent model's origin or one of...
Definition: ModelDef.h:64
Definition: VertexArray.h:30
std::vector< CVector2D > m_UVCoordinates
Definition: ModelDef.h:261
size_t m_NumUVsPerVertex
Definition: ModelDef.h:262
size_t GetNumUVsPerVertex() const
Definition: ModelDef.h:174
CBoneState * m_Bones
Definition: ModelDef.h:268
size_t GetNumBones() const
Definition: ModelDef.h:183