#include <HUtilityShadow.h>
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 |
This class has been deprecated.
HSmoothShadow::HSmoothShadow | ( | HC_KEY | ModelSegmentKey, |
HC_KEY | ShadowBaseSegmentKey, | ||
bool | UseOglShadow = false |
||
) |
ModelSegmentKey | Top-Level Segment that shadows should be applied to |
ShadowBaseSegmentKey | Segment that contains the shadow geometry |
UseOglShadow | Enables Hardware Support for Shadow Generation |
void HSmoothShadow::CalculateShadowExtents | ( | HC_KEY | segkey, |
float * | totalmatrix | ||
) | [protected] |
Recursively calculates the total shadow size
segkey | startsegment for the shadow calculation |
totalmatrix | combined 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
ptype | can be XZ_PLANE, XY_PLANE or YZ_PLANE. |
TextureSize | width/height of the shadow texture. For full hardware support must be 64,128, or 256 |
FilterSize | width/height of the filter used for texture smoothing (only uneven filter sizes make sense!) |
filter | Pointer 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
AllowOpenglShadow | true = opengl offscreen buffer, false = image driver |
void HSmoothShadow::SetFilter | ( | int * | filter, |
int | FilterSize | ||
) | [inline] |
Specifies the smoothing filter
filter | Pointer to smoothing filter |
FilterSize | SIze of smoothing filter |
void HSmoothShadow::SetTextureSize | ( | int | TextureSize | ) | [inline] |
Sets the texture size of the shadow
TextureSize | dimensions of texture in x/y |
void HSmoothShadow::SmoothImage | ( | HPixelRGB * | origImage, |
HPixelRGBA ** | smoothImage, | ||
int | width, | ||
int | height, | ||
int | filterSize, | ||
int * | filter | ||
) | [protected] |
Image Filter function
origImage | input image |
smoothImage | output image |
width | image width |
height | image heigh |
filterSize | size of image filter |
filter | filter matrix |
static void HSmoothShadow::UnDefineAllShadowTextures | ( | HC_KEY | modelsegmentkey | ) | [static] |
Undefines all Shadow Textures
void HSmoothShadow::UnDefineShadowTexture | ( | ) |
Undefines the Shadow Texture