#include <StoneSprite.h>
Inheritance diagram for StoneSprite:
Public Member Functions | |
| StoneSprite (float x_size, float y_size, float z_size, float x, float y, float z) | |
| virtual void | update () |
| Update this sprite's pysics and stuff. | |
| virtual void | paint () |
| Draw this sprite on screen. | |
| virtual bool | checkCollision (Sprite *with, bool fromSelf) |
| Performe collision detection and handling between two sprites. | |
| virtual bool | notifyCollision (Sprite *sender) |
| Notify an other sprite that we think we have collided with it. | |
Protected Attributes | |
| float | height |
| float | width |
| float | depth |
| GLuint | dlist |
Static Protected Attributes | |
| static TexID | tex |
Private Member Functions | |
| void | sphericalCoords (float *coord, float fi, float theta) |
| void | distortCoords (float *coords, float factor) |
| void | createNormals (float *coord, float *normal1, float *e1, float *e2, float *e3, float *e4) |
| StoneSprite::StoneSprite | ( | float | x_size, | |
| float | y_size, | |||
| float | z_size, | |||
| float | x, | |||
| float | y, | |||
| float | z | |||
| ) |
| virtual bool StoneSprite::checkCollision | ( | Sprite * | with, | |
| bool | fromSelf | |||
| ) | [virtual] |
Performe collision detection and handling between two sprites.
| with | The sprite to performe collision detection with. | |
| fromSelf | set this to true when the collision check originates from one self, normally all external callers should leave this variable at the default (false) value. |
Reimplemented from Sprite.
| void StoneSprite::createNormals | ( | float * | coord, | |
| float * | normal1, | |||
| float * | e1, | |||
| float * | e2, | |||
| float * | e3, | |||
| float * | e4 | |||
| ) | [private] |
| void StoneSprite::distortCoords | ( | float * | coords, | |
| float | factor | |||
| ) | [private] |
| virtual bool StoneSprite::notifyCollision | ( | Sprite * | sender | ) | [virtual] |
Notify an other sprite that we think we have collided with it.
| sender | Pointer to the sprite that detected the collision. |
Reimplemented from Sprite.
| virtual void StoneSprite::paint | ( | ) | [virtual] |
Draw this sprite on screen.
The paint method is allowed to change the model-view matrix and any pushable attributes.
Implements Sprite.
| void StoneSprite::sphericalCoords | ( | float * | coord, | |
| float | fi, | |||
| float | theta | |||
| ) | [private] |
| virtual void StoneSprite::update | ( | ) | [virtual] |
Update this sprite's pysics and stuff.
Note that the update method should use the static dTime variable to check the time since last invokation. The caller is responsible for setting this variable to an apropriate value!
Implements Sprite.
float StoneSprite::depth [protected] |
GLuint StoneSprite::dlist [protected] |
float StoneSprite::height [protected] |
TexID StoneSprite::tex [static, protected] |
float StoneSprite::width [protected] |
1.4.7