Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvLightSource Class Reference

Lights. More...

#include <ilviews/bitmaps/lights.h>

Inheritance diagram for IlvLightSource:
IlvValueInterface 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.
 
- 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

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

◆ ~IlvLightSource()

virtual IlvLightSource::~IlvLightSource ( )
virtual

Destructor.

The destructor releases all the memory used by the instance.

Member Function Documentation

◆ getB()

IlFloat IlvLightSource::getB ( ) const

Returns the blue component value.

Returns
The blue component value.

◆ getG()

IlFloat IlvLightSource::getG ( ) const

Returns the green component value.

Returns
The green component value.

◆ getLightVector()

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.

◆ getR()

IlFloat IlvLightSource::getR ( ) const

Returns the red component value.

Returns
The red component value.

◆ setB()

void IlvLightSource::setB ( IlFloat  b)

Sets the blue component value.

Parameters
bThe new blue component value.

◆ setG()

void IlvLightSource::setG ( IlFloat  g)

Sets the green component value.

Parameters
gThe new green component value.

◆ setR()

void IlvLightSource::setR ( IlFloat  r)

Sets the red component value.

Parameters
rThe new red component value.