Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

sp::tool::GeneralPurposeTexture Class Reference

#include <spUtilityMatrixTexture.hpp>

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

List of all members.

Public Member Functions

virtual ~GeneralPurposeTexture ()
virtual dim::point2di getTexCoord (u32 Index) const =0
 Returns the texture coordinate for the given index.
virtual void resize (u32 Count)=0
 Resizes the texture for the new count of elements.
virtual void update ()
u32 getCount () const
 Returns the count of maximal matrics or vectors which can be stored inside the texture. By default 1.
video::TexturegetTexture () const
 Returns a constant pointer to the Texture object. This is never a null pointer.

Static Public Member Functions

static dim::size2di getSizeByCount (u32 Count)

Protected Member Functions

 GeneralPurposeTexture (const io::stringc &TypeName, const dim::size2di &TexSize, u32 Count)
void generate (const dim::size2di &TexSize, u32 Count)

Protected Attributes

video::TextureTex_
u32 Count_

Detailed Description

Base class for vector- and matrix textures.

See also:
MatrixTexture
VectorTexture
Since:
Version 3.2

Constructor & Destructor Documentation

virtual sp::tool::GeneralPurposeTexture::~GeneralPurposeTexture (  )  [virtual]
sp::tool::GeneralPurposeTexture::GeneralPurposeTexture ( const io::stringc TypeName,
const dim::size2di TexSize,
u32  Count 
) [protected]

Member Function Documentation

void sp::tool::GeneralPurposeTexture::generate ( const dim::size2di TexSize,
u32  Count 
) [protected]
u32 sp::tool::GeneralPurposeTexture::getCount (  )  const [inline]

Returns the count of maximal matrics or vectors which can be stored inside the texture. By default 1.

static dim::size2di sp::tool::GeneralPurposeTexture::getSizeByCount ( u32  Count  )  [static]

Computes the size for the texture by the given count.

Parameters:
[in] Count Specifies the count of matrices. Must be grater or equal to 1.
Returns:
The size which is required for a texture to store the given count of matrices. If the specified count of 0, the return value is dim::size2di(0, 0).
virtual dim::point2di sp::tool::GeneralPurposeTexture::getTexCoord ( u32  Index  )  const [pure virtual]

Returns the texture coordinate for the given index.

Implemented in sp::tool::MatrixTexture, and sp::tool::VectorTexture.

video::Texture* sp::tool::GeneralPurposeTexture::getTexture (  )  const [inline]

Returns a constant pointer to the Texture object. This is never a null pointer.

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

Resizes the texture for the new count of elements.

Implemented in sp::tool::MatrixTexture, and sp::tool::VectorTexture.

virtual void sp::tool::GeneralPurposeTexture::update (  )  [virtual]

Updates the texture's image buffer. This is equivalent to the following code:

        MyUtilTex->getTexture()->updateImageBuffer();

Member Data Documentation


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