Saga3D API Documentation  1.0-RC4
IMesh.h
Go to the documentation of this file.
1 #ifndef __I_MESH_H_INCLUDED__
2 #define __I_MESH_H_INCLUDED__
3 
4 #include "ID.h"
5 #include "aabbox3d.h"
6 #include <memory>
7 #include <SShaderBuffer.h>
8 
9 namespace saga
10 {
11 namespace scene
12 {
13  class IMeshBuffer;
14 
16  {
20  };
21 
23 
27  class IMesh
28  {
29  public:
30 
31  void setID(const ID id) { MeshID = id; }
32  ID getID() const { return MeshID; }
33 
35 
36  virtual void addMeshBuffer(std::unique_ptr<IMeshBuffer> buf) = 0;
37 
39 
40  virtual std::uint32_t getMeshBufferCount() const = 0;
41 
43 
47  virtual IMeshBuffer& getMeshBuffer(std::uint32_t nr = 0) = 0;
48 
50 
51  virtual const core::aabbox3d<float>& getBoundingBox() const = 0;
52 
54 
55  virtual void setBoundingBox(const core::aabbox3df& box) = 0;
56 
57  virtual E_MESH_TYPE getMeshType() const = 0;
58 
59  protected:
62  };
63 
64 } // namespace scene
65 } // namespace saga
66 
67 #endif
68 
saga::scene::ANIMATED
@ ANIMATED
Definition: IMesh.h:18
saga::scene::IMesh::getID
ID getID() const
Definition: IMesh.h:32
saga::scene::IMesh
Class which holds the geometry of an object.
Definition: IMesh.h:27
saga::scene::SKINNED
@ SKINNED
Definition: IMesh.h:19
saga::scene::IMesh::MeshID
ID MeshID
ID of this mesh.
Definition: IMesh.h:61
saga::scene::IMesh::getMeshType
virtual E_MESH_TYPE getMeshType() const =0
saga::scene::IMesh::getBoundingBox
virtual const core::aabbox3d< float > & getBoundingBox() const =0
Get an axis aligned bounding box of the mesh.
saga::scene::IMeshBuffer
Struct for holding a mesh with a single material.
Definition: IMeshBuffer.h:43
aabbox3d.h
saga::scene::IMesh::getMeshBuffer
virtual IMeshBuffer & getMeshBuffer(std::uint32_t nr=0)=0
Get pointer to a mesh buffer.
saga::INVALID_ID
constexpr auto INVALID_ID
Definition: ID.h:9
saga::ID
std::uint32_t ID
Type for node ID.
Definition: ID.h:11
saga::core::aabbox3d< float >
saga::scene::STATIC
@ STATIC
Definition: IMesh.h:17
saga::scene::IMesh::setBoundingBox
virtual void setBoundingBox(const core::aabbox3df &box)=0
Set user-defined axis aligned bounding box.
ID.h
saga::scene::IMesh::setID
void setID(const ID id)
Definition: IMesh.h:31
SShaderBuffer.h
saga::scene::IMesh::addMeshBuffer
virtual void addMeshBuffer(std::unique_ptr< IMeshBuffer > buf)=0
adds a MeshBuffer
saga::scene::E_MESH_TYPE
E_MESH_TYPE
Definition: IMesh.h:15
saga
Definition: aabbox3d.h:11
saga::scene::IMesh::getMeshBufferCount
virtual std::uint32_t getMeshBufferCount() const =0
Get the amount of mesh buffers.