arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::scene::CDynamicMeshBuffer Class Reference

#include <CDynamicMeshBuffer.h>

Inheritance diagram for irr::scene::CDynamicMeshBuffer:
irr::scene::IDynamicMeshBuffer irr::scene::IMeshBuffer irr::IReferenceCounted

Public Member Functions

 CDynamicMeshBuffer (video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType)
 constructor More...
 
virtual ~CDynamicMeshBuffer ()
 destructor More...
 
virtual IVertexBuffergetVertexBuffer () const _IRR_OVERRIDE_
 
virtual IIndexBuffergetIndexBuffer () const _IRR_OVERRIDE_
 
virtual void setVertexBuffer (IVertexBuffer *newVertexBuffer) _IRR_OVERRIDE_
 
virtual void setIndexBuffer (IIndexBuffer *newIndexBuffer) _IRR_OVERRIDE_
 
virtual const video::SMaterialgetMaterial () const _IRR_OVERRIDE_
 Get Material of this buffer. More...
 
virtual video::SMaterialgetMaterial () _IRR_OVERRIDE_
 Get Material of this buffer. More...
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const _IRR_OVERRIDE_
 Get bounding box. More...
 
virtual void setBoundingBox (const core::aabbox3df &box) _IRR_OVERRIDE_
 Set bounding box. More...
 
virtual void recalculateBoundingBox () _IRR_OVERRIDE_
 Recalculate bounding box. More...
 
virtual void setPrimitiveType (E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
 Describe what kind of primitive geometry is used by the meshbuffer. More...
 
virtual E_PRIMITIVE_TYPE getPrimitiveType () const _IRR_OVERRIDE_
 Get the kind of primitive geometry which is used by the meshbuffer. More...
 
- Public Member Functions inherited from irr::scene::IDynamicMeshBuffer
virtual void append (const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices) _IRR_OVERRIDE_
 Append the vertices and indices to the current buffer. More...
 
virtual void append (const IMeshBuffer *const other) _IRR_OVERRIDE_
 Append the meshbuffer to the current buffer. More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const _IRR_OVERRIDE_
 get the current hardware mapping hint More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const _IRR_OVERRIDE_
 get the current hardware mapping hint More...
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
 set the hardware mapping hint, for driver More...
 
virtual void setDirty (E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
 flags the mesh as changed, reloads hardware buffers More...
 
virtual u32 getChangedID_Vertex () const _IRR_OVERRIDE_
 Get the currently used ID for identification of changes. More...
 
virtual u32 getChangedID_Index () const _IRR_OVERRIDE_
 Get the currently used ID for identification of changes. More...
 
virtual video::E_VERTEX_TYPE getVertexType () const _IRR_OVERRIDE_
 Get type of vertex data which is stored in this meshbuffer. More...
 
virtual const voidgetVertices () const _IRR_OVERRIDE_
 Get access to vertex data. The data is an array of vertices. More...
 
virtual voidgetVertices () _IRR_OVERRIDE_
 Get access to vertex data. The data is an array of vertices. More...
 
virtual u32 getVertexCount () const _IRR_OVERRIDE_
 Get amount of vertices in meshbuffer. More...
 
virtual video::E_INDEX_TYPE getIndexType () const _IRR_OVERRIDE_
 Get type of index data which is stored in this meshbuffer. More...
 
virtual const u16getIndices () const _IRR_OVERRIDE_
 Get access to indices. More...
 
virtual u16getIndices () _IRR_OVERRIDE_
 Get access to indices. More...
 
virtual u32 getIndexCount () const _IRR_OVERRIDE_
 Get amount of indices in this meshbuffer. More...
 
virtual const core::vector3dfgetPosition (u32 i) const _IRR_OVERRIDE_
 returns position of vertex i More...
 
virtual core::vector3dfgetPosition (u32 i) _IRR_OVERRIDE_
 returns position of vertex i More...
 
virtual const core::vector2dfgetTCoords (u32 i) const _IRR_OVERRIDE_
 returns texture coords of vertex i More...
 
virtual core::vector2dfgetTCoords (u32 i) _IRR_OVERRIDE_
 returns texture coords of vertex i More...
 
virtual const core::vector3dfgetNormal (u32 i) const _IRR_OVERRIDE_
 returns normal of vertex i More...
 
virtual core::vector3dfgetNormal (u32 i) _IRR_OVERRIDE_
 returns normal of vertex i More...
 
- Public Member Functions inherited from irr::scene::IMeshBuffer
virtual u32 getPrimitiveCount () const
 Calculate how many geometric primitives are used by this meshbuffer. More...
 
- Public Member Functions inherited from irr::IReferenceCounted
 IReferenceCounted ()
 Constructor. More...
 
virtual ~IReferenceCounted ()
 Destructor. More...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
const c8getDebugName () const
 Returns the debug name of the object. More...
 

Public Attributes

video::SMaterial Material
 
core::aabbox3d< f32BoundingBox
 
E_PRIMITIVE_TYPE PrimitiveType
 Primitive type used for rendering (triangles, lines, ...) More...
 

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object. More...
 

Detailed Description

Definition at line 18 of file CDynamicMeshBuffer.h.

Constructor & Destructor Documentation

◆ CDynamicMeshBuffer()

irr::scene::CDynamicMeshBuffer::CDynamicMeshBuffer ( video::E_VERTEX_TYPE  vertexType,
video::E_INDEX_TYPE  indexType 
)
inline

constructor

Definition at line 22 of file CDynamicMeshBuffer.h.

24  {
25  VertexBuffer=new CVertexBuffer(vertexType);
26  IndexBuffer=new CIndexBuffer(indexType);
27  }
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)
Explicitly set all vertices for each triangle.

◆ ~CDynamicMeshBuffer()

virtual irr::scene::CDynamicMeshBuffer::~CDynamicMeshBuffer ( )
inlinevirtual

destructor

Definition at line 30 of file CDynamicMeshBuffer.h.

31  {
32  if (VertexBuffer)
33  VertexBuffer->drop();
34  if (IndexBuffer)
35  IndexBuffer->drop();
36  }
bool drop() const
Drops the object. Decrements the reference counter by one.

Member Function Documentation

◆ getBoundingBox()

virtual const core::aabbox3d<f32>& irr::scene::CDynamicMeshBuffer::getBoundingBox ( ) const
inlinevirtual

Get bounding box.

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 81 of file CDynamicMeshBuffer.h.

82  {
83  return BoundingBox;
84  }
core::aabbox3d< f32 > BoundingBox

◆ getIndexBuffer()

virtual IIndexBuffer& irr::scene::CDynamicMeshBuffer::getIndexBuffer ( ) const
inlinevirtual

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 43 of file CDynamicMeshBuffer.h.

44  {
45  return *IndexBuffer;
46  }

◆ getMaterial() [1/2]

virtual const video::SMaterial& irr::scene::CDynamicMeshBuffer::getMaterial ( ) const
inlinevirtual

Get Material of this buffer.

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 69 of file CDynamicMeshBuffer.h.

70  {
71  return Material;
72  }

◆ getMaterial() [2/2]

virtual video::SMaterial& irr::scene::CDynamicMeshBuffer::getMaterial ( )
inlinevirtual

Get Material of this buffer.

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 75 of file CDynamicMeshBuffer.h.

76  {
77  return Material;
78  }

◆ getPrimitiveType()

virtual E_PRIMITIVE_TYPE irr::scene::CDynamicMeshBuffer::getPrimitiveType ( ) const
inlinevirtual

Get the kind of primitive geometry which is used by the meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 112 of file CDynamicMeshBuffer.h.

113  {
114  return PrimitiveType;
115  }
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)

◆ getVertexBuffer()

virtual IVertexBuffer& irr::scene::CDynamicMeshBuffer::getVertexBuffer ( ) const
inlinevirtual

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 38 of file CDynamicMeshBuffer.h.

39  {
40  return *VertexBuffer;
41  }

◆ recalculateBoundingBox()

virtual void irr::scene::CDynamicMeshBuffer::recalculateBoundingBox ( )
inlinevirtual

Recalculate bounding box.

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 93 of file CDynamicMeshBuffer.h.

94  {
95  if (!getVertexBuffer().size())
96  BoundingBox.reset(0,0,0);
97  else
98  {
100  for (u32 i=1; i<getVertexBuffer().size(); ++i)
102  }
103  }
virtual u32 size() const =0
GLsizeiptr size
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
Definition: aabbox3d.h:50
unsigned int u32
32 bit unsigned variable.
Definition: irrTypes.h:62
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
Definition: aabbox3d.h:74
core::aabbox3d< f32 > BoundingBox
virtual IVertexBuffer & getVertexBuffer() const _IRR_OVERRIDE_

◆ setBoundingBox()

virtual void irr::scene::CDynamicMeshBuffer::setBoundingBox ( const core::aabbox3df box)
inlinevirtual

Set bounding box.

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 87 of file CDynamicMeshBuffer.h.

88  {
89  BoundingBox = box;
90  }
core::aabbox3d< f32 > BoundingBox

◆ setIndexBuffer()

virtual void irr::scene::CDynamicMeshBuffer::setIndexBuffer ( IIndexBuffer newIndexBuffer)
inlinevirtual

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 58 of file CDynamicMeshBuffer.h.

59  {
60  if (newIndexBuffer)
61  newIndexBuffer->grab();
62  if (IndexBuffer)
63  IndexBuffer->drop();
64 
65  IndexBuffer=newIndexBuffer;
66  }
bool drop() const
Drops the object. Decrements the reference counter by one.

◆ setPrimitiveType()

virtual void irr::scene::CDynamicMeshBuffer::setPrimitiveType ( E_PRIMITIVE_TYPE  type)
inlinevirtual

Describe what kind of primitive geometry is used by the meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 106 of file CDynamicMeshBuffer.h.

107  {
109  }
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)
GLuint GLuint GLsizei GLenum type
Definition: SDL_opengl.h:1571

◆ setVertexBuffer()

virtual void irr::scene::CDynamicMeshBuffer::setVertexBuffer ( IVertexBuffer newVertexBuffer)
inlinevirtual

Implements irr::scene::IDynamicMeshBuffer.

Definition at line 48 of file CDynamicMeshBuffer.h.

49  {
50  if (newVertexBuffer)
51  newVertexBuffer->grab();
52  if (VertexBuffer)
53  VertexBuffer->drop();
54 
55  VertexBuffer=newVertexBuffer;
56  }
bool drop() const
Drops the object. Decrements the reference counter by one.

Member Data Documentation

◆ BoundingBox

core::aabbox3d<f32> irr::scene::CDynamicMeshBuffer::BoundingBox

Definition at line 118 of file CDynamicMeshBuffer.h.

◆ Material

video::SMaterial irr::scene::CDynamicMeshBuffer::Material

Definition at line 117 of file CDynamicMeshBuffer.h.

◆ PrimitiveType

E_PRIMITIVE_TYPE irr::scene::CDynamicMeshBuffer::PrimitiveType

Primitive type used for rendering (triangles, lines, ...)

Definition at line 120 of file CDynamicMeshBuffer.h.


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