2D World Object. More...
Inherits SpriteSelector.
Inherited by AnimatedSprite.
Connects the concepts of a 2D World and the bitmap. Provides movement and collision detection for sprites.
Construct a 2D Object.
Destruct the object.
[virtual]
this checks to make sure that any Object added to a Object2D is derived from Object2D.
Returns -1 if dynamic_cast fails.
[virtual]
Calculate the object's global position.
The global position is relative to the world, whereas the object's (local) position is relative to its parent. Non-zero AllTheWay means that the calculation will recursively go up the tree all the way to the root. Otherwise, the calculation will only go up one level.
[virtual]
Render the sprite to the 2D view.
Set the local (relative to parent) position.
Retrieve the object's global position.
The global position is relative to the world, whereas the object's (local) position is relative to its parent.
[virtual]
Retrieve the object's dimensions.
If a sprite is available, it will return its size, otherwize returns zero size.
Retrieve the object's local position.
Retrieve the mid point of the object.
This point is relative to the parent.
[virtual]
Retrieve the sprite associated with this object.
Implements the abstract SpriteSelector class method.
Reimplemented from SpriteSelector.
[virtual]
collision is called to indicate a collision between this and O.
It may return a RETCODE to indicate that it ('this' Object) should be removed/deleted.
[virtual]
called by CollisionDetection.
Determines if a collision occurred bewteen this and O
[virtual]
called to determine if the Object is to participate in collision detection.
Default implementation returns non-zero if the sprite assigned to this is solid.