Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

VPMaterial Class Reference

Material properties for graphical objects. More...

#include <vpmaterial.h>

List of all members.

Public Member Functions

 VPMaterial ()
 VPMaterial (const VPMaterial &m)
 VPMaterial (const VPColor &c)
 Creates plastic-looking material of given color.
 VPMaterial (const VPTexture &t)
 VPMaterial (const VPColor &c, float spc, float amb, float ems, float shi)
 Sets all colors to be shades of one single color.
VPMaterialoperator= (const VPMaterial &m)
void SetDiffuseColor (const VPColor &c)
 Sets the diffuse color (main color) of the material.
const VPColorGetDiffuseColor () const
 Returns the diffuse color.
void SetSpecularColor (const VPColor &c)
 Sets the specular color (highlight color) of the material.
void SetAmbientColor (const VPColor &c)
 Sets the ambient color of the material.
void SetEmissiveColor (const VPColor &c)
 Sets the emissive color of the material.
void SetShininess (float newValue)
 Set the shininess of the material.
bool DrawOGL () const
 Draws the material using OpenGL engine.

Static Public Member Functions

static const VPMaterialLIGHT_PLASTIC_GRAY ()
static const VPMaterialDARK_PLASTIC_GRAY ()
static const VPMaterialPLASTIC_RED ()
static const VPMaterialPLASTIC_GREEN ()
static const VPMaterialPLASTIC_BLUE ()


Detailed Description

Material properties for graphical objects.

FixMe: Put detailed description here.

Definition at line 20 of file vpmaterial.h.


Constructor & Destructor Documentation

VPMaterial::VPMaterial  ) 
 

Definition at line 23 of file vpmaterial.cpp.

VPMaterial::VPMaterial const VPMaterial m  ) 
 

Definition at line 27 of file vpmaterial.cpp.

References ambient, color, emissive, shininess, and specular.

VPMaterial::VPMaterial const VPColor c  ) 
 

Creates plastic-looking material of given color.

Definition at line 36 of file vpmaterial.cpp.

References VPColor::GetScaled().

VPMaterial::VPMaterial const VPTexture t  ) 
 

Definition at line 45 of file vpmaterial.cpp.

VPMaterial::VPMaterial const VPColor c,
float  spc,
float  amb,
float  ems,
float  shi
 

Sets all colors to be shades of one single color.

Definition at line 49 of file vpmaterial.cpp.

References VPColor::GetScaled().


Member Function Documentation

const VPMaterial & VPMaterial::DARK_PLASTIC_GRAY  )  [static]
 

Definition at line 74 of file vpmaterial.cpp.

Referenced by VPMeshObject::MakeBox().

bool VPMaterial::DrawOGL  )  const
 

Draws the material using OpenGL engine.

Returns:
false if VPAT has not been compiled with OpenGL support.

Definition at line 98 of file vpmaterial.cpp.

References VPColor::Get().

Referenced by VPSphere::DrawInstanceOGL(), and VPMesh::DrawInstanceOGL().

const VPColor& VPMaterial::GetDiffuseColor  )  const [inline]
 

Returns the diffuse color.

Definition at line 35 of file vpmaterial.h.

const VPMaterial & VPMaterial::LIGHT_PLASTIC_GRAY  )  [static]
 

Definition at line 68 of file vpmaterial.cpp.

VPMaterial & VPMaterial::operator= const VPMaterial m  ) 
 

Definition at line 58 of file vpmaterial.cpp.

References ambient, color, emissive, shininess, and specular.

const VPMaterial & VPMaterial::PLASTIC_BLUE  )  [static]
 

Definition at line 92 of file vpmaterial.cpp.

References VPColor::BLUE().

const VPMaterial & VPMaterial::PLASTIC_GREEN  )  [static]
 

Definition at line 86 of file vpmaterial.cpp.

References VPColor::GREEN().

const VPMaterial & VPMaterial::PLASTIC_RED  )  [static]
 

Definition at line 80 of file vpmaterial.cpp.

References VPColor::RED().

void VPMaterial::SetAmbientColor const VPColor c  )  [inline]
 

Sets the ambient color of the material.

Definition at line 39 of file vpmaterial.h.

void VPMaterial::SetDiffuseColor const VPColor c  )  [inline]
 

Sets the diffuse color (main color) of the material.

Definition at line 33 of file vpmaterial.h.

void VPMaterial::SetEmissiveColor const VPColor c  )  [inline]
 

Sets the emissive color of the material.

Definition at line 41 of file vpmaterial.h.

void VPMaterial::SetShininess float  newValue  )  [inline]
 

Set the shininess of the material.

According to the "OpenGL programming guide" (red book), shininess should be in the range of 0.0 (no shininess) to 128.0 (very shiny).

Definition at line 47 of file vpmaterial.h.

void VPMaterial::SetSpecularColor const VPColor c  )  [inline]
 

Sets the specular color (highlight color) of the material.

Definition at line 37 of file vpmaterial.h.


The documentation for this class was generated from the following files:
Generated on Tue Sep 6 10:00:16 2005 for VPAT by  doxygen 1.4.4