This class has been deprecated. More...

#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 ()
- Public Member Functions inherited from HShadow
void CalculateTotalModelExtents ()
void GetModelExtents (HPoint &ObjectBoundingMin, HPoint &ObjectBoundingMax)
int GetShadowBrightness ()
void GetShadowGroundPlane (HPlane &plane)
HC_KEY GetShadowKey ()
void GetShadowLightPos (HPoint &lightpos)
 HShadow (HC_KEY ModelSegmentKey, HC_KEY ShadowBaseSegmentKey, float ObjectModellingMatrix[]=0)
void SetShadowBrightness (int ShadowBrightness)
void SetShadowGroundPlane (HPlane plane)
void SetShadowLightPos (HPoint lightpos)

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 Member Functions inherited from HShadow
void ComputeObjectExtents (HPoint &min, HPoint &max, HPoint points[], int numpoints)
bool HasShell (HC_KEY segKey)
HC_KEY IsolateShell ()
void RestoreShell ()
void RotateToGroundPlane (HPlane plane, float matrix[])
void ShadowMatrix2 (float matrix[], HPlane plane, HPoint d)
void ShowModellingMatrix (HC_KEY segkey, float oldmatrix[], float newmatrix[])

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
- Protected Attributes inherited from HShadow
bool m_bFirstCoordinate
HC_KEY m_ModelSegmentKey
HPoint m_ObjectBoundingMax
HPoint m_ObjectBoundingMin
float m_ObjectModellingMatrix [16]
int m_ShadowBrightness
HPlane m_ShadowGroundPlane
HPoint m_ShadowLightPos
HC_KEY m_ShadowSegmentKey

Detailed Description

This class has been deprecated.

This class has been deprecated.

Constructor & Destructor Documentation

◆ HSmoothShadow()

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

Member Function Documentation

◆ CalculateShadowExtents()

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

Recursively calculates the total shadow size

segkeystartsegment for the shadow calculation
totalmatrixcombined modelling matrix

◆ CalculateTotalShadowExtents()

void HSmoothShadow::CalculateTotalShadowExtents ( )

Calculates the total shadow size

◆ CleanUp()

void HSmoothShadow::CleanUp ( )

Objetct Cleanup

◆ Create() [1/2]

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

Creates a smooth shadow at the given plane

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

◆ Create() [2/2]

void HSmoothShadow::Create ( )

Creates a smooth shadow with the current parameters

◆ CreateShadowTexture()

void HSmoothShadow::CreateShadowTexture ( )

Creates shadow texture and associates texture to simple mesh

◆ CreateSoftShadow()

void HSmoothShadow::CreateSoftShadow ( )

Image driver setup for shadow texture creation

◆ GetFilterSize()

int HSmoothShadow::GetFilterSize ( )

Returns the shadow filter dimension

◆ GetTextureSize()

int HSmoothShadow::GetTextureSize ( )

Returns the texture size of the shadow

◆ SetAllowOpenglShadow()

void HSmoothShadow::SetAllowOpenglShadow ( bool  AllowOpenglShadow)

Allow Opengl offscreen buffer for shadow generation

AllowOpenglShadowtrue = opengl offscreen buffer, false = image driver

◆ SetFilter()

void HSmoothShadow::SetFilter ( int  filter[],
int  FilterSize 

Specifies the smoothing filter

filterPointer to smoothing filter
FilterSizeSIze of smoothing filter

◆ SetTextureSize()

void HSmoothShadow::SetTextureSize ( int  TextureSize)

Sets the texture size of the shadow

TextureSizedimensions of texture in x/y

◆ SmoothImage()

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

Image Filter function

origImageinput image
smoothImageoutput image
widthimage width
heightimage heigh
filterSizesize of image filter
filterfilter matrix

◆ UnDefineAllShadowTextures()

static void HSmoothShadow::UnDefineAllShadowTextures ( HC_KEY  modelsegmentkey)

Undefines all Shadow Textures

◆ UnDefineShadowTexture()

void HSmoothShadow::UnDefineShadowTexture ( )

Undefines the Shadow Texture

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