geSprite
From GriffinEngine
Class represents a single sprite, defined as a subimage of a larger texture/material. geSpriteSheet is a simple mechanism for creating sprites from textures, as a general rule you should work with that instead of creating each sprite separately.
Contents
Usage
Inheritance
Base classes
- geObject
- geResource
- geSprite
- geResource
Reference
Coordinate pairs
These constants specify which corner of the sprite to use for calculating texture coordinates. Normally you should not have to deal with these, since geBillboard and geSprite2D abstract sprite rendering.
GE_TL = 0
top left |
GE_TR = 3
top right |
GE_BL = 1
bottom left |
GE_BR = 2
bottom right |
Constructors
geSprite( geMaterial* texture, float x, float y, float w, float h );
Accessors
- ↖
virtual int getID(){ return 0x0313; }
- ↖
virtual string getName() const;
float* getTexCoords( float* fv, int corner );
geMaterial* getMaterial() const;
float getX() const;
float getY() const;
float getW() const;
float getH() const;
Resources |
---|
geResourceManager · geResource |
geAnimation · geBitmap · geFont · geMaterial · geMesh · GeSound · GeSprite · GeSpriteSheet |