vtImageSprite Class Reference
[Scene Graph]

List of all members.

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.


Public Member Functions

bool Create (const char *szTextureName, bool bBlending=false)
bool Create (vtImage *pImage, bool bBlending=false)
void SetPosition (float l, float t, float r, float b, float rot=0.0f)
void SetImage (vtImage *image)


Member Function Documentation

bool vtImageSprite::Create vtImage pImage,
bool  bBlending = false
 

Create a vtImageSprite.

Note that if you are not using the image for anything else, you should give ownership to the imagesprite. Example:

 vtImage *image = vtImageRead("foo.png");
 vtImageSprite *sprite = new vtImageSprite(image, false);
 image->Release();  // pass ownership

Parameters:
pImage A texture image.
bBlending Set to true for alpha-blending, which produces smooth edges on transparent textures.

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

Create a vtImageSprite.

Parameters:
szTextureName The filename of a texture image.
bBlending Set to true for alpha-blending, which produces smooth edges on transparent textures.

void vtImageSprite::SetImage vtImage 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:
l Left.
t Top.
r Right.
b Bottom.
rot Rotation in radians.


Generated on Tue Apr 22 10:11:07 2008 for vtlib library by  doxygen 1.4.5