VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Attributes | Friends
trpgMaterial Class Reference
Inheritance diagram for trpgMaterial:
Inheritance graph
[legend]

Classes

struct  _attrSet

Public Types

enum  { Smooth, Flat }
enum  { Front, Back, FrontAndBack }
enum  {
  None, Always, Equal, GreaterThanOrEqual,
  GreaterThan, LessThanOrEqual, LessThan, Never,
  NotEqual
}
enum  { TR_FID, TR_SMC, TR_STP, TR_SWC }
 Set an attribute (e.g. fid/smc) More...

Public Member Functions

 trpgMaterial (void)
 ~trpgMaterial (void)
void SetColor (const trpgColor &)
 Set base material color.
void SetAmbient (const trpgColor &)
 Ambient color.
void SetDiffuse (const trpgColor &)
 Diffuse color (the most commonly used)
void SetSpecular (const trpgColor &)
 Specular color used in lighting.
void SetEmission (const trpgColor &)
 Emissive color used in lighting.
void SetShininess (float64)
 Shininess used in lighting.
void SetShadeModel (int)
 Shading model.
void SetPointSize (float64)
 Point size.
void SetLineWidth (float64)
 Line width.
void SetCullMode (int)
 Cull mode. See GetCullMode.
void SetAlphaFunc (int)
 Alpha Function. See GetAlphaFunc.
void SetAlphaRef (float64)
 Alpha Ref value. See GetAlphaRef.
void SetAlpha (float64)
 Alpha value for any polygon using this material.
void SetAutoNormal (bool)
 Generate normals automatically from geometry.
void SetNumTexture (int)
void SetTexture (int no, int id, const trpgTextureEnv &)
int AddTexture (int, const trpgTextureEnv &)
void SetNumTiles (int)
 Number of tiles this material is used in.
int AddTile (void)
 Adds a count to the number of tiles this material is used in and returns that number.
