|
0 A.D. | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class CLightEnv: description of a lighting environment - contains all the necessary parameters for representation of the lighting within a scenario
Field Summary | |
private float |
m_Elevation
m_Elevation: Height of sun above the horizon, in radians. |
private float |
m_Rotation
m_Rotation: Direction of sun on the compass, in radians. |
RGBColor |
m_SunColor
|
private CVector3D |
m_SunDir
|
RGBColor |
m_TerrainAmbientColor
|
private float |
m_TerrainShadowTransparency
m_TerrainShadowTransparency: Fraction of diffuse light that reaches shadowed terrain. |
RGBColor |
m_UnitsAmbientColor
|
Constructor Summary | |
CLightEnv()
========================================================================= File : LightEnv. |
Method Summary | |
private void |
CalculateSunDirection()
|
void |
EvaluateDirect( const CVector3D& normal, RGBColor& color ) const
EvaluateDirect: Like EvaluateTerrain and EvaluateUnit, but return only the direct sunlight term without ambient. |
void |
EvaluateTerrain( const CVector3D& normal, RGBColor& color ) const
EvaluateTerrain: Calculate brightness of a point of the terrain with the given normal vector. |
void |
EvaluateUnit( const CVector3D& normal, RGBColor& color ) const
EvaluateUnit: Calculate brightness of a point of a unit with the given normal vector. |
float |
GetElevation() const
|
float |
GetRotation() const
|
const CVector3D& |
GetSunDir() const
|
float |
GetTerrainShadowTransparency() const
|
bool |
operator!=( const CLightEnv& o ) const
|
bool |
operator==( const CLightEnv& o ) const
|
void |
SetElevation( float f )
|
void |
SetRotation( float f )
|
void |
SetTerrainShadowTransparency( float f )
|
Field Detail |
private float m_Elevation;
private float m_Rotation;
public RGBColor m_SunColor;
private CVector3D m_SunDir;
public RGBColor m_TerrainAmbientColor;
private float m_TerrainShadowTransparency;
public RGBColor m_UnitsAmbientColor;
Constructor Detail |
public CLightEnv();
Method Detail |
private void CalculateSunDirection();
public void EvaluateDirect( const CVector3D& normal, RGBColor& color ) const;
normal
- normal vector (must have length 1)
color
- resulting colorpublic void EvaluateTerrain( const CVector3D& normal, RGBColor& color ) const;
normal
- normal vector (must have length 1)
color
- resulting colorpublic void EvaluateUnit( const CVector3D& normal, RGBColor& color ) const;
normal
- normal vector (must have length 1)
color
- resulting colorpublic float GetElevation() const;
public float GetRotation() const;
public const CVector3D& GetSunDir() const;
public float GetTerrainShadowTransparency() const;
public bool operator!=( const CLightEnv& o ) const;
public bool operator==( const CLightEnv& o ) const;
public void SetElevation( float f );
public void SetRotation( float f );
public void SetTerrainShadowTransparency( float f );
|
0 A.D.
Generated on September 04, 2007 at 18:13 CppDoc v2.4.0 |
|||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |