Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Lighting filter. More...
#include <ilviews/bitmaps/filters/lighting.h>
Public Member Functions | |
IlvLightingFilter (IlFloat surfaceScale=1.0, IlvLightSource *light=0) | |
Constructor. | |
virtual | ~IlvLightingFilter () |
Destructor. | |
IlFloat * | computeBumpMap (const IlvRGBBitmapData *src, IlFloat scaleX, IlFloat scaleY) |
Computes the bump map for the given image. | |
IlvLightSource * | getLightSource () const |
Returns the light source. | |
IlFloat | getSurfaceScale () const |
Returns the surface scale. | |
void | setLightSource (IlvLightSource *light) |
void | setSurfaceScale (IlFloat scale) |
Sets the surface scale. |
Lighting filter.
Library: ilvbmpflt
This is the base class of lighting filters. It allows you to light an image using the alpha channel as a bump map. You can specify a light source.
IlvRGBBitmapData
, IlvBitmapFilter
, IlvDiffuseLightingFilter
, IlvSpecularLightingFilter
, IlvLightSource
, IlvDistantLight
, IlvPointLight
, IlvSpotLight
IlvLightingFilter::IlvLightingFilter | ( | IlFloat | surfaceScale = 1.0 , |
|
IlvLightSource * | light = 0 | |||
) |
Constructor.
Initializes a new instance of the class IlvLightingFilter
.
The default surface scale is 1.0
and there is no light.
virtual IlvLightingFilter::~IlvLightingFilter | ( | ) | [virtual] |
Destructor.
The destructor releases all the memory used by the instance.
IlFloat* IlvLightingFilter::computeBumpMap | ( | const IlvRGBBitmapData * | src, | |
IlFloat | scaleX, | |||
IlFloat | scaleY | |||
) |
Computes the bump map for the given image.
The bump map is an array of floating point triplets, one for each pixel of the source image. Each triplet stores the normal vector at this point.
src | The source image. | |
scaleX | The scaling factor in the x direction. | |
scaleY | The scaling factor in the y direction. |
src->getWidth() x src->getHeight()
triplets. IlvLightSource* IlvLightingFilter::getLightSource | ( | ) | const |
Returns the light source.
IlFloat IlvLightingFilter::getSurfaceScale | ( | ) | const |
Returns the surface scale.
void IlvLightingFilter::setLightSource | ( | IlvLightSource * | light | ) |
Sets the light source.
light | The new light source. |
void IlvLightingFilter::setSurfaceScale | ( | IlFloat | scale | ) |
Sets the surface scale.
scale | The new surface scale. |
© 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.