Blender V2.61 - r43446
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes

RAS_IPolyMaterial Class Reference

#include <RAS_IPolygonMaterial.h>

Inheritance diagram for RAS_IPolyMaterial:
Inheritance graph
[legend]

List of all members.

Public Types

enum  MaterialFlags { BILLBOARD_SCREENALIGNED = 512, BILLBOARD_AXISALIGNED = 1024, SHADOW = 2048 }
typedef void * TCachingInfo

Public Member Functions

 RAS_IPolyMaterial ()
 RAS_IPolyMaterial (const STR_String &texname, const STR_String &matname, int materialindex, int tile, int tilexrep, int tileyrep, int transp, bool alpha, bool zsort)
void Initialize (const STR_String &texname, const STR_String &matname, int materialindex, int tile, int tilexrep, int tileyrep, int transp, bool alpha, bool zsort, bool light, bool image, struct GameSettings *game)
virtual ~RAS_IPolyMaterial ()
virtual TCachingInfo GetCachingInfo (void) const
virtual bool Activate (RAS_IRasterizer *rasty, TCachingInfo &cachingInfo) const
virtual void ActivateMeshSlot (const class RAS_MeshSlot &ms, RAS_IRasterizer *rasty) const
virtual bool Equals (const RAS_IPolyMaterial &lhs) const
bool Less (const RAS_IPolyMaterial &rhs) const
bool IsAlpha () const
bool IsZSort () const
unsigned int hash () const
int GetDrawingMode () const
const STR_StringGetMaterialName () const
dword GetMaterialNameHash () const
const STR_StringGetTextureName () const
unsigned int GetFlag () const
int GetMaterialIndex () const
virtual MaterialGetBlenderMaterial () const
virtual ImageGetBlenderImage () const
virtual SceneGetBlenderScene () const
virtual void ReleaseMaterial ()
virtual void GetMaterialRGBAColor (unsigned char *rgba) const
virtual bool UsesLighting (RAS_IRasterizer *rasty) const
virtual bool UsesObjectColor () const
virtual bool CastsShadows () const
virtual void Replace_IScene (SCA_IScene *val)
int ConvertFaceMode (struct GameSettings *game, bool image) const
virtual void OnConstruction (int layer)

Public Attributes

MT_Vector3 m_diffuse
float m_shininess
MT_Vector3 m_specular
float m_specularity

Protected Attributes

STR_HashedString m_texturename
STR_HashedString m_materialname
int m_tile
int m_tilexrep
int m_tileyrep
int m_drawingmode
int m_alphablend
bool m_alpha
bool m_zsort
bool m_light
int m_materialindex
unsigned int m_polymatid
unsigned int m_flag
int m_multimode

Static Protected Attributes

static unsigned int m_newpolymatid = 0

Detailed Description

Polygon Material on which the material buckets are sorted

Definition at line 72 of file RAS_IPolygonMaterial.h.


Member Typedef Documentation

Used to store caching information for materials.

Definition at line 100 of file RAS_IPolygonMaterial.h.


Member Enumeration Documentation

Enumerator:
BILLBOARD_SCREENALIGNED 
BILLBOARD_AXISALIGNED 
SHADOW 

Definition at line 103 of file RAS_IPolygonMaterial.h.


Constructor & Destructor Documentation

RAS_IPolyMaterial::RAS_IPolyMaterial ( )

Definition at line 74 of file RAS_IPolygonMaterial.cpp.

References m_diffuse, m_shininess, m_specular, and m_specularity.

RAS_IPolyMaterial::RAS_IPolyMaterial ( const STR_String texname,
const STR_String matname,
int  materialindex,
int  tile,
int  tilexrep,
int  tileyrep,
int  transp,
bool  alpha,
bool  zsort 
)

Definition at line 96 of file RAS_IPolygonMaterial.cpp.

References m_diffuse, m_shininess, m_specular, and m_specularity.

virtual RAS_IPolyMaterial::~RAS_IPolyMaterial ( ) [inline, virtual]

Definition at line 133 of file RAS_IPolygonMaterial.h.


Member Function Documentation

virtual bool RAS_IPolyMaterial::Activate ( RAS_IRasterizer rasty,
TCachingInfo cachingInfo 
) const [inline, 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 in KX_BlenderMaterial, and KX_PolygonMaterial.

Definition at line 149 of file RAS_IPolygonMaterial.h.

Referenced by RAS_OpenGLRasterizer::SetMaterial().

virtual void RAS_IPolyMaterial::ActivateMeshSlot ( const class RAS_MeshSlot ms,
RAS_IRasterizer rasty 
) const [inline, virtual]

Definition at line 153 of file RAS_IPolygonMaterial.h.

Referenced by RAS_MaterialBucket::RenderMeshSlot().

bool RAS_IPolyMaterial::CastsShadows ( ) const [virtual]

Definition at line 267 of file RAS_IPolygonMaterial.cpp.

References m_flag, and RAS_CASTSHADOW.

Referenced by RAS_MaterialBucket::ActivateMaterial().

int RAS_IPolyMaterial::ConvertFaceMode ( struct GameSettings game,
bool  image 
) const
Returns:
the equivalent drawing mode for the material settings (equivalent to old TexFace tface->mode).

Definition at line 157 of file RAS_IPolygonMaterial.cpp.

References GameSettings::alpha_blend, GameSettings::face_orientation, GameSettings::flag, GEMAT_BACKCULL, GEMAT_TEX, and GEMAT_TEXT.

Referenced by Initialize().

bool RAS_IPolyMaterial::Equals ( const RAS_IPolyMaterial lhs) const [virtual]
Image * RAS_IPolyMaterial::GetBlenderImage ( ) const [virtual]

Reimplemented in KX_PolygonMaterial.

Definition at line 234 of file RAS_IPolygonMaterial.cpp.

References NULL.

Referenced by RAS_OpenGLRasterizer::IndexPrimitivesInternal().

Material * RAS_IPolyMaterial::GetBlenderMaterial ( ) const [virtual]

Reimplemented in KX_BlenderMaterial, and KX_PolygonMaterial.

Definition at line 229 of file RAS_IPolygonMaterial.cpp.

References NULL.

Referenced by RAS_OpenGLRasterizer::IndexPrimitivesInternal().

Scene * RAS_IPolyMaterial::GetBlenderScene ( ) const [virtual]

Definition at line 239 of file RAS_IPolygonMaterial.cpp.

References NULL.

Referenced by RAS_OpenGLRasterizer::IndexPrimitivesInternal().

virtual TCachingInfo RAS_IPolyMaterial::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 in KX_BlenderMaterial, and KX_PolygonMaterial.

Definition at line 140 of file RAS_IPolygonMaterial.h.

int RAS_IPolyMaterial::GetDrawingMode ( ) const
unsigned int RAS_IPolyMaterial::GetFlag ( ) const
int RAS_IPolyMaterial::GetMaterialIndex ( ) const
const STR_String & RAS_IPolyMaterial::GetMaterialName ( ) const

Definition at line 209 of file RAS_IPolygonMaterial.cpp.

References m_materialname.

Referenced by getMaterialID(), and RAS_MeshObject::GetMaterialName().

dword RAS_IPolyMaterial::GetMaterialNameHash ( ) const
void RAS_IPolyMaterial::GetMaterialRGBAColor ( unsigned char *  rgba) const [virtual]

Reimplemented in KX_PolygonMaterial.

Definition at line 173 of file RAS_IPolygonMaterial.cpp.

Referenced by CheckTexDM().

const STR_String & RAS_IPolyMaterial::GetTextureName ( ) const

Definition at line 219 of file RAS_IPolygonMaterial.cpp.

References m_texturename.

Referenced by getMaterialID(), and RAS_MeshObject::GetTextureName().

unsigned int RAS_IPolyMaterial::hash ( ) const

Definition at line 199 of file RAS_IPolygonMaterial.cpp.

References STR_HashedString::hash(), and m_texturename.

void RAS_IPolyMaterial::Initialize ( const STR_String texname,
const STR_String matname,
int  materialindex,
int  tile,
int  tilexrep,
int  tileyrep,
int  transp,
bool  alpha,
bool  zsort,
bool  light,
bool  image,
struct GameSettings game 
)
bool RAS_IPolyMaterial::IsAlpha ( ) const

Definition at line 189 of file RAS_IPolygonMaterial.cpp.

References m_alpha, and m_zsort.

Referenced by RAS_MaterialBucket::IsAlpha().

bool RAS_IPolyMaterial::IsZSort ( ) const

Definition at line 194 of file RAS_IPolygonMaterial.cpp.

References m_zsort.

Referenced by RAS_MaterialBucket::IsZSort().

bool RAS_IPolyMaterial::Less ( const RAS_IPolyMaterial rhs) const

Definition at line 181 of file RAS_IPolygonMaterial.cpp.

References Equals(), and m_polymatid.

Referenced by operator<().

virtual void RAS_IPolyMaterial::OnConstruction ( int  layer) [inline, virtual]

Reimplemented in KX_BlenderMaterial.

Definition at line 187 of file RAS_IPolygonMaterial.h.

void RAS_IPolyMaterial::ReleaseMaterial ( ) [virtual]

Definition at line 244 of file RAS_IPolygonMaterial.cpp.

virtual void RAS_IPolyMaterial::Replace_IScene ( SCA_IScene val) [inline, virtual]

Reimplemented in KX_BlenderMaterial.

Definition at line 177 of file RAS_IPolygonMaterial.h.

Referenced by KX_BlenderSceneConverter::MergeScene().

bool RAS_IPolyMaterial::UsesLighting ( RAS_IRasterizer rasty) const [virtual]
bool RAS_IPolyMaterial::UsesObjectColor ( ) const [virtual]

Definition at line 272 of file RAS_IPolygonMaterial.cpp.

References m_flag, and RAS_BLENDERGLSL.

Referenced by RAS_MaterialBucket::RenderMeshSlot().


Member Data Documentation

bool RAS_IPolyMaterial::m_alpha [protected]

Definition at line 82 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), Initialize(), and IsAlpha().

