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;
36 int getBlendVertexCount()
const;
39 inline std::vector<BlendVertex>& getVectorBlendVertex(){
return m_vectorBlendVertex;}
40 inline const std::vector<BlendVertex>& getVectorBlendVertex()
const{
return m_vectorBlendVertex;}
42 inline BlendVertex
const * getBlendVertex(
int blendVertexId){
return &m_vectorBlendVertex[blendVertexId];}
43 inline const BlendVertex* getBlendVertex(
int blendVertexId)
const{
return &m_vectorBlendVertex[blendVertexId];}
45 virtual bool reserve(
int blendVertexCount);
47 bool setBlendVertex(
int vertexId,
const BlendVertex& vertex);
48 void getBlendVertex(
int vertexId, BlendVertex& outVertex )
const;
52 inline void setMorphTargetType(CalMorphTargetType c) { m_morphTargetType=c;}
55 inline const unsigned int&
getMorphID()
const{
return m_morphTargetID;}
58 void setName(
const std::string &s){_name=s;}
59 const std::string& getName()
const{
return _name;}
61 inline void setMorphID(
const unsigned int &i){m_morphTargetID=i;}
66 std::vector<BlendVertex> m_vectorBlendVertex;
68 unsigned int m_morphTargetID;
69 CalMorphTargetType m_morphTargetType;
78 m_vectorVertexIndexSize(0),
79 m_vectorVertexIndexPtr(0),
80 m_vectorBlendVertexPtr(0) { }
82 bool reserve(
int blendVertexCount);
91 std::vector<CalCoreSubMorphTarget::BlendVertex> m_vectorBlendVertex;
92 std::vector<int> m_vectorVertexIndex;
93 mutable int m_NextIndex;
96 mutable int m_vectorVertexIndexSize;
97 mutable const int *m_vectorVertexIndexPtr;
110 virtual bool reserve(
int blendVertexCount);
virtual void setCoreSubmesh(CalCoreSubmesh *inCoreSubmesh)
Record the core submesh that this morph applies to.
Definition: coresubmorphtarget.cpp:328
Definition: coresubmorphtarget.h:24
void setName(const std::string &s)
Name property (just for convenience )
Definition: coresubmorphtarget.h:58
bool reserve(int blendVertexCount)
Reserves memory for the blend vertices.
Definition: coresubmorphtarget.cpp:184
bool getBlendVertex(int vertexId, CalCoreSubMorphTarget::BlendVertex &outVertex) const
Retrieve one blend vertex.
Definition: coresubmorphtarget.cpp:246
Definition: coresubmorphtarget.h:103
virtual bool reserve(int blendVertexCount)
Reserves memory for the blend vertices.
Definition: coresubmorphtarget.cpp:312
bool appendBlendVertex(int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
Record one blend vertex.
Definition: coresubmorphtarget.cpp:367
bool appendBlendVertex(int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
Record one blend vertex.
Definition: coresubmorphtarget.cpp:214
const unsigned int & getMorphID() const
Index of this morph for its target mesh.
Definition: coresubmorphtarget.h:55
Definition: coresubmorphtarget.h:74
Definition: coresubmorphtarget.h:21
The vector class.
Definition: vector.h:36
Definition: coresubmesh.h:31
CalMorphTargetType getMorphTargetType() const
Type of this morph.
Definition: coresubmorphtarget.h:51
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition: refcounted.h:28