NL3D::UInstanceMaterial Class Reference

#include <u_instance_material.h>

Inheritance diagram for NL3D::UInstanceMaterial:

NL3D::CInstanceMaterialUser

Detailed Description

Base interface for manipulating Material retrieved from UInstance.
Author:
Lionel Berenguier

Nevrax France

Date:
2001

Definition at line 48 of file u_instance_material.h.

Public Types

enum  TBlend {
  one = 0, zero, srcalpha, invsrcalpha,
  srccolor, invsrccolor, blendCount
}

Public Member Functions

Texture files specific
virtual void emptyTexture (uint stage=0)=0
virtual sint getLastTextureStage () const=0
 Get the last stage that got a texture. -1 means there is no textures.

virtual std::string getTextureFileName (uint stage=0) const=0
 Get the fileName used by the n-th texture file. (must be a texture file or an assertion is raised).

virtual bool isTextureFile (uint stage=0) const=0
 Check wether the texture of the n-th stage is a texture file.

virtual void setTextureFileName (const std::string &fileName, uint stage=0)=0
Texture matrix
virtual void enableUserTexMat (uint stage, bool enabled=true)=0
virtual const NLMISC::CMatrixgetUserTexMat (uint stage) const=0
virtual bool isUserTexMatEnabled (uint stage) const=0
virtual void setUserTexMat (uint stage, const NLMISC::CMatrix &m)=0
 Set a new texture matrix for the given stage.

Lighted material mgt. Has effect only if isLighted().
virtual CRGBA getAmbient () const=0
virtual CRGBA getDiffuse () const=0
 return diffuse part. NB: A==opacity.

virtual CRGBA getEmissive () const=0
virtual uint8 getOpacity () const=0
virtual float getShininess () const=0
virtual CRGBA getSpecular () const=0
virtual void setAmbient (CRGBA ambient=CRGBA(0, 0, 0))=0
 Set the Ambient part ot material. Usefull only if isLighted().

virtual void setDiffuse (CRGBA diffuse=CRGBA(0, 0, 0))=0
 Set the Diffuse part ot material. Usefull only if isLighted().

virtual void setEmissive (CRGBA emissive=CRGBA(0, 0, 0))=0
 Set the emissive part ot material. Usefull only if isLighted().

virtual void setOpacity (uint8 opa)=0
 Set the Opacity part ot material. Usefull only if isLighted().

virtual void setShininess (float shininess)=0
 Set the shininess part ot material. Usefull only if isLighted().

virtual void setSpecular (CRGBA specular=CRGBA(0, 0, 0))=0
 Set the specular part ot material. Usefull only if isLighted().

Blending.
virtual bool getBlend () const=0
virtual TBlend getDstBlend (void) const=0
virtual TBlend getSrcBlend (void) const=0
virtual void setAlphaTestThreshold (float at)=0
virtual void setBlend (bool active)=0
virtual void setBlendFunc (TBlend src, TBlend dst)=0
virtual void setDstBlend (TBlend val)=0
virtual void setSrcBlend (TBlend val)=0
virtual void setZWrite (bool active)=0
UnLighted material mgt. Has effect only if !isLighted().
virtual CRGBA getColor (void) const=0
virtual void setColor (CRGBA rgba)=0
Per stage constant color
virtual NLMISC::CRGBA getConstantColor (uint stage) const=0
virtual void setConstantColor (uint stage, NLMISC::CRGBA color)=0
Texture UserColor. No effect if !isUserColor(). (getUserColor() return CRGBA(0,0,0,0))
virtual CRGBA getUserColor () const=0
virtual void setUserColor (CRGBA userColor)=0
Modes.
virtual bool isLighted () const=0
virtual bool isUserColor () const=0

Protected Member Functions

Object
 UInstanceMaterial ()
virtual ~UInstanceMaterial ()


Member Enumeration Documentation

enum NL3D::UInstanceMaterial::TBlend
 

Enumeration values:
one 
zero 
srcalpha 
invsrcalpha 
srccolor 
invsrccolor 
blendCount 

Definition at line 59 of file u_instance_material.h.


Constructor & Destructor Documentation

NL3D::UInstanceMaterial::UInstanceMaterial  )  [inline, protected]
 

Definition at line 54 of file u_instance_material.h.

00054 {}

virtual NL3D::UInstanceMaterial::~UInstanceMaterial  )  [inline, protected, virtual]
 

Definition at line 55 of file u_instance_material.h.

