Irrlicht 3D Engine
IMesh.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_MESH_H_INCLUDED__
6 #define __I_MESH_H_INCLUDED__
7 
8 #include "IReferenceCounted.h"
9 #include "SMaterial.h"
10 #include "EHardwareBufferFlags.h"
11 
12 namespace irr
13 {
14 namespace scene
15 {
16  class IMeshBuffer;
17 
19 
23  class IMesh : public virtual IReferenceCounted
24  {
25  public:
26 
28 
29  virtual u32 getMeshBufferCount() const = 0;
30 
32 
36  virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0;
37 
39 
42  virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0;
43 
45 
46  virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
47 
49 
50  virtual void setBoundingBox( const core::aabbox3df& box) = 0;
51 
53 
55  virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0;
56 
58 
62  virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
63 
65 
68  virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
69  };
70 
71 } // end namespace scene
72 } // end namespace irr
73 
74 #endif
75 
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0
Set the hardware mapping hint.
Everything in the Irrlicht Engine can be found in this namespace.
Definition: aabbox3d.h:12
virtual IMeshBuffer * getMeshBuffer(u32 nr) const =0
Get pointer to a mesh buffer.
Class which holds the geometry of an object.
Definition: IMesh.h:23
virtual u32 getMeshBufferCount() const =0
Get the amount of mesh buffers.
Struct for holding a mesh with a single material.
Definition: IMeshBuffer.h:39
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)=0
Sets a flag of all contained materials to a new value.
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:58
virtual const core::aabbox3d< f32 > & getBoundingBox() const =0
Get an axis aligned bounding box of the mesh.
Change both vertex and index mapping to the same value.
virtual void setBoundingBox(const core::aabbox3df &box)=0
Set user-defined axis aligned bounding box.
E_MATERIAL_FLAG
Material flags.
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0
Flag the meshbuffer as changed, reloads hardware buffers.
Base class of most objects of the Irrlicht Engine.
Struct for holding parameters for a material renderer.
Definition: SMaterial.h:226