Class hierarchy Compound list File list Compound Members File Members
Mesh Class Reference
A Mesh of triangles that represent an object in 3D Space. More...
Inherits Interface.
List of all members.
Public Members
- virtual long render (const Matrix3D* transform=NULL) = 0
- Render the object to the current scene using the transformation given by transform.
- virtual long status () const = 0
- Returns status of object (0=ok, else error).
- virtual long orientSound (SoundBuffer* S) = 0
- Locate a 3D sound buffer in this object's location.
- virtual long collision (const Mesh* O, const Transformable* transform=NULL) const = 0
- Check for collision with this object Returns a non-zero value if a collision is detected.
- virtual long collision (const Transformable& t1, const Mesh* O2, const Transformable& t2) const = 0
- Check for collision with this object overriding both source and dest mesh transformables.
- virtual long advance (const float Fraction) = 0
- Should be called from main world advance if blinking materials are used.
- virtual float getRadius () const = 0
- Get the object's rough radius, (non-optimized bounding sphere).
- virtual long setRadius (const float Radius) = 0
- Set the object's radius, other than its actual one.
- virtual long exportXFile (ostream& os) const = 0
- Exports the object to a text .X file.
- virtual long exportData (float* Vertices, int* VerticesNumber, short* Faces, int* FacesNumber, float* Materials, int* MaterialsNumber) const = 0
- Exports the model's data to the supplied areas.
- virtual long setPosition (const float x, const float y, const float z) = 0
- Set the object's position.
- virtual long relocate (const float dx, const float dy, const float dz) = 0
- Move the object relative to its current position.
- virtual long rotate (const float ax, const float ay, const float az) = 0
- Rotate around any or all axes (angles in radians).
- virtual long align (const Mesh* O) = 0
- Set the position and orientation according to this object.
- virtual Vector3D direction (const float Size=1.0f) = 0
- Get direction vector, scaled to Size.
- virtual Vector3D direction_up (const float Size=1.0f) = 0
- Get the up direction vector, scaled to Size.
Detailed Description
A Mesh of triangles that represent an object in 3D Space.
The interface provides methods for: creating the mesh, moving it in 3D space and rendering it.
Member Function Documentation
virtual long Mesh::render(const Matrix3D* transform=NULL) = 0 [pure virtual]
Render the object to the current scene using the transformation given by transform.
If transform == NULL,
the Mesh's own internal transform will be used.
virtual long Mesh::status() const = 0 [pure virtual]
Returns status of object (0=ok, else error).
virtual long Mesh::orientSound(SoundBuffer* S) = 0 [pure virtual]
Locate a 3D sound buffer in this object's location.
virtual long Mesh::collision(const Mesh* O, const Transformable* transform=NULL) const = 0 [pure virtual]
Check for collision with this object Returns a non-zero value if a collision is detected.
If transform ==
NULL, both this and Mesh O are to be transformed by their own internal
transformations; otherwise, the given transform is applied to O and is
assumed to be relative to this (no transform is applied to this).
virtual long Mesh::collision(const Transformable& t1, const Mesh* O2, const Transformable& t2) const = 0 [pure virtual]
Check for collision with this object overriding both source and dest mesh transformables.
Returns a non-zero value if a collision is detected.
virtual long Mesh::advance(const float Fraction) = 0 [pure virtual]
Should be called from main world advance if blinking materials are used.
virtual float Mesh::getRadius() const = 0 [pure virtual]
Get the object's rough radius, (non-optimized bounding sphere).
virtual long Mesh::setRadius(const float Radius) = 0 [pure virtual]
Set the object's radius, other than its actual one.
virtual long Mesh::exportXFile(ostream& os) const = 0 [pure virtual]
Exports the object to a text .X file.
virtual long Mesh::exportData(float* Vertices, int* VerticesNumber, short* Faces, int* FacesNumber, float* Materials, int* MaterialsNumber) const = 0 [pure virtual]
Exports the model's data to the supplied areas.
Specify NULL for any parameter to skip retrieval of that info.
Vertices Array size should be 5 * VerticesNumber
Faces Array size should be 4 * FacesNumber
Materials Array size should be 17 * MaterialsNumber
virtual long Mesh::setPosition(const float x, const float y, const float z) = 0 [pure virtual]
Set the object's position.
virtual long Mesh::relocate(const float dx, const float dy, const float dz) = 0 [pure virtual]
Move the object relative to its current position.
virtual long Mesh::rotate(const float ax, const float ay, const float az) = 0 [pure virtual]
Rotate around any or all axes (angles in radians).
virtual long Mesh::align(const Mesh* O) = 0 [pure virtual]
Set the position and orientation according to this object.
virtual Vector3D Mesh::direction(const float Size=1.0f) = 0 [pure virtual]
Get direction vector, scaled to Size.
virtual Vector3D Mesh::direction_up(const float Size=1.0f) = 0 [pure virtual]
Get the up direction vector, scaled to Size.
The documentation for this class was generated from the following file: