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);
Definition coresubmorphtarget.h:107
bool appendBlendVertex(int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
Record one blend vertex.
Definition coresubmorphtarget.cpp:402
virtual void setCoreSubmesh(CalCoreSubmesh *inCoreSubmesh)
Record the core submesh that this morph applies to.
Definition coresubmorphtarget.cpp:363
virtual bool reserve(int blendVertexCount)
Reserves memory for the blend vertices.
Definition coresubmorphtarget.cpp:347
Definition coresubmorphtarget.h:22
Definition coresubmesh.h:32
Definition coresubmorphtarget.h:78
bool reserve(int blendVertexCount)
Reserves memory for the blend vertices.
Definition coresubmorphtarget.cpp:219
bool appendBlendVertex(int vertexId, const CalCoreSubMorphTarget::BlendVertex &vertex)
Record one blend vertex.
Definition coresubmorphtarget.cpp:249
bool getBlendVertex(int vertexId, CalCoreSubMorphTarget::BlendVertex &outVertex) const
Retrieve one blend vertex.
Definition coresubmorphtarget.cpp:281
The vector class.
Definition vector.h:37
Derive from RefCounted to make your class have reference-counted lifetime semantics.
Definition refcounted.h:29
A container-safe smart pointer used for refcounted classes.
Definition refptr.h:11
Definition coresubmorphtarget.h:25