11 #ifndef CAL_CORESUBMORPHTARGET_H 12 #define CAL_CORESUBMORPHTARGET_H 15 #include "cal3d/global.h" 16 #include "cal3d/vector.h" 17 #include "cal3d/refcounted.h" 18 #include "cal3d/refptr.h" 19 #include "cal3d/coresubmesh.h" 28 std::vector<CalCoreSubmesh::TextureCoordinate> textureCoords;
29 bool create() {
return true; }
30 bool destroy() {
return true; }
40 int getBlendVertexCount()
const;
42 typedef std::vector<BlendVertex *> VectorBlendVertex;
44 std::vector<BlendVertex *>& getVectorBlendVertex();
45 inline bool hasBlendVertex(
int blendVertexId ) {
46 return m_vectorBlendVertex[blendVertexId] != NULL;
48 inline BlendVertex
const * getBlendVertex(
int blendVertexId ) {
49 return m_vectorBlendVertex[blendVertexId];
52 inline const BlendVertex* getBlendVertex(
int blendVertexId )
const {
53 return m_vectorBlendVertex[blendVertexId];
56 const std::vector<BlendVertex*>& getVectorBlendVertex()
const;
57 virtual bool reserve(
int blendVertexCount);
58 bool setBlendVertex(
int vertexId,
const BlendVertex& vertex);
60 void getBlendVertex(
int vertexId, BlendVertex& outVertex )
const;
61 CalMorphTargetType morphTargetType()
const;
63 void setName( std::string );
64 std::string name()
const;
69 std::vector<BlendVertex*> m_vectorBlendVertex;
71 std::string m_morphTargetName;
72 CalMorphTargetType m_morphTargetType;
81 m_vectorVertexIndexSize(0),
82 m_vectorVertexIndexPtr(0),
83 m_vectorBlendVertexPtr(0) { }
85 bool reserve(
int blendVertexCount);
94 std::vector<CalCoreSubMorphTarget::BlendVertex> m_vectorBlendVertex;
95 std::vector<int> m_vectorVertexIndex;
96 mutable int m_NextIndex;
99 mutable int m_vectorVertexIndexSize;
100 mutable const int *m_vectorVertexIndexPtr;
113 virtual bool reserve(
int blendVertexCount);
virtual void setCoreSubmesh(CalCoreSubmesh *inCoreSubmesh)
Record the core submesh that this morph applies to.
Definition: coresubmorphtarget.cpp:363
Definition: coresubmorphtarget.h:24
bool reserve(int blendVertexCount)
Reserves memory for the blend vertices.
Definition: coresubmorphtarget.cpp:219
bool getBlendVertex(int vertexId, CalCoreSubMorphTarget::BlendVertex &outVertex) const
Retrieve one blend vertex.
Definition: coresubmorphtarget.cpp:281
Definition: coresubmorphtarget.h:106
virtual bool reserve(int blendVertexCount)
Reserves memory for the blend vertices.
Definition: coresubmorphtarget.cpp:347
bool appendBlendVertex(int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
Record one blend vertex.
Definition: coresubmorphtarget.cpp:402
bool appendBlendVertex(int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
Record one blend vertex.
Definition: coresubmorphtarget.cpp:249
Definition: coresubmorphtarget.h:77
Definition: coresubmorphtarget.h:21
The vector class.
Definition: vector.h:36
Definition: coresubmesh.h:31
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition: refcounted.h:28