- Cal3D 0.11 API Reference -

renderer.h
1//****************************************************************************//
2// renderer.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_RENDERER_H
12#define CAL_RENDERER_H
13
14
15#include "cal3d/global.h"
16
17
18 class CalModel;
19 class CalSubmesh;
20
21
22 class CAL3D_API CalRenderer
23{
24 public:
25 CalRenderer(CalModel* pModel);
26 CalRenderer(CalRenderer* pRenderer);
27 ~CalRenderer() { }
28
29 bool beginRendering();
30 void endRendering();
31 void getAmbientColor(unsigned char *pColorBuffer);
32 void getDiffuseColor(unsigned char *pColorBuffer);
33 int getFaceCount();
34 int getFaces(CalIndex *pFaceBuffer);
35 int getMapCount();
36 Cal::UserData getMapUserData(int mapId);
37 int getMeshCount();
38 int getNormals(float *pNormalBuffer, int stride=0);
39 float getShininess();
40 void getSpecularColor(unsigned char *pColorBuffer);
41 int getSubmeshCount(int meshId);
42 int getTextureCoordinates(int mapId, float *pTextureCoordinateBuffer, int stride=0);
43 int getVertexCount();
44 int getVertices(float *pVertexBuffer, int stride=0);
45 int getTangentSpaces(int mapId, float *pTangentSpaceBuffer, int stride=0);
46 int getVerticesAndNormals(float *pVertexBuffer, int stride=0);
47 int getVerticesNormalsAndTexCoords(float *pVertexBuffer,int NumTexCoords=1);
48 bool isTangentsEnabled(int mapId);
49 bool selectMeshSubmesh(int meshId, int submeshId);
50 void setNormalization(bool normalize);
51
52 private:
53 CalModel *m_pModel;
54 CalSubmesh *m_pSelectedSubmesh;
55};
56
57#endif
58
59//****************************************************************************//
CalModel
Definition model.h:31
CalRenderer::getFaces
int getFaces(CalIndex *pFaceBuffer)
Provides access to the face data.
Definition renderer.cpp:196
CalRenderer::endRendering
void endRendering()
Finishes the rendering query phase.
Definition renderer.cpp:94
CalRenderer::getVerticesAndNormals
int getVerticesAndNormals(float *pVertexBuffer, int stride=0)
Provides access to the submesh data.
Definition renderer.cpp:590
CalRenderer::getMapCount
int getMapCount()
Returns the number of maps.
Definition renderer.cpp:209
CalRenderer::getNormals
int getNormals(float *pNormalBuffer, int stride=0)
Provides access to the normal data.
Definition renderer.cpp:340
CalRenderer::getSpecularColor
void getSpecularColor(unsigned char *pColorBuffer)
Provides access to the specular color.
Definition renderer.cpp:405
CalRenderer::getAmbientColor
void getAmbientColor(unsigned char *pColorBuffer)
Provides access to the ambient color.
Definition renderer.cpp:110
CalRenderer::getVertices
int getVertices(float *pVertexBuffer, int stride=0)
Provides access to the vertex data.
Definition renderer.cpp:543
CalRenderer::getVerticesNormalsAndTexCoords
int getVerticesNormalsAndTexCoords(float *pVertexBuffer, int NumTexCoords=1)
Provides access to the submesh data.
Definition renderer.cpp:638
CalRenderer::getTextureCoordinates
int getTextureCoordinates(int mapId, float *pTextureCoordinateBuffer, int stride=0)
Provides access to the texture coordinate data.
Definition renderer.cpp:470
CalRenderer::getSubmeshCount
int getSubmeshCount(int meshId)
Returns the number of submeshes.
Definition renderer.cpp:442
CalRenderer::CalRenderer
CalRenderer(CalModel *pModel)
Constructs the renderer instance.
Definition renderer.cpp:40
CalRenderer::setNormalization
void setNormalization(bool normalize)
Sets the normalization flag to true or false.
Definition renderer.cpp:754
CalRenderer::getShininess
float getShininess()
Returns the shininess factor.
Definition renderer.cpp:385
CalRenderer::getMeshCount
int getMeshCount()
Returns the number of attached meshes.
Definition renderer.cpp:261
CalRenderer::isTangentsEnabled
bool isTangentsEnabled(int mapId)
Returns if tangent are enabled.
Definition renderer.cpp:527
CalRenderer::getFaceCount
int getFaceCount()
Returns the number of faces.
Definition renderer.cpp:180
CalRenderer::beginRendering
bool beginRendering()
Initializes the rendering query phase.
Definition renderer.cpp:68
CalRenderer::selectMeshSubmesh
bool selectMeshSubmesh(int meshId, int submeshId)
Selects a mesh/submesh for rendering data queries.
Definition renderer.cpp:727
CalRenderer::getTangentSpaces
int getTangentSpaces(int mapId, float *pTangentSpaceBuffer, int stride=0)
Provides access to the tangent space data.
Definition renderer.cpp:283
CalRenderer::getMapUserData
Cal::UserData getMapUserData(int mapId)
Provides access to a specified map user data.
Definition renderer.cpp:232
CalRenderer::getVertexCount
int getVertexCount()
Returns the number of vertices.
Definition renderer.cpp:514
CalRenderer::getDiffuseColor
void getDiffuseColor(unsigned char *pColorBuffer)
Provides access to the diffuse color.
Definition renderer.cpp:146
CalSubmesh
Definition submesh.h:23

Generated by The Cal3D Team with Doxygen 1.15.0