00055 {}


Member Function Documentation

virtual void NL3D::UInstanceMaterial::emptyTexture uint  stage = 0  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::enableUserTexMat uint  stage,
bool  enabled = true
[pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual CRGBA NL3D::UInstanceMaterial::getAmbient  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual bool NL3D::UInstanceMaterial::getBlend  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual CRGBA NL3D::UInstanceMaterial::getColor void   )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual NLMISC::CRGBA NL3D::UInstanceMaterial::getConstantColor uint  stage  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual CRGBA NL3D::UInstanceMaterial::getDiffuse  )  const [pure virtual]
 

return diffuse part. NB: A==opacity.

Implemented in NL3D::CInstanceMaterialUser.

virtual TBlend NL3D::UInstanceMaterial::getDstBlend void   )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual CRGBA NL3D::UInstanceMaterial::getEmissive  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual sint NL3D::UInstanceMaterial::getLastTextureStage  )  const [pure virtual]
 

Get the last stage that got a texture. -1 means there is no textures.

Implemented in NL3D::CInstanceMaterialUser.

virtual uint8 NL3D::UInstanceMaterial::getOpacity  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual float NL3D::UInstanceMaterial::getShininess  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual CRGBA NL3D::UInstanceMaterial::getSpecular  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual TBlend NL3D::UInstanceMaterial::getSrcBlend void   )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual std::string NL3D::UInstanceMaterial::getTextureFileName uint  stage = 0  )  const [pure virtual]
 

Get the fileName used by the n-th texture file. (must be a texture file or an assertion is raised).

Implemented in NL3D::CInstanceMaterialUser.

virtual CRGBA NL3D::UInstanceMaterial::getUserColor  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual const NLMISC::CMatrix& NL3D::UInstanceMaterial::getUserTexMat uint  stage  )  const [pure virtual]
 

Get a const ref. on the texture matrix of the n-th stage.

Implemented in NL3D::CInstanceMaterialUser.

virtual bool NL3D::UInstanceMaterial::isLighted  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual bool NL3D::UInstanceMaterial::isTextureFile uint  stage = 0  )  const [pure virtual]
 

Check wether the texture of the n-th stage is a texture file.

Implemented in NL3D::CInstanceMaterialUser.

virtual bool NL3D::UInstanceMaterial::isUserColor  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual bool NL3D::UInstanceMaterial::isUserTexMatEnabled uint  stage  )  const [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setAlphaTestThreshold float  at  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setAmbient CRGBA  ambient = CRGBA(0, 0, 0)  )  [pure virtual]
 

Set the Ambient part ot material. Usefull only if isLighted().

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setBlend bool  active  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setBlendFunc TBlend  src,
TBlend  dst
[pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setColor CRGBA  rgba  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setConstantColor uint  stage,
NLMISC::CRGBA  color
[pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setDiffuse CRGBA  diffuse = CRGBA(0, 0, 0)  )  [pure virtual]
 

Set the Diffuse part ot material. Usefull only if isLighted().

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setDstBlend TBlend  val  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setEmissive CRGBA  emissive = CRGBA(0, 0, 0)  )  [pure virtual]
 

Set the emissive part ot material. Usefull only if isLighted().

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setOpacity uint8  opa  )  [pure virtual]
 

Set the Opacity part ot material. Usefull only if isLighted().

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setShininess float  shininess  )  [pure virtual]
 

Set the shininess part ot material. Usefull only if isLighted().

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setSpecular CRGBA  specular = CRGBA(0, 0, 0)  )  [pure virtual]
 

Set the specular part ot material. Usefull only if isLighted().

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setSrcBlend TBlend  val  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setTextureFileName const std::string &  fileName,
uint  stage = 0
[pure virtual]
 

Set the fileName used by the n-th texture file. (must be a texture file or an assertion is raised) NB: if success and if instanceOwner->getAsyncTextureMode()==true, then instanceOwner->setAsyncTextureDirty(true) is called

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setUserColor CRGBA  userColor  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setUserTexMat uint  stage,
const NLMISC::CMatrix m
[pure virtual]
 

Set a new texture matrix for the given stage.

Implemented in NL3D::CInstanceMaterialUser.

virtual void NL3D::UInstanceMaterial::setZWrite bool  active  )  [pure virtual]
 

Implemented in NL3D::CInstanceMaterialUser.


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 08:45:47 2004 for NeL by doxygen 1.3.6