00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef CAL_RENDERER_H
00012 #define CAL_RENDERER_H
00013
00014
00015 #include "cal3d/global.h"
00016
00017
00018 class CalModel;
00019 class CalSubmesh;
00020
00021
00022 class CAL3D_API CalRenderer
00023 {
00024 public:
00025 CalRenderer(CalModel* pModel);
00026 CalRenderer(CalRenderer* pRenderer);
00027 ~CalRenderer() { }
00028
00029 bool beginRendering();
00030 void endRendering();
00031 void getAmbientColor(unsigned char *pColorBuffer);
00032 void getDiffuseColor(unsigned char *pColorBuffer);
00033 int getFaceCount();
00034 int getFaces(CalIndex *pFaceBuffer);
00035 int getMapCount();
00036 Cal::UserData getMapUserData(int mapId);
00037 int getMeshCount();
00038 int getNormals(float *pNormalBuffer, int stride=0);
00039 float getShininess();
00040 void getSpecularColor(unsigned char *pColorBuffer);
00041 int getSubmeshCount(int meshId);
00042 int getTextureCoordinates(int mapId, float *pTextureCoordinateBuffer, int stride=0);
00043 int getVertexCount();
00044 int getVertices(float *pVertexBuffer, int stride=0);
00045 int getTangentSpaces(int mapId, float *pTangentSpaceBuffer, int stride=0);
00046 int getVerticesAndNormals(float *pVertexBuffer, int stride=0);
00047 int getVerticesNormalsAndTexCoords(float *pVertexBuffer,int NumTexCoords=1);
00048 bool isTangentsEnabled(int mapId);
00049 bool selectMeshSubmesh(int meshId, int submeshId);
00050 void setNormalization(bool normalize);
00051
00052 private:
00053 CalModel *m_pModel;
00054 CalSubmesh *m_pSelectedSubmesh;
00055 };
00056
00057 #endif
00058
00059