HSmoothShadow

class HSmoothShadow

This class has been deprecated.

This class has been deprecated.

Inherits from: HShadow

Methods

HSmoothShadow::HSmoothShadow(HC_KEY ModelSegmentKey, HC_KEY ShadowBaseSegmentKey, bool UseOglShadow = false)

Parameters

ModelSegmentKey: Top-Level Segment that shadows should be applied to

ShadowBaseSegmentKey: Segment that contains the shadow geometry

UseOglShadow: Enables Hardware Support for Shadow Generation

virtual HSmoothShadow::~HSmoothShadow()

virtual

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

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

int HSmoothShadow::GetFilterSize()

Returns the shadow filter dimension

int HSmoothShadow::GetTextureSize()

Returns the texture size of the shadow

void HSmoothShadow::SetTextureSize(int TextureSize)

Sets the texture size of the shadow

Parameters

TextureSize: dimensions of texture in x/y
void HSmoothShadow::SetFilter(int filter[], int FilterSize)

Specifies the smoothing filter

Parameters

filter: Pointer to smoothing filter

FilterSize: SIze of smoothing filter

void HSmoothShadow::UnDefineShadowTexture()

Undefines the Shadow Texture

void HSmoothShadow::SetAllowOpenglShadow(bool AllowOpenglShadow)

Allow Opengl offscreen buffer for shadow generation

Parameters

AllowOpenglShadow: true = opengl offscreen buffer, false = image driver
static void HSmoothShadow::UnDefineAllShadowTextures(HC_KEY modelsegmentkey)

static

Undefines all Shadow Textures

void HSmoothShadow::CalculateTotalShadowExtents()

protected

Calculates the total shadow size

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

protected

Recursively calculates the total shadow size

Parameters

segkey: startsegment for the shadow calculation

totalmatrix: combined modelling matrix

void HSmoothShadow::CreateSoftShadow()

protected

Image driver setup for shadow texture creation

void HSmoothShadow::CreateShadowTexture()

protected

Creates shadow texture and associates texture to simple mesh

void HSmoothShadow::SmoothImage(HPixelRGB *origImage, HPixelRGBA **smoothImage, int width, int height, int filterSize, int filter[])

protected

Image Filter function

Parameters

origImage: input image

smoothImage: output image

width: image width

height: image heigh

filterSize: size of image filter

filter: filter matrix

void HSmoothShadow::CalculateOneShadowExtent(HC_KEY shellkey, float *modellingMatrix)

private

Variables

int HSmoothShadow::m_TextureSize

protected

int

size of texture extents

int HSmoothShadow::m_FilterSize

protected

int

size of filter matrix

int *HSmoothShadow::m_filter

protected

int

filter matrix

HC_KEY HSmoothShadow::m_ImageKey

protected

HC_KEY

key to shadow image

HPoint HSmoothShadow::m_ShadowBoundingMin

protected

min value of shadow bounding volume

HPoint HSmoothShadow::m_ShadowBoundingMax

protected

max value of shadow bounding volume

char HSmoothShadow::m_texname[MVO_SMALL_BUFFER_SIZE]

protected

char

name of shadow texture

bool HSmoothShadow::m_bAllowOpenglShadow

protected

bool

use opengl offscreen buffer