- Cal3D 0.11 API Reference -

renderer.h

00001 //****************************************************************************//
00002 // renderer.h                                                                 //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
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) const;
00032   void getDiffuseColor(unsigned char *pColorBuffer) const;
00033   int getFaceCount() const;
00034   int getFaces(CalIndex *pFaceBuffer) const;
00035   int getMapCount() const;
00036   Cal::UserData getMapUserData(int mapId);
00037   const Cal::UserData getMapUserData(int mapId) const;
00038   int getMeshCount() const;
00039   int getNormals(float *pNormalBuffer, int stride=0) const;
00040   float getShininess() const;
00041   void getSpecularColor(unsigned char *pColorBuffer) const;
00042   int getSubmeshCount(int meshId) const;
00043   int getTextureCoordinates(int mapId, float *pTextureCoordinateBuffer, int stride=0) const;
00044   int getVertexCount() const;
00045   int getVertices(float *pVertexBuffer, int stride=0) const;
00046   int getTangentSpaces(int mapId, float *pTangentSpaceBuffer, int stride=0) const;
00047   int getVertColors(float *pVertexBuffer);
00048   int getVertColorsAsStandardPixels( unsigned int *pVertexBuffer);
00049   int getVerticesAndNormals(float *pVertexBuffer, int stride=0) const;
00050   int getVerticesNormalsAndTexCoords(float *pVertexBuffer,int NumTexCoords=1) const;
00051   bool isTangentsEnabled(int mapId) const;
00052   bool selectMeshSubmesh(int meshId, int submeshId);
00053   void setNormalization(bool normalize);
00054   bool textureCoordinatesForMapValid( int mapId );
00055   bool hasNonWhiteVertexColors();
00056 
00057 private:
00058   CalModel   *m_pModel;
00059   CalSubmesh *m_pSelectedSubmesh;
00060 };
00061 
00062 #endif
00063 
00064 //****************************************************************************//

Generated by The Cal3D Team with Doxygen 1.7.3