Compound list   Compound Members  

Object3D Class Reference

3D World Object. More...

List of all members.

Public Members


Detailed Description

3D World Object.

Connects the concepts of a 3D World and the Mesh. Provides transformation, movement and collision detection for 3D objects.


Member Function Documentation

Object3D::Object3D(Mesh* m=NULL)

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.

virtual long Object3D::add(Object* O) [virtual]

this checks to make sure that any Object added to a Object3D is derived from Object3D.

Returns -1 if dynamic_cast fails.

Mesh* Object3D::getMesh()

Retrieve the mesh to be rendered for this object.

void Object3D::setMesh(Mesh* m)

Set the mesh to be rendered for this object.

This can be NULL to render nothing for this object. If not NULL, object radius is set to the mesh's radius.

virtual long Object3D::render(View& view) [virtual]

Main rendering method.

Renders the object to the current active camera. The parameter is specified as a View so that this render function will override the version in the base class World_Object, but the parameter must actually be of the View3D type.

virtual long Object3D::preRender(View& view) [virtual]

called to determine whether to render this.

Default implementation simply returns !visible().

virtual long Object3D::advance(float Fraction) [virtual]

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.

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.

float Object3D::getRadius() const

Get the object's rough radius, (non-optimized bounding sphere).

long Object3D::setRadius(const float Radius)

Set the object's radius, other than its actual one.

virtual long Object3D::visible() [virtual]

Returns non-zero if this object should be rendered.

Defaults to Yes

virtual long Object3D::radarDetectable() [virtual]

Returns non-zero if it should be added to the radar object, if any.

Defaults to Yes

virtual int Object3D::isCollision(Collidable_Object* O) [virtual]

implement the abstract Collidable_Object functions.

virtual long Object3D::collision(Collidable_Object* O) [virtual]

Provides behaviour in case of a collision with another object.

Defaults to nothing.

virtual int Object3D::isCollidable() [virtual]

Returns non-zero if you want this object to be checked for collisions Defaults to Yes.


The documentation for this class was generated from the following file: