rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvLightSource Class Reference

Lights. More...

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

Inheritance diagram for IlvLightSource:
IlvDistantLight IlvPointLight IlvSpotLight

List of all members.

Public Member Functions

 IlvLightSource (IlFloat r=1.0, IlFloat g=1.0, IlFloat b=1.0)
 Constructor.
virtual ~IlvLightSource ()
 Destructor.
IlFloat getB () const
 Returns the blue component value.
IlFloat getG () const
 Returns the green component value.
virtual void getLightVector (IlFloat x, IlFloat y, IlFloat z, IlFloat *result)
 Returns the vector from this instance to a given point in 3D space.
IlFloat getR () const
 Returns the red component value.
void setB (IlFloat b)
 Sets the blue component value.
void setG (IlFloat g)
 Sets the green component value.
void setR (IlFloat r)
 Sets the red component value.
virtual void update ()
 Called when the instance needs internal updating.

Detailed Description

Lights.

Library: display

This class is the base class of lights. It allows you to model a light source to use in IlvDiffuseLightingFilter or IlvSpecularLightingFilter.

Every light has a color.

See also:
IlvDiffuseLightingFilter, IlvSpecularLightingFilter, IlvDistantLightSource, IlvPointLightSource, IlvSpotLightSource

Constructor & Destructor Documentation

IlvLightSource::IlvLightSource ( IlFloat  r = 1.0,
IlFloat  g = 1.0,
IlFloat  b = 1.0 
)

Constructor.

Initializes a new instance of the class IlvLightSource.

The default light color is white.

virtual IlvLightSource::~IlvLightSource (  )  [virtual]

Destructor.

The destructor releases all the memory used by the instance.


Member Function Documentation

IlFloat IlvLightSource::getB (  )  const

Returns the blue component value.

Returns:
The blue component value.
IlFloat IlvLightSource::getG (  )  const

Returns the green component value.

Returns:
The green component value.
virtual void IlvLightSource::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 in IlvDistantLight, IlvPointLight, and IlvSpotLight.

IlFloat IlvLightSource::getR (  )  const

Returns the red component value.

Returns:
The red component value.
void IlvLightSource::setB ( IlFloat  b  ) 

Sets the blue component value.

Parameters:
b The new blue component value.
void IlvLightSource::setG ( IlFloat  g  ) 

Sets the green component value.

Parameters:
g The new green component value.
void IlvLightSource::setR ( IlFloat  r  ) 

Sets the red component value.

Parameters:
r The new red component value.

© 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.