OpenGLPrakt --> cObject --> cMaterial
a class for representation of an OpenGL material
This is thought to be the base material class.
It might be derived from it later. (e.g. for Texturing)
public cMaterial ( const char * name = NULL ) ;
default constructor
name | optional name of object |
public cMaterial ( const cADSEColor & color = cADSEColor ( ) , const int shininess = 0 , const char * name = NULL ) ;
constructor with full initialization
color | material's color (cADSEColor object) |
shininess | how shiny is the surface (0..128) |
name | optional name of object |
public virtual ~ cMaterial ( ) ;
destructor
protected cADSEColor mColor
color of material
protected cADSEColor mOldFrontColor
we need to restore the material which was active before Activate()
protected GLfloat mOldFrontShininess
protected cADSEColor mOldBackColor
we later need to restore back color too
protected GLfloat mOldBackShininess
protected int mShininess
shininess of material
public virtual int Init ( ) ;
not used, but if omitted, it might not be overloaded later
public virtual void StartMaterialUse ( ) ;
start using the material's properties
This is only neccessary to embed a cMaterial into a cVisibleObject. We cannot use Activate() there since it will call cObject::Activate() which in turn calls Deactivate() so the material settings are undone before the object gets drawn.
public virtual void EndMaterialUse ( ) ;
end using the material's properties
protected virtual const char * GetDefaultName ( ) const ;
protected virtual void Activate ( ) ;
activate material
protected virtual void Deactivate ( ) ;
deactivate material
This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.
Click here to return to the top of the page.