StoneSprite Class Reference

#include <StoneSprite.h>

Inheritance diagram for StoneSprite:

Inheritance graph
[legend]
Collaboration diagram for StoneSprite:

Collaboration graph
[legend]
List of all members.

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)

Constructor & Destructor Documentation

StoneSprite::StoneSprite ( float  x_size,
float  y_size,
float  z_size,
float  x,
float  y,
float  z 
)


Member Function Documentation

virtual bool StoneSprite::checkCollision ( Sprite with,
bool  fromSelf 
) [virtual]

Performe collision detection and handling between two sprites.

Parameters:
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.
Returns:
true if a collision was detected, false otherwise.

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.

Parameters:
sender Pointer to the sprite that detected the collision.
Returns:
true if the receiving object accepts this as a collision, false otherwise.

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.


Member Data Documentation

float StoneSprite::depth [protected]

GLuint StoneSprite::dlist [protected]

float StoneSprite::height [protected]

TexID StoneSprite::tex [static, protected]

float StoneSprite::width [protected]


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 15:33:26 2007 for MetalWarriors by  doxygen 1.4.7