#include <BirdSprite.h>
Inheritance diagram for BirdSprite:
Public Member Functions | |
| BirdSprite (float x, float y) | |
| Create a new bird of the default type at location x,y. | |
| virtual | ~BirdSprite () |
| Delete this bird and remove it from the flock. | |
| virtual void | update () |
| Update this sprite's pysics and stuff. | |
| virtual void | paint () |
| Draw this sprite on screen. | |
| virtual bool | notifyCollision (Sprite *sender) |
| Notify an other sprite that we think we have collided with it. | |
| virtual bool | checkCollision (Sprite *with, bool fromSelf=false) |
| Performe collision detection and handling between two sprites. | |
Static Public Member Functions | |
| static std::list< BirdSprite * > & | MakeFlock (float x, float y, int nmemb) |
| Create a flock of nmemb birds in the area around x,y. | |
Protected Attributes | |
| std::list< BirdSprite * > * | flock |
| float | turnRate |
| float | azimuth |
| float | roll |
| float | speed |
| float | z |
| int | count |
| int | direction |
Static Protected Attributes | |
| static Model * | m |
| BirdSprite::BirdSprite | ( | float | x, | |
| float | y | |||
| ) |
Create a new bird of the default type at location x,y.
| virtual BirdSprite::~BirdSprite | ( | ) | [virtual] |
Delete this bird and remove it from the flock.
| virtual bool BirdSprite::checkCollision | ( | Sprite * | with, | |
| bool | fromSelf = false | |||
| ) | [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.
| static std::list<BirdSprite*>& BirdSprite::MakeFlock | ( | float | x, | |
| float | y, | |||
| int | nmemb | |||
| ) | [static] |
Create a flock of nmemb birds in the area around x,y.
| virtual bool BirdSprite::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 BirdSprite::paint | ( | ) | [virtual] |
Draw this sprite on screen.
The paint method is allowed to change the model-view matrix and any pushable attributes.
Implements Sprite.
| virtual void BirdSprite::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 BirdSprite::azimuth [protected] |
int BirdSprite::count [protected] |
int BirdSprite::direction [protected] |
std::list<BirdSprite*>* BirdSprite::flock [protected] |
Model* BirdSprite::m [static, protected] |
float BirdSprite::roll [protected] |
float BirdSprite::speed [protected] |
float BirdSprite::turnRate [protected] |
float BirdSprite::z [protected] |
1.4.7