rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members | Public Member Functions
IlvLightSource Class Reference

Lights. More...

#include <ilviews/bitmaps/lights.h>

Inheritance diagram for IlvLightSource:
IlvDistantLight IlvPointLight IlvSpotLight

Public Member Functions

 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...
 
virtual 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 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...
 
virtual void update ()
 Called when the instance needs internal updating.
 

Detailed Description

Lights.

Library: xviews or winviews or mviews (mutually exclusive)

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
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 in IlvSpotLight, IlvPointLight, and IlvDistantLight.

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
bThe new blue component value.
void IlvLightSource::setG ( IlFloat  g)

Sets the green component value.

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

Sets the red component value.

Parameters
rThe new red component value.

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