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