rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvLightingFilter Class Reference

Lighting filter. More...

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

Inheritance diagram for IlvLightingFilter:
IlvBitmapFilter IlvDiffuseLightingFilter IlvSpecularLightingFilter

List of all members.

Public Member Functions

 IlvLightingFilter (IlFloat surfaceScale=1.0, IlvLightSource *light=0)
 Constructor.
virtual ~IlvLightingFilter ()
 Destructor.
IlFloatcomputeBumpMap (const IlvRGBBitmapData *src, IlFloat scaleX, IlFloat scaleY)
 Computes the bump map for the given image.
IlvLightSourcegetLightSource () const
 Returns the light source.
IlFloat getSurfaceScale () const
 Returns the surface scale.
void setLightSource (IlvLightSource *light)
void setSurfaceScale (IlFloat scale)
 Sets the surface scale.

Detailed Description

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.

See also:
IlvRGBBitmapData, IlvBitmapFilter, IlvDiffuseLightingFilter, IlvSpecularLightingFilter, IlvLightSource, IlvDistantLight, IlvPointLight, IlvSpotLight

Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
src The source image.
scaleX The scaling factor in the x direction.
scaleY The scaling factor in the y direction.
Returns:
An array of src->getWidth() x src->getHeight() triplets.
IlvLightSource* IlvLightingFilter::getLightSource (  )  const

Returns the light source.

Returns:
The light source.
IlFloat IlvLightingFilter::getSurfaceScale (  )  const

Returns the surface scale.

Returns:
The surface scale.
void IlvLightingFilter::setLightSource ( IlvLightSource light  ) 

Sets the light source.

Parameters:
light The new light source.
void IlvLightingFilter::setSurfaceScale ( IlFloat  scale  ) 

Sets the surface scale.

Parameters:
scale The new surface scale.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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