Saga3D API Documentation  1.0-RC4
saga::scene::IMesh Class Referenceabstract

Class which holds the geometry of an object. More...

#include <IMesh.h>

Inheritance diagram for saga::scene::IMesh:
saga::scene::IAnimatedMesh saga::scene::SMesh saga::scene::ISkinnedMesh saga::scene::SAnimatedMesh

Public Member Functions

void setID (const ID id)
 
ID getID () const
 
virtual void addMeshBuffer (std::unique_ptr< IMeshBuffer > buf)=0
 adds a MeshBuffer More...
 
virtual std::uint32_t getMeshBufferCount () const =0
 Get the amount of mesh buffers. More...
 
virtual IMeshBuffergetMeshBuffer (std::uint32_t nr=0)=0
 Get pointer to a mesh buffer. More...
 
virtual const core::aabbox3d< float > & getBoundingBox () const =0
 Get an axis aligned bounding box of the mesh. More...
 
virtual void setBoundingBox (const core::aabbox3df &box)=0
 Set user-defined axis aligned bounding box. More...
 
virtual E_MESH_TYPE getMeshType () const =0
 

Protected Attributes

ID MeshID = INVALID_ID
 ID of this mesh. More...
 

Detailed Description

Class which holds the geometry of an object.

An IMesh is nothing more than a collection of some mesh buffers (IMeshBuffer). SMesh is a simple implementation of an IMesh. A mesh is usually added to an IMeshSceneNode in order to be rendered.

Definition at line 27 of file IMesh.h.

Member Function Documentation

◆ addMeshBuffer()

virtual void saga::scene::IMesh::addMeshBuffer ( std::unique_ptr< IMeshBuffer buf)
pure virtual

adds a MeshBuffer

The bounding box is not updated automatically.

Implemented in saga::scene::SAnimatedMesh, and saga::scene::SMesh.

◆ getBoundingBox()

virtual const core::aabbox3d<float>& saga::scene::IMesh::getBoundingBox ( ) const
pure virtual

Get an axis aligned bounding box of the mesh.

Returns
Bounding box of this mesh.

Implemented in saga::scene::SMesh, and saga::scene::SAnimatedMesh.

◆ getID()

ID saga::scene::IMesh::getID ( ) const
inline

Definition at line 32 of file IMesh.h.

◆ getMeshBuffer()

virtual IMeshBuffer& saga::scene::IMesh::getMeshBuffer ( std::uint32_t  nr = 0)
pure virtual

Get pointer to a mesh buffer.

Parameters
nrZero based index of the mesh buffer. The maximum value is getMeshBufferCount() - 1;
Returns
Pointer to the mesh buffer or 0 if there is no such mesh buffer.

Implemented in saga::scene::SAnimatedMesh, and saga::scene::SMesh.

◆ getMeshBufferCount()

virtual std::uint32_t saga::scene::IMesh::getMeshBufferCount ( ) const
pure virtual

Get the amount of mesh buffers.

Returns
Amount of mesh buffers (IMeshBuffer) in this mesh.

Implemented in saga::scene::SMesh, and saga::scene::SAnimatedMesh.

◆ getMeshType()

virtual E_MESH_TYPE saga::scene::IMesh::getMeshType ( ) const
pure virtual

◆ setBoundingBox()

virtual void saga::scene::IMesh::setBoundingBox ( const core::aabbox3df box)
pure virtual

Set user-defined axis aligned bounding box.

Parameters
boxNew bounding box to use for the mesh.

Implemented in saga::scene::SMesh, and saga::scene::SAnimatedMesh.

◆ setID()

void saga::scene::IMesh::setID ( const ID  id)
inline

Definition at line 31 of file IMesh.h.

Member Data Documentation

◆ MeshID

ID saga::scene::IMesh::MeshID = INVALID_ID
protected

ID of this mesh.

Definition at line 61 of file IMesh.h.


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