DigitalSpaces::DIOGRELight Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

void SetLightType (OGRELightTypes type)
 Sets the type of light - see OGRELightTypes for more info.
OGRELightTypes GetLightType (void)
 Returns the light type.
void SetDiffuseColour (float red, float green, float blue)
 Sets the colour of the diffuse light given off by this source.
void SetDiffuseColour (in_Vector3f *colour)
 Sets the colour of the diffuse light given off by this source.
void GetDiffuseColour (out_Vector4f *colour)
 Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).
void SetSpecularColour (float red, float green, float blue)
 Sets the colour of the specular light given off by this source.
void SetSpecularColour (in_Vector4f *colour)
 Sets the colour of the specular light given off by this source.
void GetSpecularColour (out_Vector4f *colour)
 Returns the colour of specular light given off by this light source.
void SetAttenuation (float range, float constant, float linear, float quadratic)
 Sets the attenuation parameters of the light source ie how it diminishes with distance.
float GetAttenuationRange (void)
 Returns the absolute upper range of the light.
float GetAttenuationConstant (void)
 Returns the constant factor in the attenuation formula.
float GetAttenuationLinear (void)
 Returns the linear factor in the attenuation formula.
float GetAttenuationQuadric (void)
 Returns the quadric factor in the attenuation formula.
void SetPosition (float x, float y, float z)
 Sets the position of the light.
void SetPosition (in_Vector3f *vec)
 Sets the position of the light.
void GetPosition (out_Vector3f *vec)
 Returns the position of the light.
void SetDirection (float x, float y, float z)
 Sets the direction in which a light points.
void SetDirection (in_Vector3f *vec)
 Sets the direction in which a light points.
void GetDirection (out_Vector3f *vec)
 Returns the light's direction.
void SetSpotlightRangeRadian (const float innerAngle, const float outerAngle)
 Sets the range of a spotlight, i.e.
void SetSpotlightRangeRadian (const float innerAngle, const float outerAngle, float falloff)
void SetSpotlightRangeDegree (const float innerAngle, const float outerAngle)
void SetSpotlightRangeDegree (const float innerAngle, const float outerAngle, float falloff)
float GetSpotlightInnerAngleRadian (void)
 Returns the angle covered by the spotlights inner cone.
float GetSpotlightInnerAngleDegree (void)
float GetSpotlightOuterAngleRadian (void)
 Returns the angle covered by the spotlights outer cone.
float GetSpotlightOuterAngleDegree (void)
float GetSpotlightFalloff (void)
 Returns the falloff between the inner and outer cones of the spotlight.
void GetDerivedPosition (out_Vector3f *vec)
 Retrieves the position of the light including any transform from nodes it is attached to.
void GetDerivedDirection (out_Vector3f *vec)
 Retrieves the direction of the light including any transform from nodes it is attached to.
void SetVisible (bool visible)
 Overridden from MovableObject.
void GetAs4DVector (out_Vector4f *vec)
 Gets the details of this light as a 4D vector.

Member Function Documentation

void DigitalSpaces::DIOGRELight::SetLightType ( OGRELightTypes  type  ) 

Sets the type of light - see OGRELightTypes for more info.

OGRELightTypes DigitalSpaces::DIOGRELight::GetLightType ( void   ) 

Returns the light type.

void DigitalSpaces::DIOGRELight::SetDiffuseColour ( float  red,
float  green,
float  blue 
)

Sets the colour of the diffuse light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.
Diffuse light simulates the typical light emenating from light sources and affects the base colour of objects together with ambient light.

void DigitalSpaces::DIOGRELight::SetDiffuseColour ( in_Vector3f colour  ) 

Sets the colour of the diffuse light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.
Diffuse light simulates the typical light emenating from light sources and affects the base colour of objects together with ambient light.

void DigitalSpaces::DIOGRELight::GetDiffuseColour ( out_Vector4f colour  ) 

Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).

void DigitalSpaces::DIOGRELight::SetSpecularColour ( float  red,
float  green,
float  blue 
)

Sets the colour of the specular light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.
Specular light affects the appearance of shiny highlights on objects, and is also dependent on the 'shininess' Material value.

void DigitalSpaces::DIOGRELight::SetSpecularColour ( in_Vector4f colour  ) 

Sets the colour of the specular light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.
Specular light affects the appearance of shiny highlights on objects, and is also dependent on the 'shininess' Material value.

void DigitalSpaces::DIOGRELight::GetSpecularColour ( out_Vector4f colour  ) 

Returns the colour of specular light given off by this light source.

void DigitalSpaces::DIOGRELight::SetAttenuation ( float  range,
float  constant,
float  linear,
float  quadratic 
)

Sets the attenuation parameters of the light source ie how it diminishes with distance.

