D3D9::FixedVertexShader::Light Struct Reference

This class represent set of legacy D3D "hardware light" properties. More...

#include <dx9_wrap_fixed.h>

List of all members.

Public Member Functions

 Light ()
 Creates default legacy light.

void set_type (D3DLIGHTTYPE type)
 Set type of the light (directional, point, or spotlight).

void set_range (math::scalar_t range)
 Set light range.

void set_position (const math::vector4 &pos)
 Set light position vector.

void set_direction (const math::vector4 &dir)
 Set light direction vector.

void set_spotlight_params (math::scalar_t theta, math::scalar_t phi, math::scalar_t falloff)
 Set light spotlight parameters (theta, phi, and falloff values).

void set_attenuation (math::scalar_t linear, math::scalar_t squared, math::scalar_t exponential)
 Set attenuation factors.

void set_diffuse (math::scalar_t r, math::scalar_t g, math::scalar_t b)
 Set diffuse color for the legacy vertex light.

void set_specular (math::scalar_t r, math::scalar_t g, math::scalar_t b)
 Set specular color for the legacy vertex light.

void set_ambient (math::scalar_t r, math::scalar_t g, math::scalar_t b)
 Set ambient color for the legacy vertex light.


Detailed Description

This class represent set of legacy D3D "hardware light" properties.


Constructor & Destructor Documentation

D3D9::FixedVertexShader::Light::Light  )  [inline]
 

Creates default legacy light.

Default settings are:

  • Type = D3DLIGHT_DIRECTIONAL;
  • Diffuse = D3DXCOLOR(1.0f, 1.0f, 1.0f, 0.0f);
  • Specular = D3DXCOLOR(0.0f, 0.0f, 0.0f, 0.0f);
  • Ambient = D3DXCOLOR(0.0f, 0.0f, 0.0f, 0.0f);
  • Position = D3DXVECTOR3(0,0,0);
  • Direction = D3DXVECTOR3(0,0,1);
  • Range = 0;
  • Falloff = 0;
  • Attenuation0 = 0;
  • Attenuation1 = 0;
  • Attenuation2 = 0;
  • Theta = 0;
  • Phi = 0;


Member Function Documentation

void D3D9::FixedVertexShader::Light::set_type D3DLIGHTTYPE  type  )  [inline]
 

Set type of the light (directional, point, or spotlight).

void D3D9::FixedVertexShader::Light::set_range math::scalar_t  range  )  [inline]
 

Set light range.

Note:
Only affects point and spotlights.

void D3D9::FixedVertexShader::Light::set_position const math::vector4 pos  )  [inline]
 

Set light position vector.

Note:
Only affects point and spotlights.

void D3D9::FixedVertexShader::Light::set_direction const math::vector4 dir  )  [inline]
 

Set light direction vector.

Note:
Only affects directional and spotlights.

void D3D9::FixedVertexShader::Light::set_spotlight_params math::scalar_t  theta,
math::scalar_t  phi,
math::scalar_t  falloff
[inline]
 

Set light spotlight parameters (theta, phi, and falloff values).

Note:
Only affects spotlights.

void D3D9::FixedVertexShader::Light::set_attenuation math::scalar_t  linear,
math::scalar_t  squared,
math::scalar_t  exponential
[inline]
 

Set attenuation factors.

Note:
Only affects ??? light types.
Todo:
Find out what types of lights are affected by attenuation and update documentation of this method :)

void D3D9::FixedVertexShader::Light::set_diffuse math::scalar_t  r,
math::scalar_t  g,
math::scalar_t  b
[inline]
 

Set diffuse color for the legacy vertex light.

void D3D9::FixedVertexShader::Light::set_specular math::scalar_t  r,
math::scalar_t  g,
math::scalar_t  b
[inline]
 

Set specular color for the legacy vertex light.

void D3D9::FixedVertexShader::Light::set_ambient math::scalar_t  r,
math::scalar_t  g,
math::scalar_t  b
[inline]
 

Set ambient color for the legacy vertex light.


The documentation for this struct was generated from the following file:
Generated on Sun May 1 17:34:30 2005 for RealityStrike Game Engine API by doxygen 1.3.6