Definition at line 81 of file RAS_IPolygonMaterial.h.

Referenced by KX_PolygonMaterial::DefaultActivate(), Equals(), and Initialize().

unsigned int RAS_IPolyMaterial::m_flag [protected]
bool RAS_IPolyMaterial::m_light [protected]

Definition at line 84 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), Initialize(), and UsesLighting().

Definition at line 85 of file RAS_IPolygonMaterial.h.

Referenced by GetMaterialIndex(), and Initialize().

Definition at line 77 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), GetMaterialName(), GetMaterialNameHash(), and Initialize().

Definition at line 92 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), KX_BlenderMaterial::Initialize(), and Initialize().

unsigned int RAS_IPolyMaterial::m_newpolymatid = 0 [static, protected]

Definition at line 88 of file RAS_IPolygonMaterial.h.

Referenced by Initialize().

unsigned int RAS_IPolyMaterial::m_polymatid [protected]

Definition at line 87 of file RAS_IPolygonMaterial.h.

Referenced by Initialize(), and Less().

Definition at line 76 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), GetTextureName(), hash(), and Initialize().

int RAS_IPolyMaterial::m_tile [protected]

Definition at line 78 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), and Initialize().

Definition at line 79 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), and Initialize().

Definition at line 79 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), and Initialize().

bool RAS_IPolyMaterial::m_zsort [protected]

Definition at line 83 of file RAS_IPolygonMaterial.h.

Referenced by Equals(), Initialize(), IsAlpha(), and IsZSort().


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