Public Member Functions

sp::tool::VectorTexture Class Reference
[Texture Mapping]

#include <spUtilityMatrixTexture.hpp>

Inheritance diagram for sp::tool::VectorTexture:
sp::tool::GeneralPurposeTexture

List of all members.

Public Member Functions

 VectorTexture (u32 Count)
 ~VectorTexture ()
void setVector (u32 Index, const dim::vector4df &Vector, bool ImmediateUpdate=false)
dim::vector4df getVector (u32 Index) const
 Returns a vector which is stored inside the texture at the specified index.
dim::point2di getTexCoord (u32 Index) const
 Returns the texture coordinate for the given index.
void resize (u32 Count)
 Resizes the texture for the new count of vectors.

Detailed Description

A vector texture can be used to store 4 comoponent vectors inside a texture object. This can be useful for texture-lookups on a vertex shader, e.g. for hardware-instancing.

See also:
video::Shader
video::Texture
dim::matrix4
MatrixTexture
Since:
Version 3.2

Constructor & Destructor Documentation

sp::tool::VectorTexture::VectorTexture ( u32  Count  ) 
Exceptions:
io::RenderSystemException When this object will be created before the global render-system has been created.
sp::tool::VectorTexture::~VectorTexture (  ) 

Member Function Documentation

dim::point2di sp::tool::VectorTexture::getTexCoord ( u32  Index  )  const [virtual]

Returns the texture coordinate for the given index.

Implements sp::tool::GeneralPurposeTexture.

dim::vector4df sp::tool::VectorTexture::getVector ( u32  Index  )  const

Returns a vector which is stored inside the texture at the specified index.

void sp::tool::VectorTexture::resize ( u32  Count  )  [virtual]

Resizes the texture for the new count of vectors.

Implements sp::tool::GeneralPurposeTexture.

void sp::tool::VectorTexture::setVector ( u32  Index,
const dim::vector4df Vector,
bool  ImmediateUpdate = false 
)

Writes the specified vector into the texture.

Parameters:
[in] Index Specifies the index at which point the vector will be inserted. Must be smaller than the maximal count of vectors.
[in] Vector Specifies the vector which is to be stored inside the texture.
[in] ImmediateUpdate Specifies whether the texture is to be updated immediately. Otherwise you have to update the image buffer by yourself using the "Texture::updateImageBuffer" function.

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