- Cal3D 0.11 API Reference -

submesh.h
1//****************************************************************************//
2// submesh.h //
3// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4//****************************************************************************//
5// This library is free software; you can redistribute it and/or modify it //
6// under the terms of the GNU Lesser General Public License as published by //
7// the Free Software Foundation; either version 2.1 of the License, or (at //
8// your option) any later version. //
9//****************************************************************************//
10
11#ifndef CAL_SUBMESH_H
12#define CAL_SUBMESH_H
13
14
15#include "cal3d/global.h"
16#include "cal3d/vector.h"
17
18
19class CalCoreSubmesh;
20
21
22class CAL3D_API CalSubmesh
23{
24public:
26 {
27 CalVector position;
28 CalVector positionOld;
29 CalVector force;
30 };
31
33 {
34 CalVector tangent;
35 float crossFactor;
36 };
37
38 struct Face
39 {
40 CalIndex vertexId[3];
41 };
42
43public:
44 CalSubmesh(CalCoreSubmesh* coreSubmesh);
45 ~CalSubmesh() { }
46
47 CalCoreSubmesh *getCoreSubmesh();
48 int getCoreMaterialId();
49 int getFaceCount();
50 int getFaces(CalIndex *pFaceBuffer);
51 std::vector<CalVector>& getVectorNormal();
52 std::vector<std::vector<TangentSpace> >& getVectorVectorTangentSpace();
53 std::vector<PhysicalProperty>& getVectorPhysicalProperty();
54 std::vector<CalVector>& getVectorVertex();
55 int getVertexCount();
56 bool hasInternalData();
57 void disableInternalData();
58 void setCoreMaterialId(int coreMaterialId);
59 void setLodLevel(float lodLevel);
60 bool isTangentsEnabled(int mapId);
61 bool enableTangents(int mapId, bool enabled);
62 std::vector<float>& getVectorWeight();
63 void setMorphTargetWeight(int blendId,float weight);
64 float getMorphTargetWeight(int blendId);
65 float getBaseWeight();
66 int getMorphTargetWeightCount();
67 std::vector<float>& getVectorMorphTargetWeight();
68
69private:
70 CalCoreSubmesh *m_pCoreSubmesh;
71 std::vector<float> m_vectorMorphTargetWeight;
72 std::vector<CalVector> m_vectorVertex;
73 std::vector<CalVector> m_vectorNormal;
74 std::vector<std::vector<TangentSpace> > m_vectorvectorTangentSpace;
75 std::vector<Face> m_vectorFace;
76 std::vector<PhysicalProperty> m_vectorPhysicalProperty;
77 int m_vertexCount;
78 int m_faceCount;
79 int m_coreMaterialId;
80 bool m_bInternalData;
81};
82
83#endif
Definition coresubmesh.h:23
Definition submesh.h:23
The vector class.
Definition vector.h:37
Definition submesh.h:39
Definition submesh.h:26
Definition submesh.h:33

Generated by The Cal3D Team with Doxygen 1.12.0