void SetIsBumpMap (bool)
 Sets bump map status (color etc... isn't important)
void SetAttr (int attrCode, int val)
bool GetColor (trpgColor &) const
 Return the current color.
bool GetAmbient (trpgColor &) const
 Returns the ambient color.
bool GetDiffuse (trpgColor &) const
 Returns the diffuse color (the most commonly used color)
bool GetSpecular (trpgColor &) const
 Specular color used for lighting.
bool GetEmission (trpgColor &) const
 Emissive color used for lighting.
bool GetShininess (float64 &) const
 Shininess used for lighting.
bool GetShadeModel (int &) const
 The shading model can be either Smooth or Flat.
bool GetPointSize (float64 &) const
 Point size.
bool GetLineWidth (float64 &) const
 Line width.
bool GetCullMode (int &) const
bool GetAlphaFunc (int &) const
bool GetAlphaRef (float64 &) const
bool GetAutoNormal (bool &) const
 Whether or not to generate normals from geometry.
bool GetAlpha (float64 &) const
 A single Alpha value that applies to any polygons using this material.
bool GetNumTile (int &) const
bool GetNumTexture (int &) const
bool GetTexture (int no, int &id, trpgTextureEnv &) const
bool GetIsBumpMap (bool &) const
 Return whether or not this material is a bump map.
bool GetAttr (int attrCode, int &val) const
 Get an attribute (e.g. fid/smc)
bool isValid (void) const
 Validity check.
void Reset (void)
 Resets the contents back to empty.
bool Write (trpgWriteBuffer &)
 Writes this class to a write buffer.
bool Read (trpgReadBuffer &)
 Reads this class from a read buffer.
bool Print (trpgPrintBuffer &) const
 Prints this class to a print buffer.
- Public Member Functions inherited from trpgReadWriteable
 trpgReadWriteable ()
const chargetErrMess () const
- Public Member Functions inherited from trpgCheckable
 trpgCheckable (void)
virtual ~trpgCheckable (void)
virtual TeAttrHdl GetHandle () const
virtual void SetHandle (TeAttrHdl hdl)

Protected Attributes

bool isBump
 Note: Need to do equality operator.
trpgColor color
trpgColor ambient
trpgColor diffuse
trpgColor specular
trpgColor emission
float64 shininess
int shadeModel
float64 pointSize
float64 lineWidth
int cullMode
int alphaFunc
float64 alpha
float64 alphaRef
bool autoNormal
int numTex
int32 numTile
struct trpgMaterial::_attrSet attrSet
std::vector< inttexids
std::vector< trpgTextureEnvtexEnvs
- Protected Attributes inherited from trpgReadWriteable
char errMess [512]
- Protected Attributes inherited from trpgCheckable
bool valid
TeAttrHdl handle
bool writeHandle

Friends

class trpgMatTable

Member Enumeration Documentation

anonymous enum
Enumerator:
Smooth 
Flat 
anonymous enum
Enumerator:
Front 
Back 
FrontAndBack 
anonymous enum
Enumerator:
None 
Always 
Equal 
GreaterThanOrEqual 
GreaterThan 
LessThanOrEqual 
LessThan 
Never 
NotEqual 
anonymous enum

Set an attribute (e.g. fid/smc)

Enumerator:
TR_FID 
TR_SMC 
TR_STP 
TR_SWC 

Constructor & Destructor Documentation

trpgMaterial::trpgMaterial ( void  )
trpgMaterial::~trpgMaterial ( void  )

Member Function Documentation

void trpgMaterial::SetColor ( const trpgColor )

Set base material color.

void trpgMaterial::SetAmbient ( const trpgColor )

Ambient color.

void trpgMaterial::SetDiffuse ( const trpgColor )

Diffuse color (the most commonly used)

void trpgMaterial::SetSpecular ( const trpgColor )

Specular color used in lighting.

void trpgMaterial::SetEmission ( const trpgColor )

Emissive color used in lighting.

void trpgMaterial::SetShininess ( float64  )

Shininess used in lighting.

void trpgMaterial::SetShadeModel ( int  )

Shading model.

void trpgMaterial::SetPointSize ( float64  )

Point size.

void trpgMaterial::SetLineWidth ( float64  )

Line width.

void trpgMaterial::SetCullMode ( int  )

Cull mode. See GetCullMode.

void trpgMaterial::SetAlphaFunc ( int  )

Alpha Function. See GetAlphaFunc.

void trpgMaterial::SetAlphaRef ( float64  )

Alpha Ref value. See GetAlphaRef.

void trpgMaterial::SetAlpha ( float64  )

Alpha value for any polygon using this material.

void trpgMaterial::SetAutoNormal ( bool  )

Generate normals automatically from geometry.

void trpgMaterial::SetNumTexture ( int  )
void trpgMaterial::SetTexture ( int  no,
int  id,
const trpgTextureEnv  
)
int trpgMaterial::AddTexture ( int  ,
const trpgTextureEnv  
)
void trpgMaterial::SetNumTiles ( int  )

Number of tiles this material is used in.

int trpgMaterial::AddTile ( void  )

Adds a count to the number of tiles this material is used in and returns that number.

void trpgMaterial::SetIsBumpMap ( bool  )

Sets bump map status (color etc... isn't important)

void trpgMaterial::SetAttr ( int  attrCode,
int  val 
)
bool trpgMaterial::GetColor ( trpgColor ) const

Return the current color.

bool trpgMaterial::GetAmbient ( trpgColor ) const

Returns the ambient color.

bool trpgMaterial::GetDiffuse ( trpgColor ) const

Returns the diffuse color (the most commonly used color)

bool trpgMaterial::GetSpecular ( trpgColor ) const

Specular color used for lighting.

bool trpgMaterial::GetEmission ( trpgColor ) const

Emissive color used for lighting.

bool trpgMaterial::GetShininess ( float64 ) const

Shininess used for lighting.

bool trpgMaterial::GetShadeModel ( int ) const

The shading model can be either Smooth or Flat.

bool trpgMaterial::GetPointSize ( float64 ) const

Point size.

bool trpgMaterial::GetLineWidth ( float64 ) const

Line width.

bool trpgMaterial::GetCullMode ( int ) const
bool trpgMaterial::GetAlphaFunc ( int ) const
bool trpgMaterial::GetAlphaRef ( float64 ) const
bool trpgMaterial::GetAutoNormal ( bool ) const

Whether or not to generate normals from geometry.

bool trpgMaterial::GetAlpha ( float64 ) const

A single Alpha value that applies to any polygons using this material.

bool trpgMaterial::GetNumTile ( int ) const
bool trpgMaterial::GetNumTexture ( int ) const
bool trpgMaterial::GetTexture ( int  no,
int id,
trpgTextureEnv  
) const
bool trpgMaterial::GetIsBumpMap ( bool ) const

Return whether or not this material is a bump map.

bool trpgMaterial::GetAttr ( int  attrCode,
int val 
) const

Get an attribute (e.g. fid/smc)

Referenced by txp::TXPArchive::SetUserDataToMaterialAttributes().

bool trpgMaterial::isValid ( void  ) const

Validity check.

Reimplemented from trpgCheckable.

void trpgMaterial::Reset ( void  )
virtual

Resets the contents back to empty.

Implements trpgReadWriteable.

bool trpgMaterial::Write ( trpgWriteBuffer )
virtual

Writes this class to a write buffer.

Implements trpgReadWriteable.

bool trpgMaterial::Read ( trpgReadBuffer )
virtual

Reads this class from a read buffer.

Reimplemented from trpgReadWriteable.

bool trpgMaterial::Print ( trpgPrintBuffer ) const
virtual

Prints this class to a print buffer.

Reimplemented from trpgReadWriteable.

Friends And Related Function Documentation

friend class trpgMatTable
friend

Member Data Documentation

bool trpgMaterial::isBump
protected

Note: Need to do equality operator.

trpgColor trpgMaterial::color
protected
trpgColor trpgMaterial::ambient
protected
trpgColor trpgMaterial::diffuse
protected
trpgColor trpgMaterial::specular
protected
trpgColor trpgMaterial::emission
protected
float64 trpgMaterial::shininess
protected
int trpgMaterial::shadeModel
protected
float64 trpgMaterial::pointSize
protected
float64 trpgMaterial::lineWidth
protected
int trpgMaterial::cullMode
protected
int trpgMaterial::alphaFunc
protected
float64 trpgMaterial::alpha
protected
float64 trpgMaterial::alphaRef
protected
bool trpgMaterial::autoNormal
protected
int trpgMaterial::numTex
protected
int32 trpgMaterial::numTile
protected
struct trpgMaterial::_attrSet trpgMaterial::attrSet
protected
std::vector<int> trpgMaterial::texids
protected
std::vector<trpgTextureEnv> trpgMaterial::texEnvs
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)