Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Attributes | List of all members
vtImageSprite Class Reference

#include <ImageSprite.h>

Inheritance diagram for vtImageSprite:

Public Member Functions

bool Create (const char *szTextureName, bool bBlending=false)
 
bool Create (osg::Image *pImage, bool bBlending=false)
 
IPoint2 GetSize () const
 
void SetPosition (float l, float t, float r, float b, float rot=0.0f)
 
void SetImage (osg::Image *image)
 
vtGeodeGetGeode () const
 

Protected Attributes

vtMaterialArrayPtr m_pMats
 
vtGeodem_pGeode
 
vtMeshm_pMesh
 
IPoint2 m_Size
 

Detailed Description

This class which contains a geometry with a single textured rectangle mesh. It is particularly useful in conjunction with vtHUD, for superimposing a single image on the window.

Member Function Documentation

bool vtImageSprite::Create ( const char *  szTextureName,
bool  bBlending = false 
)

Create a vtImageSprite.

Parameters
szTextureNameThe filename of a texture image.
bBlendingSet to true for alpha-blending, which produces smooth edges on transparent textures.
bool vtImageSprite::Create ( osg::Image *  pImage,
bool  bBlending = false 
)

Create a vtImageSprite.

Parameters
pImageA texture image.
bBlendingSet to true for alpha-blending, which produces smooth edges on transparent textures.
void vtImageSprite::SetImage ( osg::Image *  pImage)

Set (replace) the image on a sprite that has already been created.

void vtImageSprite::SetPosition ( float  l,
float  t,
float  r,
float  b,
float  rot = 0.0f 
)

Set the XY position of the sprite. These are in world coordinates, unless this sprite is the child of a vtHUD, in which case they are pixel coordinates measured from the lower-left corner of the window.

Parameters
lLeft.
tTop.
rRight.
bBottom.
rotRotation in radians.

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