Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvSpotLight Class Reference

Spot Light. More...

#include <ilviews/bitmaps/filters/lights.h>

Inheritance diagram for IlvSpotLight:
IlvPointLight IlvLightSource IlvValueInterface

Public Member Functions

 IlvSpotLight (IlFloat x=0.0, IlFloat y=0.0, IlFloat z=0.0, IlFloat tox=0.0, IlFloat toy=0.0, IlFloat toz=0.0, IlFloat specularExponent=0.0, IlFloat limitingConeAngle=0.0, IlFloat r=1.0, IlFloat g=1.0, IlFloat b=1.0)
 Constructor. More...
 
void getLightVector (IlFloat x, IlFloat y, IlFloat z, IlFloat *result)
 Returns the vector from this instance to a given point in 3D space. More...
 
IlFloat getLimitingConeAngle () const
 Returns the limiting cone angle. More...
 
IlFloat getSpecularExponent () const
 Returns the specular exponent. More...
 
IlFloat getToX () const
 Returns the x coordinate of the position the light points to. More...
 
void getToXYZ (IlFloat &tox, IlFloat &toy, IlFloat &toz) const
 Returns the position the light points to. More...
 
IlFloat getToY () const
 Returns the y coordinate of the position the light points to. More...
 
IlFloat getToZ () const
 Returns the z coordinate of the position the light points to. More...
 
void setLimitingConeAngle (IlFloat coneangle)
 Sets the limiting cone angle. More...
 
void setSpecularExponent (IlFloat exponent)
 Sets the specular exponent. More...
 
void setToX (IlFloat tox)
 Sets the x coordinate of the position the light points to. More...
 
void setToXYZ (IlFloat tox, IlFloat toy, IlFloat toz)
 Sets the position the light points to. More...
 
void setToY (IlFloat toy)
 Sets the y coordinate of the position the light points to. More...
 
void setToZ (IlFloat toz)
 Sets the z coordinate of the position the light points to. More...
 
void update ()
 Called when the instance needs internal updating.
 
- Public Member Functions inherited from IlvPointLight
 IlvPointLight (IlFloat x=0.0, IlFloat y=0.0, IlFloat z=0.0, IlFloat r=1.0, IlFloat g=1.0, IlFloat b=1.0)
 Constructor. More...
 
IlFloat getX () const
 Returns the x coordinate. More...
 
virtual void getXYZ (IlFloat &x, IlFloat &y, IlFloat &z) const
 Returns the position. More...
 
IlFloat getY () const
 Returns the y coordinate. More...
 
IlFloat getZ () const
 Returns the z coordinate. More...
 
void setX (IlFloat x)
 Sets the x coordinate. More...
 
virtual void setXYZ (IlFloat x, IlFloat y, IlFloat z)
 Sets the position. More...
 
void setY (IlFloat y)
 Sets the y coordinate. More...
 
void setZ (IlFloat z)
 Sets the z coordinate. More...
 
- Public Member Functions inherited from IlvLightSource
 IlvLightSource (IlFloat r=1.0, IlFloat g=1.0, IlFloat b=1.0)
 Constructor. More...
 
virtual ~IlvLightSource ()
 Destructor. More...
 
IlFloat getB () const
 Returns the blue component value. More...
 
IlFloat getG () const
 Returns the green component value. More...
 
IlFloat getR () const
 Returns the red component value. More...
 
void setB (IlFloat b)
 Sets the blue component value. More...
 
void setG (IlFloat g)
 Sets the green component value. More...
 
void setR (IlFloat r)
 Sets the red component value. More...
 
- Public Member Functions inherited from IlvValueInterface
virtual IlBoolean applyValue (const IlvValue &value)
 Apply an accessor. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count=0)
 Changes several accessor values simultaneously. More...
 
virtual void getAccessors (const IlSymbol *const **names, const IlvValueTypeClass *const **types, IlUInt &count) const
 Retrieves the list of available accessors of an object. More...
 
virtual const char * getName () const
 Returns the name of the instance. The semantic and implementation of this method are defined by concrete subclasses. The default implementation returns 0. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves an accessor value. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 

Detailed Description

Spot Light.

Library: ilvbmpflt

This class allows you to model a spot light. A spot light is a positional light with additional properties such as a direction it points to and a limiting cone which restricts the region where the light is projected. A specular exponent can be specified to allow smooth transition from lit to nonlit regions.

See also
IlvDiffuseLightingFilter, IlvSpecularLightingFilter, IlvLightSource, IlvDistantLight, IlvPointLight

Constructor & Destructor Documentation

IlvSpotLight::IlvSpotLight ( IlFloat  x = 0.0,
IlFloat  y = 0.0,
IlFloat  z = 0.0,
IlFloat  tox = 0.0,
IlFloat  toy = 0.0,
IlFloat  toz = 0.0,
IlFloat  specularExponent = 0.0,
IlFloat  limitingConeAngle = 0.0,
IlFloat  r = 1.0,
IlFloat  g = 1.0,
IlFloat  b = 1.0 
)

Constructor.

Initializes a new instance of the class IlvSpotLight.

The default position is <0,0,0>. The default pointing position is <0,0,0>. The default specular exponent is 0.0. The default limiting cone angle is 0.0. The default light color is white.

Member Function Documentation

void IlvSpotLight::getLightVector ( IlFloat  x,
IlFloat  y,
IlFloat  z,
IlFloat result 
)
virtual

Returns the vector from this instance to a given point in 3D space.

Parameters
xThe x position of the point.
yThe y position of the point.
zThe z position of the point.
resultAn array of 3 floating point values that will hold the vector.

Reimplemented from IlvPointLight.

IlFloat IlvSpotLight::getLimitingConeAngle ( ) const

Returns the limiting cone angle.

Returns
The limiting cone angle.
IlFloat IlvSpotLight::getSpecularExponent ( ) const

Returns the specular exponent.

Returns
The specular exponent.
IlFloat IlvSpotLight::getToX ( ) const

Returns the x coordinate of the position the light points to.

Returns
The x coordinate.
void IlvSpotLight::getToXYZ ( IlFloat tox,
IlFloat toy,
IlFloat toz 
) const

Returns the position the light points to.

Parameters
toxThe x coordinate of the new position.
toyThe y coordinate of the new position.
tozThe z coordinate of the new position.
IlFloat IlvSpotLight::getToY ( ) const

Returns the y coordinate of the position the light points to.

Returns
The y coordinate.
IlFloat IlvSpotLight::getToZ ( ) const

Returns the z coordinate of the position the light points to.

Returns
The z coordinate.
void IlvSpotLight::setLimitingConeAngle ( IlFloat  coneangle)

Sets the limiting cone angle.

Parameters
coneangleThe new limiting cone angle.
void IlvSpotLight::setSpecularExponent ( IlFloat  exponent)

Sets the specular exponent.

Parameters
exponentThe new specular exponent.
void IlvSpotLight::setToX ( IlFloat  tox)

Sets the x coordinate of the position the light points to.

Parameters
toxThe new x pointing coordinate.
void IlvSpotLight::setToXYZ ( IlFloat  tox,
IlFloat  toy,
IlFloat  toz 
)

Sets the position the light points to.

Parameters
toxThe x coordinate of the new position.
toyThe y coordinate of the new position.
tozThe z coordinate of the new position.
void IlvSpotLight::setToY ( IlFloat  toy)

Sets the y coordinate of the position the light points to.

Parameters
toyThe new y pointing coordinate.
void IlvSpotLight::setToZ ( IlFloat  toz)

Sets the z coordinate of the position the light points to.

Parameters
tozThe new z pointing coordinate.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.