Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HSmoothShadow Class Reference

#include <HUtilityShadow.h>

List of all members.

Public Member Functions

void CleanUp ()
void Create (ShadowPlaneType ptype, int TextureSize=0, int FilterSize=-1, int filter[]=0)
void Create ()
int GetFilterSize ()
int GetTextureSize ()
 HSmoothShadow (HC_KEY ModelSegmentKey, HC_KEY ShadowBaseSegmentKey, bool UseOglShadow=false)
void SetAllowOpenglShadow (bool AllowOpenglShadow)
void SetFilter (int filter[], int FilterSize)
void SetTextureSize (int TextureSize)
void UnDefineShadowTexture ()

Static Public Member Functions

static void UnDefineAllShadowTextures (HC_KEY modelsegmentkey)

Protected Member Functions

void CalculateShadowExtents (HC_KEY segkey, float *totalmatrix)
void CalculateTotalShadowExtents ()
void CreateShadowTexture ()
void CreateSoftShadow ()
void SmoothImage (HPixelRGB *origImage, HPixelRGBA **smoothImage, int width, int height, int filterSize, int filter[])

Protected Attributes

bool m_bAllowOpenglShadow
 use opengl offscreen buffer
int * m_filter
 filter matrix
int m_FilterSize
 size of filter matrix
HC_KEY m_ImageKey
 key to shadow image
HPoint m_ShadowBoundingMax
 max value of shadow bounding volume
HPoint m_ShadowBoundingMin
 min value of shadow bounding volume
char m_texname [MVO_SMALL_BUFFER_SIZE]
 name of shadow texture
int m_TextureSize
 size of texture extents

Detailed Description

This class has been deprecated.


Constructor & Destructor Documentation

HSmoothShadow::HSmoothShadow ( HC_KEY  ModelSegmentKey,
HC_KEY  ShadowBaseSegmentKey,
bool  UseOglShadow = false 
)
Parameters:
ModelSegmentKeyTop-Level Segment that shadows should be applied to
ShadowBaseSegmentKeySegment that contains the shadow geometry
UseOglShadowEnables Hardware Support for Shadow Generation

Member Function Documentation

void HSmoothShadow::CalculateShadowExtents ( HC_KEY  segkey,
float *  totalmatrix 
) [protected]

Recursively calculates the total shadow size

Parameters:
segkeystartsegment for the shadow calculation
totalmatrixcombined modelling matrix
void HSmoothShadow::CalculateTotalShadowExtents ( ) [protected]

Calculates the total shadow size

void HSmoothShadow::CleanUp ( )

Objetct Cleanup

void HSmoothShadow::Create ( ShadowPlaneType  ptype,
int  TextureSize = 0,
int  FilterSize = -1,
int  filter[] = 0 
)

Creates a smooth shadow at the given plane

Parameters:
ptypecan be XZ_PLANE, XY_PLANE or YZ_PLANE.
TextureSizewidth/height of the shadow texture. For full hardware support must be 64,128, or 256
FilterSizewidth/height of the filter used for texture smoothing (only uneven filter sizes make sense!)
filterPointer to texture smoothing
void HSmoothShadow::Create ( )

Creates a smooth shadow with the current parameters

void HSmoothShadow::CreateShadowTexture ( ) [protected]

Creates shadow texture and associates texture to simple mesh

void HSmoothShadow::CreateSoftShadow ( ) [protected]

Image driver setup for shadow texture creation

int HSmoothShadow::GetFilterSize ( ) [inline]

Returns the shadow filter dimension

int HSmoothShadow::GetTextureSize ( ) [inline]

Returns the texture size of the shadow

void HSmoothShadow::SetAllowOpenglShadow ( bool  AllowOpenglShadow) [inline]

Allow Opengl offscreen buffer for shadow generation

Parameters:
AllowOpenglShadowtrue = opengl offscreen buffer, false = image driver
void HSmoothShadow::SetFilter ( int  filter[],
int  FilterSize 
) [inline]

Specifies the smoothing filter

Parameters:
filterPointer to smoothing filter
FilterSizeSIze of smoothing filter
void HSmoothShadow::SetTextureSize ( int  TextureSize) [inline]

Sets the texture size of the shadow

Parameters:
TextureSizedimensions of texture in x/y
void HSmoothShadow::SmoothImage ( HPixelRGB origImage,
HPixelRGBA **  smoothImage,
int  width,
int  height,
int  filterSize,
int  filter[] 
) [protected]

Image Filter function

Parameters:
origImageinput image
smoothImageoutput image
widthimage width
heightimage heigh
filterSizesize of image filter
filterfilter matrix
static void HSmoothShadow::UnDefineAllShadowTextures ( HC_KEY  modelsegmentkey) [static]

Undefines all Shadow Textures

void HSmoothShadow::UnDefineShadowTexture ( )

Undefines the Shadow Texture


The documentation for this class was generated from the following file: