diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/include/IMesh.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/libraries/irrlicht-1.8/include/IMesh.h b/libraries/irrlicht-1.8/include/IMesh.h index 8e0bcc2..89f936b 100644 --- a/libraries/irrlicht-1.8/include/IMesh.h +++ b/libraries/irrlicht-1.8/include/IMesh.h | |||
@@ -1,75 +1,75 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __I_MESH_H_INCLUDED__ | 5 | #ifndef __I_MESH_H_INCLUDED__ |
6 | #define __I_MESH_H_INCLUDED__ | 6 | #define __I_MESH_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IReferenceCounted.h" | 8 | #include "IReferenceCounted.h" |
9 | #include "SMaterial.h" | 9 | #include "SMaterial.h" |
10 | #include "EHardwareBufferFlags.h" | 10 | #include "EHardwareBufferFlags.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace scene | 14 | namespace scene |
15 | { | 15 | { |
16 | class IMeshBuffer; | 16 | class IMeshBuffer; |
17 | 17 | ||
18 | //! Class which holds the geometry of an object. | 18 | //! Class which holds the geometry of an object. |
19 | /** An IMesh is nothing more than a collection of some mesh buffers | 19 | /** An IMesh is nothing more than a collection of some mesh buffers |
20 | (IMeshBuffer). SMesh is a simple implementation of an IMesh. | 20 | (IMeshBuffer). SMesh is a simple implementation of an IMesh. |
21 | A mesh is usually added to an IMeshSceneNode in order to be rendered. | 21 | A mesh is usually added to an IMeshSceneNode in order to be rendered. |
22 | */ | 22 | */ |
23 | class IMesh : public virtual IReferenceCounted | 23 | class IMesh : public virtual IReferenceCounted |
24 | { | 24 | { |
25 | public: | 25 | public: |
26 | 26 | ||
27 | //! Get the amount of mesh buffers. | 27 | //! Get the amount of mesh buffers. |
28 | /** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */ | 28 | /** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */ |
29 | virtual u32 getMeshBufferCount() const = 0; | 29 | virtual u32 getMeshBufferCount() const = 0; |
30 | 30 | ||
31 | //! Get pointer to a mesh buffer. | 31 | //! Get pointer to a mesh buffer. |
32 | /** \param nr: Zero based index of the mesh buffer. The maximum value is | 32 | /** \param nr: Zero based index of the mesh buffer. The maximum value is |
33 | getMeshBufferCount() - 1; | 33 | getMeshBufferCount() - 1; |
34 | \return Pointer to the mesh buffer or 0 if there is no such | 34 | \return Pointer to the mesh buffer or 0 if there is no such |
35 | mesh buffer. */ | 35 | mesh buffer. */ |
36 | virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0; | 36 | virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0; |
37 | 37 | ||
38 | //! Get pointer to a mesh buffer which fits a material | 38 | //! Get pointer to a mesh buffer which fits a material |
39 | /** \param material: material to search for | 39 | /** \param material: material to search for |
40 | \return Pointer to the mesh buffer or 0 if there is no such | 40 | \return Pointer to the mesh buffer or 0 if there is no such |
41 | mesh buffer. */ | 41 | mesh buffer. */ |
42 | virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0; | 42 | virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0; |
43 | 43 | ||
44 | //! Get an axis aligned bounding box of the mesh. | 44 | //! Get an axis aligned bounding box of the mesh. |
45 | /** \return Bounding box of this mesh. */ | 45 | /** \return Bounding box of this mesh. */ |
46 | virtual const core::aabbox3d<f32>& getBoundingBox() const = 0; | 46 | virtual const core::aabbox3d<f32>& getBoundingBox() const = 0; |
47 | 47 | ||
48 | //! Set user-defined axis aligned bounding box | 48 | //! Set user-defined axis aligned bounding box |
49 | /** \param box New bounding box to use for the mesh. */ | 49 | /** \param box New bounding box to use for the mesh. */ |
50 | virtual void setBoundingBox( const core::aabbox3df& box) = 0; | 50 | virtual void setBoundingBox( const core::aabbox3df& box) = 0; |
51 | 51 | ||
52 | //! Sets a flag of all contained materials to a new value. | 52 | //! Sets a flag of all contained materials to a new value. |
53 | /** \param flag: Flag to set in all materials. | 53 | /** \param flag: Flag to set in all materials. |
54 | \param newvalue: New value to set in all materials. */ | 54 | \param newvalue: New value to set in all materials. */ |
55 | virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0; | 55 | virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0; |
56 | 56 | ||
57 | //! Set the hardware mapping hint | 57 | //! Set the hardware mapping hint |
58 | /** This methods allows to define optimization hints for the | 58 | /** This methods allows to define optimization hints for the |
59 | hardware. This enables, e.g., the use of hardware buffers on | 59 | hardware. This enables, e.g., the use of hardware buffers on |
60 | pltforms that support this feature. This can lead to noticeable | 60 | pltforms that support this feature. This can lead to noticeable |
61 | performance gains. */ | 61 | performance gains. */ |
62 | virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; | 62 | virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; |
63 | 63 | ||
64 | //! Flag the meshbuffer as changed, reloads hardware buffers | 64 | //! Flag the meshbuffer as changed, reloads hardware buffers |
65 | /** This method has to be called every time the vertices or | 65 | /** This method has to be called every time the vertices or |
66 | indices have changed. Otherwise, changes won't be updated | 66 | indices have changed. Otherwise, changes won't be updated |
67 | on the GPU in the next render cycle. */ | 67 | on the GPU in the next render cycle. */ |
68 | virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; | 68 | virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | } // end namespace scene | 71 | } // end namespace scene |
72 | } // end namespace irr | 72 | } // end namespace irr |
73 | 73 | ||
74 | #endif | 74 | #endif |
75 | 75 | ||