NL3D::UMaterial Class Reference

#include <u_material.h>

Inheritance diagram for NL3D::UMaterial:

NL3D::CMaterialUser

Detailed Description

Game Interface for Material. Material for gamers are Unlighted materials!! Only normal material unlighted is supported.
Author:
Lionel Berenguier

Nevrax France

Date:
2001

Definition at line 49 of file u_material.h.

Public Types

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

Public Member Functions

Blending.
virtual bool getBlend () const=0
virtual TBlend getDstBlend (void) const=0
virtual TBlend getSrcBlend (void) const=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
Color/Lighting..
virtual CRGBA getColor (void) const=0
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).

Culling
virtual bool getDoubleSided () const=0
virtual void setDoubleSided (bool doubleSided=true)=0
ZBuffer.
virtual float getZBias (void) const=0
virtual ZFunc getZFunc (void) const=0
virtual bool getZWrite (void) const=0
virtual void setZBias (float val)=0
virtual void setZFunc (ZFunc val)=0
virtual void setZWrite (bool active)=0
Misc
virtual void initUnlit ()=0
Texture.
virtual void selectTextureSet (uint id)=0
 select from a texture set for this material (if available)

virtual void setTexture (UTexture *ptex)=0
 select from a texture set for this material (if available)

virtual void setTexture (uint stage, UTexture *ptex)=0
 select from a texture set for this material (if available)

virtual bool texturePresent ()=0
 select from a texture set for this material (if available)

virtual bool texturePresent (uint stage)=0
 select from a texture set for this material (if available)

Texture environnement.
virtual void texEnvArg0Alpha (uint stage, TTexSource src, TTexOperand oper)=0
virtual void texEnvArg0RGB (uint stage, TTexSource src, TTexOperand oper)=0
virtual void texEnvArg1Alpha (uint stage, TTexSource src, TTexOperand oper)=0
virtual void texEnvArg1RGB (uint stage, TTexSource src, TTexOperand oper)=0
virtual void texEnvOpAlpha (uint stage, TTexOperator ope)=0
virtual void texEnvOpRGB (uint stage, TTexOperator ope)=0

Protected Member Functions

Object
 UMaterial ()
virtual ~UMaterial ()


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.

enum NL3D::UMaterial::TTexOperand
 

Operand for the argument. For Alpha arguments, only SrcAlpha and InvSrcAlpha are Valid!!
SrcColor: arg= ColorSource. InvSrcColor: arg= 1-ColorSource. SrcAlpha: arg= AlphaSource. InvSrcAlpha: arg= 1-AlphaSource.

Enumeration values:
SrcColor 
InvSrcColor 
SrcAlpha 
InvSrcAlpha 

Definition at line 94 of file u_material.h.

enum NL3D::UMaterial::TTexOperator
 

Environements operators: Replace: out= arg0 Modulate: out= arg0 * arg1 Add: out= arg0 + arg1 AddSigned: out= arg0 + arg1 -0.5 Interpolate*: out= arg0*As + arg1*(1-As), where As is taken from the SrcAlpha of Texture/Previous/Diffuse/Constant, respectively if operator is InterpolateTexture/InterpolatePrevious/InterpolateDiffuse/InterpolateConstant. EMBM : apply to both color and alpha : the current texture, whose format is DSDT, is used to offset the texture in the next stage. NB : for EMBM and InterpolateConstant, this must be supported by driver.

Enumeration values:
Replace 
Modulate 
Add 
AddSigned 
InterpolateTexture 
InterpolatePrevious 
InterpolateDiffuse 
InterpolateConstant 
EMBM 

Definition at line 76 of file u_material.h.

enum NL3D::UMaterial::TTexSource
 

Source argument. Texture: the arg is taken from the current texture of the stage. Previous: the arg is taken from the previous enabled stage. If stage 0, Previous==Diffuse. Diffuse: the arg is taken from the primary color vertex. Constant: the arg is taken from the constant color setuped for this texture stage.

Enumeration values:
Texture 
Previous 
Diffuse 
Constant 

Definition at line 85 of file u_material.h.

00085 { Texture=0, Previous, Diffuse, Constant };

enum NL3D::UMaterial::ZFunc
 

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

Definition at line 60 of file u_material.h.


Constructor & Destructor Documentation

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

Definition at line 55 of file u_material.h.

00055 {}

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

Definition at line 56 of file u_material.h.

00056 {}


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]
 

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

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::setTexture uint  stage,
UTexture ptex
[pure virtual]
 

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

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 void NL3D::UMaterial::texEnvArg0Alpha uint  stage,
TTexSource  src,
TTexOperand  oper
[pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::texEnvArg0RGB uint  stage,
TTexSource  src,
TTexOperand  oper
[pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::texEnvArg1Alpha uint  stage,
TTexSource  src,
TTexOperand  oper
[pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::texEnvArg1RGB uint  stage,
TTexSource  src,
TTexOperand  oper
[pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::texEnvOpAlpha uint  stage,
TTexOperator  ope
[pure virtual]
 

Implemented in NL3D::CMaterialUser.

virtual void NL3D::UMaterial::texEnvOpRGB uint  stage,
TTexOperator  ope
[pure virtual]
 

Implemented in NL3D::CMaterialUser.

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

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

Implemented in NL3D::CMaterialUser.

virtual bool NL3D::UMaterial::texturePresent uint  stage  )  [pure virtual]
 

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

Implemented in NL3D::CMaterialUser.


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