Blender  V2.59
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 = 256, BILLBOARD_AXISALIGNED = 4096, SHADOW = 8192 }
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 mode, 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 mode, int transp, bool alpha, bool zsort)
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 void Replace_IScene (SCA_IScene *val)
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_transp
bool m_alpha
bool m_zsort
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 99 of file RAS_IPolygonMaterial.h.


Member Enumeration Documentation

Enumerator:
BILLBOARD_SCREENALIGNED 
BILLBOARD_AXISALIGNED 
SHADOW 

Definition at line 102 of file RAS_IPolygonMaterial.h.


Constructor & Destructor Documentation

RAS_IPolyMaterial::RAS_IPolyMaterial ( )

Definition at line 71 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  mode,
int  transp,
bool  alpha,
bool  zsort 
)

Definition at line 92 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 130 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_PolygonMaterial, and KX_BlenderMaterial.

Definition at line 146 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 150 of file RAS_IPolygonMaterial.h.

Referenced by RAS_MaterialBucket::RenderMeshSlot().

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

Reimplemented in KX_PolygonMaterial.

Definition at line 216 of file RAS_IPolygonMaterial.cpp.

References NULL.

Referenced by RAS_OpenGLRasterizer::IndexPrimitivesInternal().

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

Reimplemented in KX_PolygonMaterial, and KX_BlenderMaterial.

Definition at line 211 of file RAS_IPolygonMaterial.cpp.

References NULL.

Referenced by RAS_OpenGLRasterizer::IndexPrimitivesInternal().

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

Definition at line 221 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_PolygonMaterial, and KX_BlenderMaterial.

Definition at line 137 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 191 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 155 of file RAS_IPolygonMaterial.cpp.

Referenced by CheckTexDM().

const STR_String & RAS_IPolyMaterial::GetTextureName ( ) const

Definition at line 201 of file RAS_IPolygonMaterial.cpp.

References m_texturename.

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

unsigned int RAS_IPolyMaterial::hash ( ) const

Definition at line 181 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  mode,
int  transp,
bool  alpha,
bool  zsort 
)
bool RAS_IPolyMaterial::IsAlpha ( ) const

Definition at line 171 of file RAS_IPolygonMaterial.cpp.

References m_alpha, and m_zsort.

Referenced by RAS_MaterialBucket::IsAlpha().

bool RAS_IPolyMaterial::IsZSort ( ) const

Definition at line 176 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 163 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 178 of file RAS_IPolygonMaterial.h.

void RAS_IPolyMaterial::ReleaseMaterial ( ) [virtual]

Definition at line 226 of file RAS_IPolygonMaterial.cpp.

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

Reimplemented in KX_BlenderMaterial.

Definition at line 173 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 249 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().

unsigned int RAS_IPolyMaterial::m_flag [protected]

Definition at line 84 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 91 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 87 of file RAS_IPolygonMaterial.h.

Referenced by Initialize().

unsigned int RAS_IPolyMaterial::m_polymatid [protected]

Definition at line 86 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().

int RAS_IPolyMaterial::m_transp [protected]

Definition at line 81 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: