Public Member Functions | Public Attributes

sp::video::SHeightMapTexture Struct Reference

#include <spImageManagement.hpp>

List of all members.

Public Member Functions

 SHeightMapTexture ()
 SHeightMapTexture (const Texture *Tex)
 ~SHeightMapTexture ()
void createBuffer (const Texture *Tex)
 Creates the buffer out of the texture's image buffer.
void createBuffer (const dim::size2di &NewSize, s32 NewFormat, const f32 *NewImageBuffer)
 Creates the buffer by copying the input buffer. Don't forget to delete the input buffer!
void clearBuffer ()
 Clears (or rather deletes) the buffer.
f32 getHeightValue (const dim::point2df &Pos) const
dim::vector3df getNormal (const dim::point2df &Pos, const dim::point2df &Adjustment) const

Public Attributes

dim::size2di Size
 Heightmap texture size.
f32ImageBuffer
 Floating-point array for more precision in height-mapping (array size = Size.Width * Size.Height).

Detailed Description

Heightmap texture structure for more precision.

Deprecated:

Constructor & Destructor Documentation

sp::video::SHeightMapTexture::SHeightMapTexture (  ) 
sp::video::SHeightMapTexture::SHeightMapTexture ( const Texture Tex  ) 
sp::video::SHeightMapTexture::~SHeightMapTexture (  ) 

Member Function Documentation

void sp::video::SHeightMapTexture::clearBuffer (  ) 

Clears (or rather deletes) the buffer.

void sp::video::SHeightMapTexture::createBuffer ( const dim::size2di NewSize,
s32  NewFormat,
const f32 NewImageBuffer 
)

Creates the buffer by copying the input buffer. Don't forget to delete the input buffer!

void sp::video::SHeightMapTexture::createBuffer ( const Texture Tex  ) 

Creates the buffer out of the texture's image buffer.

f32 sp::video::SHeightMapTexture::getHeightValue ( const dim::point2df Pos  )  const

Determines the height value at a specified position. The height value will be interpolated to have a smooth result with small heightmaps, too.

Parameters:
Pos,: Position where the height value shall be sampled (in a range or [0.0, 1.0]).
Returns:
Height value which is to be determined.
dim::vector3df sp::video::SHeightMapTexture::getNormal ( const dim::point2df Pos,
const dim::point2df Adjustment 
) const

Calculates the normal vector at a specified position and adjustment.

Parameters:
Pos,: Position where the normal vector shall be calculated.
Adjustment,: Adjustment (or rather offset) to get the area of the face which normal shall be calculated.
Returns:
Calculated normal vector.

Member Data Documentation

Floating-point array for more precision in height-mapping (array size = Size.Width * Size.Height).

Heightmap texture size.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines