00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_PHYSIQUE_H
00012 #define CAL_PHYSIQUE_H
00013
00014 #include "cal3d/global.h"
00015
00016
00017 class CalModel;
00018 class CalSubmesh;
00019 class CalVector;
00020
00021
00022 class CAL3D_API CalPhysique
00023 {
00024 public:
00025 CalPhysique(CalModel* pModel);
00026 ~CalPhysique() { }
00027
00028 int calculateTangentSpaces(CalSubmesh *pSubmesh, int mapId, float *pTangentSpaceBuffer, int stride=0);
00029 int calculateNormals(CalSubmesh *pSubmesh, float *pNormalBuffer, int stride=0);
00030 int calculateVertices(CalSubmesh *pSubmesh, float *pVertexBuffer, int stride=0);
00031 CalVector calculateVertex(CalSubmesh *pSubmesh, int vertexId);
00032 int calculateVerticesAndNormals(CalSubmesh *pSubmesh, float *pVertexBuffer, int stride=0);
00033 int calculateVerticesNormalsAndTexCoords(CalSubmesh *pSubmesh, float *pVertexBuffer,int NumTexCoords=1);
00034 void update();
00035 void setNormalization(bool normalize);
00036 void setAxisFactorX(float factor);
00037 void setAxisFactorY(float factor);
00038 void setAxisFactorZ(float factor);
00039
00040 private:
00041 CalModel *m_pModel;
00042 bool m_Normalize;
00043 float m_axisFactorX;
00044 float m_axisFactorY;
00045 float m_axisFactorZ;
00046 };
00047
00048 #endif
00049
00050