Generic Objects' World. More...
Inherits World_Object.
Provides a root to the objects' tree.
Construct a world.
[virtual]
this checks to make sure that any Object added to a World is derived from World_Object.
Returns -1 if dynamic_cast fails.
Reimplemented from World_Object.
[virtual]
This method is called once before any rendering is done.
It should return non-zero to skip rendering. Default implementation calls view.beginRendering().
Reimplemented from World_Object.
[virtual]
Subclases must override this to supply rendering.
Default implemetation renders the child objects of the world.
Reimplemented from World_Object.
[virtual]
This method is called once after all rendering is done.
Default implemetation calls view.endRendering().
Reimplemented from World_Object.
[virtual]
This method is called once per object before it is rendered.
If it returns a non-zero value, the object will not be rendered.
[virtual]
This method is called once per object after it is rendered.
[virtual]
Subclasses may override this to provide state changes.
Default implemetation calls advance() for each child object of the world. Fraction gives the amount of time to provide change for (in seconds).
Reimplemented from World_Object.
[virtual]
This method is called once per object before it is advanced.
[virtual]
This method is called once per object after it is advanced.
Gradual Advance.
This is will advance a given World instance by Fraction. It is intended to be called once per frame. It has two purposes: 1) Call the world's advance routine at least twice per frame (this helps prevent collided objects from appearing overlapped on the screen). 2) Break the Fraction into manageable chunks. Precision gives the max fraction with which the World's advance code is to be called with. Mutiple calls are made to World::advance() when the Fraction remaining is greater than Precision. Note that physics codes normally are more accurate with a lower Precision value, but there is a trade off. If it is set too low, too much time will be spent in advance routines. Note that World::advance() will only be called with a fraction > EPSILON.