Class hierarchy Compound list File list Compound Members
Object3D Class Reference
3D World Object. More...
Inherited by Viewer.
List of all members.
Public Members
- Object3D (World3D* W, Mesh* O, Object3D* Parent)
- Construct a world object.
- long render ()
- Main rendering method.
- long advance (float Fraction)
- Main progress method.
- long orientSounds ()
- Positions the 3D sounds the object has.
- long startSound (SoundClip* SC, int Loop=1)
- Attaches a soundclip to the object.
- long stopSound (SoundClip* SC)
- Stops a soundclip that is currently playing.
- virtual long checkCollisions ()
- Returns non-zero if you want this object to be checked for collisions Defaults to Yes.
- virtual long visible ()
- Returns non-zero if this object should be rendered.
- virtual long radarDetectable ()
- Returns non-zero if it should be added to the radar object, if any.
- virtual long collision (Object3D* O)
- Provides behaviour in case of a collision with another object.
Detailed Description
3D World Object.
Connects the concepts of a 3D World and the Mesh.
Provides movement and collision detection for Models.
Member Function Documentation
Object3D::Object3D(World3D* W, Mesh* O, Object3D* Parent)
Construct a world object.
Requires the world the object is in,
the mesh that is associated with the object and the object's
parent in the objects hierarchy. The parent defaults to the
world in case the parameter is NULL.
long Object3D::render()
Main rendering method.
Renders the object to the current active camera.
Reimplemented in Viewer.
long Object3D::advance(float Fraction)
Main progress method.
The Fraction indicates how much progress should be done.
For example: If this objects advances at speed 5 units per second,
and Fraction=0.2 then the object should advance 5*0.2=1 unit.
This allows keeping a synchronized behaviour, regardless to frame rate.
Reimplemented in Viewer.
long Object3D::orientSounds()
Positions the 3D sounds the object has.
(Called by advance automatically)
long Object3D::startSound(SoundClip* SC, int Loop=1)
Attaches a soundclip to the object.
This must be dynamically allocated,
and the object will delete it automatically.
long Object3D::stopSound(SoundClip* SC)
Stops a soundclip that is currently playing.
Note: Stopping the soundclip, causes it to be deleted.
virtual long Object3D::checkCollisions() [virtual]
Returns non-zero if you want this object to be checked for collisions Defaults to Yes.
virtual long Object3D::visible() [virtual]
Returns non-zero if this object should be rendered.
Defaults to Yes
Reimplemented in Viewer.
virtual long Object3D::radarDetectable() [virtual]
Returns non-zero if it should be added to the radar object, if any.
Defaults to Yes
Reimplemented in Viewer.
virtual long Object3D::collision(Object3D* O) [virtual]
Provides behaviour in case of a collision with another object.
Defaults to nothing.
The documentation for this class was generated from the following file: