Blender V2.61 - r43446
Public Member Functions

KX_PolygonMaterial Class Reference

#include <KX_PolygonMaterial.h>

Inheritance diagram for KX_PolygonMaterial:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 KX_PolygonMaterial ()
void Initialize (const STR_String &texname, Material *ma, int materialindex, int tile, int tilexrep, int tileyrep, int alphablend, bool alpha, bool zsort, bool light, int lightlayer, struct MTFace *tface, unsigned int *mcol)
virtual ~KX_PolygonMaterial ()
virtual TCachingInfo GetCachingInfo (void) const
void DefaultActivate (RAS_IRasterizer *rasty, TCachingInfo &cachingInfo) const
virtual bool Activate (RAS_IRasterizer *rasty, TCachingInfo &cachingInfo) const
MaterialGetBlenderMaterial () const
ImageGetBlenderImage () const
MTFaceGetMTFace (void) const
unsigned int * GetMCol (void) const
virtual void GetMaterialRGBAColor (unsigned char *rgba) const

Detailed Description

Material class.

This holds the shader, textures and python methods for setting the render state before rendering.

Definition at line 56 of file KX_PolygonMaterial.h.


Constructor & Destructor Documentation

KX_PolygonMaterial::KX_PolygonMaterial ( )

Definition at line 59 of file KX_PolygonMaterial.cpp.

KX_PolygonMaterial::~KX_PolygonMaterial ( ) [virtual]

Definition at line 110 of file KX_PolygonMaterial.cpp.


Member Function Documentation

bool KX_PolygonMaterial::Activate ( RAS_IRasterizer rasty,
TCachingInfo cachingInfo 
) const [virtual]

Activates the material in the rasterizer. On entry, the cachingInfo contains info about the last activated material. On exit, the cachingInfo should contain updated info about this material.

Parameters:
rastyThe rasterizer in which the material should be active.
cachingInfoThe information about the material used to speed up rasterizing.

Reimplemented from RAS_IPolyMaterial.

Definition at line 125 of file KX_PolygonMaterial.cpp.

References DefaultActivate(), KX_POLYGONMATERIAL_CAPSULE_ID, and NULL.

void KX_PolygonMaterial::DefaultActivate ( RAS_IRasterizer rasty,
TCachingInfo cachingInfo 
) const

Activates the material in the (OpenGL) rasterizer. On entry, the cachingInfo contains info about the last activated material. On exit, the cachingInfo should contain updated info about this material.

Parameters:
rastyThe rasterizer in which the material should be active.
cachingInfoThe information about the material used to speed up rasterizing.

Definition at line 167 of file KX_PolygonMaterial.cpp.

References GetCachingInfo(), RAS_IRasterizer::GetDrawingMode(), RAS_IRasterizer::GetTime(), GPU_set_tpage(), GPU_update_image_time(), RAS_IRasterizer::KX_BACKCULL, RAS_IRasterizer::KX_LINES, RAS_IRasterizer::KX_TEX, RAS_IRasterizer::KX_TEXTURED, RAS_IRasterizer::KX_WIREFRAME, RAS_IPolyMaterial::m_alphablend, RAS_IPolyMaterial::m_diffuse, RAS_IPolyMaterial::m_drawingmode, RAS_IPolyMaterial::m_shininess, RAS_IPolyMaterial::m_specular, RAS_IPolyMaterial::m_specularity, NULL, RAS_IRasterizer::SetCullFace(), RAS_IRasterizer::SetDiffuse(), RAS_IRasterizer::SetLines(), RAS_IRasterizer::SetPolygonOffset(), RAS_IRasterizer::SetShinyness(), RAS_IRasterizer::SetSpecularity(), MTFace::tpage, and Material::zoffs.

Referenced by Activate().

Image * KX_PolygonMaterial::GetBlenderImage ( ) const [virtual]

Reimplemented from RAS_IPolyMaterial.

Definition at line 120 of file KX_PolygonMaterial.cpp.

References NULL, and MTFace::tpage.

Material* KX_PolygonMaterial::GetBlenderMaterial ( ) const [inline, virtual]

Reimplemented from RAS_IPolyMaterial.

Definition at line 109 of file KX_PolygonMaterial.h.

Referenced by KX_BlenderSceneConverter::FreeBlendFile().

virtual TCachingInfo KX_PolygonMaterial::GetCachingInfo ( void  ) const [inline, virtual]

Returns the caching information for this material, This can be used to speed up the rasterizing process.

Returns:
The caching information.

Reimplemented from RAS_IPolyMaterial.

Definition at line 94 of file KX_PolygonMaterial.h.

Referenced by DefaultActivate().

void KX_PolygonMaterial::GetMaterialRGBAColor ( unsigned char *  rgba) const [virtual]

Reimplemented from RAS_IPolyMaterial.

Definition at line 209 of file KX_PolygonMaterial.cpp.

References Material::alpha, Material::b, Material::g, and Material::r.

unsigned int* KX_PolygonMaterial::GetMCol ( void  ) const [inline]
MTFace* KX_PolygonMaterial::GetMTFace ( void  ) const [inline]

Returns the Blender texture face structure that is used for this material.

Returns:
The material's texture face.

Definition at line 120 of file KX_PolygonMaterial.h.

Referenced by KX_BlenderRenderTools::RenderText(), and GPC_RenderTools::RenderText().

void KX_PolygonMaterial::Initialize ( const STR_String texname,
Material ma,
int  materialindex,
int  tile,
int  tilexrep,
int  tileyrep,
int  alphablend,
bool  alpha,
bool  zsort,
bool  light,
int  lightlayer,
struct MTFace tface,
unsigned int *  mcol 
)

Definition at line 73 of file KX_PolygonMaterial.cpp.

References Material::game, Material::id, ID::name, and NULL.

Referenced by BL_ConvertMesh().


The documentation for this class was generated from the following files: