rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvSpotLight Class Reference

Spot Light. More...

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

Inheritance diagram for IlvSpotLight:
IlvPointLight IlvLightSource

List of all members.

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.
void getLightVector (IlFloat x, IlFloat y, IlFloat z, IlFloat *result)
 Returns the vector from this instance to a given point in 3D space.
IlFloat getLimitingConeAngle () const
 Returns the limiting cone angle.
IlFloat getSpecularExponent () const
 Returns the specular exponent.
IlFloat getToX () const
 Returns the x coordinate of the position the light points to.
void getToXYZ (IlFloat &tox, IlFloat &toy, IlFloat &toz) const
 Returns the position the light points to.
IlFloat getToY () const
 Returns the y coordinate of the position the light points to.
IlFloat getToZ () const
 Returns the z coordinate of the position the light points to.
void setLimitingConeAngle (IlFloat coneangle)
 Sets the limiting cone angle.
void setSpecularExponent (IlFloat exponent)
 Sets the specular exponent.
void setToX (IlFloat tox)
 Sets the x coordinate of the position the light points to.
void setToXYZ (IlFloat tox, IlFloat toy, IlFloat toz)
 Sets the position the light points to.
void setToY (IlFloat toy)
 Sets the y coordinate of the position the light points to.
void setToZ (IlFloat toz)
 Sets the z coordinate of the position the light points to.
void update ()
 Called when the instance needs internal updating.

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:
x The x position of the point.
y The y position of the point.
z The z position of the point.
result An 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:
tox The x coordinate of the new position.
toy The y coordinate of the new position.
toz The 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:
coneangle The new limiting cone angle.
void IlvSpotLight::setSpecularExponent ( IlFloat  exponent  ) 

Sets the specular exponent.

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

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

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

Sets the position the light points to.

Parameters:
tox The x coordinate of the new position.
toy The y coordinate of the new position.
toz The z coordinate of the new position.
void IlvSpotLight::setToY ( IlFloat  toy  ) 

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

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

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

Parameters:
toz The new z pointing coordinate.

© Copyright 2012, 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.