# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::UMaterial Class Reference

Game Interface for Material. More...

#include <u_material.h>

Inheritance diagram for NL3D::UMaterial:

NL3D::CMaterialUser List of all members.

Public Types

enum  ZFunc {
  always = 0, never, equal, notequal,
  less, lessequal, greater, greaterequal,
  zfuncCount
}
enum  TBlend {
  one = 0, zero, srcalpha, invsrcalpha,
  srccolor, invsrccolor, blendCount
}

Public Methods

Texture.
virtual void setTexture (UTexture *ptex)=0
virtual bool texturePresent ()=0
virtual void selectTextureSet (uint id)=0
 select from a texture set for this material (if available). More...

Blending.
virtual void setBlend (bool active)=0
virtual void setBlendFunc (TBlend src, TBlend dst)=0
virtual void setSrcBlend (TBlend val)=0
virtual void setDstBlend (TBlend val)=0
virtual bool getBlend () const=0
virtual TBlend getSrcBlend (void) const=0
virtual TBlend getDstBlend (void) const=0
ZBuffer.
virtual void setZFunc (ZFunc val)=0
virtual void setZWrite (bool active)=0
virtual void setZBias (float val)=0
virtual ZFunc getZFunc (void) const=0
virtual bool getZWrite (void) const=0
virtual float getZBias (void) const=0
Color/Lighting..
virtual void setColor (CRGBA rgba)=0
 The Color is used only if lighting is disabled. Also, color is replaced by per vertex color (if any). More...

virtual CRGBA getColor (void) const=0
Culling
virtual void setDoubleSided (bool doubleSided=true)=0
virtual bool getDoubleSided () const=0
Misc
virtual void initUnlit ()=0
 Init the material as unlit. More...


Protected Methods

Object
 UMaterial ()
virtual ~UMaterial ()

Detailed Description

Game Interface for Material.

Material for gamers are Unlighted materials!! There is only One texture stage.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 49 of file u_material.h.


Member Enumeration Documentation

enum NL3D::UMaterial::TBlend
 

Enumeration values:
one 
zero 
srcalpha 
invsrcalpha 
srccolor 
invsrccolor 
blendCount 

Definition at line 61 of file u_material.h.

Referenced by NL3D::CMaterialUser::getDstBlend, NL3D::CMaterialUser::getSrcBlend, NL3D::CMaterialUser::setBlendFunc, NL3D::CMaterialUser::setDstBlend, and NL3D::CMaterialUser::setSrcBlend.

enum NL3D::UMaterial::ZFunc
 

Enumeration values:
always 
never 
equal 
notequal 
less 
lessequal 
greater 
greaterequal 
zfuncCount 

Definition at line 60 of file u_material.h.

Referenced by NL3D::CMaterialUser::getZFunc, and NL3D::CMaterialUser::setZFunc.


Constructor & Destructor Documentation

NL3D::UMaterial::UMaterial   [inline, protected]
 

Definition at line 55 of file u_material.h.

virtual NL3D::UMaterial::~UMaterial   [inline, protected, virtual]
 

Definition at line 56 of file u_material.h.


Member Function Documentation

virtual bool NL3D::UMaterial::getBlend   const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual CRGBA NL3D::UMaterial::getColor void    const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual bool NL3D::UMaterial::getDoubleSided   const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual TBlend NL3D::UMaterial::getDstBlend void    const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual TBlend NL3D::UMaterial::getSrcBlend void    const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual float NL3D::UMaterial::getZBias void    const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual ZFunc NL3D::UMaterial::getZFunc void    const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual bool NL3D::UMaterial::getZWrite void    const [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::initUnlit   [pure virtual]
 

Init the material as unlit.

normal shader, no lighting .... Default to: normal shader, no lighting, color to White(1,1,1,1), no texture, ZBias=0, ZFunc= lessequal, ZWrite==true, no blend. All other states are undefined (such as blend function, since blend is disabled).

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::selectTextureSet uint    id [pure virtual]
 

select from a texture set for this material (if available).

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setBlend bool    active [pure virtual]
 

Implemented in NL3D::CMaterialUser.

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

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setColor CRGBA    rgba [pure virtual]
 

The Color is used only if lighting is disabled. Also, color is replaced by per vertex color (if any).

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setDoubleSided bool    doubleSided = true [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setDstBlend TBlend    val [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setSrcBlend TBlend    val [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setTexture UTexture   ptex [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setZBias float    val [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setZFunc ZFunc    val [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setZWrite bool    active [pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual bool NL3D::UMaterial::texturePresent   [pure virtual]
 

Implemented in NL3D::CMaterialUser.


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