Remarks:
Lights normally get fainter the further they are away. Also, each light is given a maximum range beyond which it cannot affect any objects.
Light attentuation is not applicable to directional lights since they have an infinite range and constant intensity.
This follows a standard attenuation approach - see any good 3D text for the details of what they mean since i don't have room here!
Parameters:
range The absolute upper range of the light in world units
constant The constant factor in the attenuation formula: 1.0 means never attenuate, 0.0 is complete attenuation
linear The linear factor in the attenuation formula: 1 means attenuate evenly over the distance
quadratic The quadratic factor in the attenuation formula: adds a curvature to the attenuation formula.

float DigitalSpaces::DIOGRELight::GetAttenuationRange ( void   ) 

Returns the absolute upper range of the light.

float DigitalSpaces::DIOGRELight::GetAttenuationConstant ( void   ) 

Returns the constant factor in the attenuation formula.

float DigitalSpaces::DIOGRELight::GetAttenuationLinear ( void   ) 

Returns the linear factor in the attenuation formula.

float DigitalSpaces::DIOGRELight::GetAttenuationQuadric ( void   ) 

Returns the quadric factor in the attenuation formula.

void DigitalSpaces::DIOGRELight::SetPosition ( float  x,
float  y,
float  z 
)

Sets the position of the light.

Remarks:
Applicable to point lights and spotlights only.
Note:
This will be overridden if the light is attached to a SceneNode.

void DigitalSpaces::DIOGRELight::SetPosition ( in_Vector3f vec  ) 

Sets the position of the light.

Remarks:
Applicable to point lights and spotlights only.
Note:
This will be overridden if the light is attached to a SceneNode.

void DigitalSpaces::DIOGRELight::GetPosition ( out_Vector3f vec  ) 

Returns the position of the light.

Note:
Applicable to point lights and spotlights only.

void DigitalSpaces::DIOGRELight::SetDirection ( float  x,
float  y,
float  z 
)

Sets the direction in which a light points.

Remarks:
Applicable only to the spotlight and directional light types.
Note:
This will be overridden if the light is attached to a SceneNode.

void DigitalSpaces::DIOGRELight::SetDirection ( in_Vector3f vec  ) 

Sets the direction in which a light points.

Remarks:
Applicable only to the spotlight and directional light types.
Note:
This will be overridden if the light is attached to a SceneNode.

void DigitalSpaces::DIOGRELight::GetDirection ( out_Vector3f vec  ) 

Returns the light's direction.

Remarks:
Applicable only to the spotlight and directional light types.

void DigitalSpaces::DIOGRELight::SetSpotlightRangeRadian ( const float  innerAngle,
const float  outerAngle 
)

Sets the range of a spotlight, i.e.

the angle of the inner and outer cones and the rate of falloff between them.

Parameters:
innerAngle Angle covered by the bright inner cone
outerAngle Angle covered by the outer cone
falloff The rate of falloff between the inner and outer cones. 1.0 means a linear falloff, less means slower falloff, higher means faster falloff.

void DigitalSpaces::DIOGRELight::SetSpotlightRangeRadian ( const float  innerAngle,
const float  outerAngle,
float  falloff 
)

void DigitalSpaces::DIOGRELight::SetSpotlightRangeDegree ( const float  innerAngle,
const float  outerAngle 
)

void DigitalSpaces::DIOGRELight::SetSpotlightRangeDegree ( const float  innerAngle,
const float  outerAngle,
float  falloff 
)

float DigitalSpaces::DIOGRELight::GetSpotlightInnerAngleRadian ( void   ) 

Returns the angle covered by the spotlights inner cone.

float DigitalSpaces::DIOGRELight::GetSpotlightInnerAngleDegree ( void   ) 

float DigitalSpaces::DIOGRELight::GetSpotlightOuterAngleRadian ( void   ) 

Returns the angle covered by the spotlights outer cone.

float DigitalSpaces::DIOGRELight::GetSpotlightOuterAngleDegree ( void   ) 

float DigitalSpaces::DIOGRELight::GetSpotlightFalloff ( void   ) 

Returns the falloff between the inner and outer cones of the spotlight.

void DigitalSpaces::DIOGRELight::GetDerivedPosition ( out_Vector3f vec  ) 

Retrieves the position of the light including any transform from nodes it is attached to.

void DigitalSpaces::DIOGRELight::GetDerivedDirection ( out_Vector3f vec  ) 

Retrieves the direction of the light including any transform from nodes it is attached to.

void DigitalSpaces::DIOGRELight::SetVisible ( bool  visible  ) 

Overridden from MovableObject.

Remarks:
Although lights themselves are not 'visible', setting a light to invisible means it no longer affects the scene.

void DigitalSpaces::DIOGRELight::GetAs4DVector ( out_Vector4f vec  ) 

Gets the details of this light as a 4D vector.

Remarks:
Getting details of a light as a 4D vector can be useful for doing general calculations between different light types; for example the vector can represent both position lights (w=1.0f) and directional lights (w=0.0f) and be used in the same calculations.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:31 2008 for Digital Spaces by  doxygen 1.5.6