Public Member Functions | Protected Member Functions | Friends

VgEngine::VgLight Class Reference

This interface handles light management. More...

Inheritance diagram for VgEngine::VgLight:
Inheritance graph
[legend]
Collaboration diagram for VgEngine::VgLight:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void setAnimation (const std::string &pAnimationName, VgEngine::VgRefPtr< VgEngine::VgAnimation > pAnimation)
 Sets an animation on this light.
VgConstRefPtr< VgAnimationgetAnimation (const std::string &pName) const
 Gets an animation from the light's animation map.
VgRefPtr< VgAnimationeditAnimation (const std::string &pName)
 Gets an animation from the light's animation map for editing.
void getAnimationNames (std::list< std::string > &pNameList) const
 Gets the list of the stored animation names.
VgEngine::VgPosition getPosition () const
 Gets light's position.
void setPosition (const VgEngine::VgPosition &pPosition)
 Sets the light's position.
VgEngine::VgOrientation getOrientation () const
 Gets lights's orientation.
void setOrientation (const VgEngine::VgOrientation &pOrientation)
 Sets the light's orientation.
VgEngine::VgColor getAmbient () const
void setAmbient (const VgEngine::VgColor &pColor)
 Sets the ambient light color for the light.
VgEngine::VgColor getDiffuse () const
void setDiffuse (const VgEngine::VgColor &pColor)
 Sets the diffuse light color for the light.
VgEngine::VgColor getSpecular () const
void setSpecular (const VgEngine::VgColor &pColor)
 Sets the specular light color for the light.
VgEngine::VgColor getEmission () const
void setEmission (const VgEngine::VgColor &pColor)
 Sets the emission light color for the light.
double getSpotCutoff () const
void setSpotCutoff (double pCutoff)
 Sets the current spot cutoff value.
double getSpotExponent () const
void setSpotExponent (double pExponent)
 Sets the spot exponent.
bool isDirectional () const
 Tell if the light is directional.
void setDirectional (bool pDirectional)
 Sets the light to be directional.

Protected Member Functions

 VgLight ()
 This constructor initializes an useless empty light.
virtual ~VgLight ()
 Class destructor.

Friends

class VgEngine::VgObjectBridge

Detailed Description

This interface handles light management.

Note:
Currently only supported on OpenGL ES2.
Version:
2.0.8744

Constructor & Destructor Documentation

VgEngine::VgLight::VgLight (  ) [protected]

This constructor initializes an useless empty light.

virtual VgEngine::VgLight::~VgLight (  ) [protected, virtual]

Class destructor.


Member Function Documentation

VgRefPtr< VgAnimation > VgEngine::VgLight::editAnimation ( const std::string &  pName )

Gets an animation from the light's animation map for editing.

Parameters:
pNameThe name of the animation to fetch.
Returns:
A reference pointer that is valid if an animation exists by that name in this light.
VgEngine::VgColor VgEngine::VgLight::getAmbient (  ) const
VgConstRefPtr< VgAnimation > VgEngine::VgLight::getAnimation ( const std::string &  pName ) const

Gets an animation from the light's animation map.

Parameters:
pNameThe name of the animation to fetch.
Returns:
A const reference pointer that is valid if an animation exists by that name in this light.
void VgEngine::VgLight::getAnimationNames ( std::list< std::string > &  pNameList ) const

Gets the list of the stored animation names.

Parameters:
pNameListThe list of strings to feed with the names.
VgEngine::VgColor VgEngine::VgLight::getDiffuse (  ) const
VgEngine::VgColor VgEngine::VgLight::getEmission (  ) const
VgEngine::VgOrientation VgEngine::VgLight::getOrientation (  ) const

Gets lights's orientation.

Returns:
The light's orientation. This value is only valid if the spot cut-off is different than -1.0.
VgEngine::VgPosition VgEngine::VgLight::getPosition (  ) const

Gets light's position.

Returns:
The light's position. This value is ignored if the light is set to be directional.
VgEngine::VgColor VgEngine::VgLight::getSpecular (  ) const
double VgEngine::VgLight::getSpotCutoff (  ) const
double VgEngine::VgLight::getSpotExponent (  ) const
bool VgEngine::VgLight::isDirectional (  ) const

Tell if the light is directional.

When a light is directional, every point in the scene is lit along the same direction. The same principle as the light coming from the sun, where all rays are parallel.

Returns:
true If the light is directional.
void VgEngine::VgLight::setAmbient ( const VgEngine::VgColor pColor )

Sets the ambient light color for the light.

Parameters:
pColorAmbient light color to set
virtual void VgEngine::VgLight::setAnimation ( const std::string &  pAnimationName,
VgEngine::VgRefPtr< VgEngine::VgAnimation pAnimation 
) [virtual]

Sets an animation on this light.

As of version 2.0.8744, multiple animations can be set (and played) on a light at the same time. This is the reason why a name has to be provided along with the animation. If an animation already exists in the light with that name, the new one will replace the old one (and the previous one will one less reference to it).

Parameters:
pAnimationNameThe name to associate the animation with in this spatial
pAnimationAn animation to animate the spatial with.
void VgEngine::VgLight::setDiffuse ( const VgEngine::VgColor pColor )

Sets the diffuse light color for the light.

Parameters:
pColorDiffuse light color to set
void VgEngine::VgLight::setDirectional ( bool  pDirectional )

Sets the light to be directional.

Parameters:
pDirectionalTrue to set the light to be directional
void VgEngine::VgLight::setEmission ( const VgEngine::VgColor pColor )

Sets the emission light color for the light.

Parameters:
pColorEmission light color to set
void VgEngine::VgLight::setOrientation ( const VgEngine::VgOrientation pOrientation )

Sets the light's orientation.

Parameters:
pOrientationThe orientation to set on the light. This value is only valid if the spot cut-off is different than -1.0.
void VgEngine::VgLight::setPosition ( const VgEngine::VgPosition pPosition )

Sets the light's position.

Parameters:
pPositionThe position to put the light at. This value is ignored if the light is set to be directional
void VgEngine::VgLight::setSpecular ( const VgEngine::VgColor pColor )

Sets the specular light color for the light.

Parameters:
pColorSpecular light color to set
void VgEngine::VgLight::setSpotCutoff ( double  pCutoff )

Sets the current spot cutoff value.

Valid values are between -1.0 and 1.0 inclusive. Higher values means smaller spot angle.

Parameters:
pCutoffDiffuse light color to set
void VgEngine::VgLight::setSpotExponent ( double  pExponent )

Sets the spot exponent.

Valid values are greater than 0.0, where higher values give a more concentrated light beam along the spot direction.

Parameters:
pExponent

Friends And Related Function Documentation

friend class VgEngine::VgObjectBridge [friend]

The documentation for this class was generated from the following file:
VisioDevKit 2.0, Visioglobe® 2013