Loading...
Searching...
No Matches
IMeshBuffer.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_MESH_BUFFER_H_INCLUDED__
#define __I_MESH_BUFFER_H_INCLUDED__
#include "IReferenceCounted.h"
#include "SMaterial.h"
#include "aabbox3d.h"
#include "S3DVertex.h"
#include "SVertexIndex.h"
#include "EHardwareBufferFlags.h"
#include "EPrimitiveTypes.h"
namespace irr
{
namespace scene
{
class IMeshBuffer : public virtual IReferenceCounted
{
public:
virtual video::SMaterial& getMaterial() = 0;
virtual const video::SMaterial& getMaterial() const = 0;
virtual video::E_VERTEX_TYPE getVertexType() const = 0;
virtual const void* getVertices() const = 0;
virtual void* getVertices() = 0;
virtual u32 getVertexCount() const = 0;
virtual video::E_INDEX_TYPE getIndexType() const =0;
virtual const u16* getIndices() const = 0;
virtual u16* getIndices() = 0;
virtual u32 getIndexCount() const = 0;
virtual const core::aabbox3df& getBoundingBox() const = 0;
virtual void setBoundingBox(const core::aabbox3df& box) = 0;
virtual void recalculateBoundingBox() = 0;
virtual const core::vector3df& getPosition(u32 i) const = 0;
virtual core::vector3df& getPosition(u32 i) = 0;
virtual const core::vector3df& getNormal(u32 i) const = 0;
virtual core::vector3df& getNormal(u32 i) = 0;
virtual const core::vector2df& getTCoords(u32 i) const = 0;
virtual core::vector2df& getTCoords(u32 i) = 0;
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) = 0;
virtual void append(const IMeshBuffer* const other) = 0;
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0;
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0;
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) = 0;
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
virtual u32 getChangedID_Vertex() const = 0;
virtual u32 getChangedID_Index() const = 0;
};
} // end namespace scene
} // end namespace irr
#endif
EHardwareBufferFlags.h
EPrimitiveTypes.h
IReferenceCounted.h
S3DVertex.h
SMaterial.h
SVertexIndex.h
aabbox3d.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::scene::IMeshBuffer
Struct for holding a mesh with a single material.
Definition IMeshBuffer.h:40
irr::scene::IMeshBuffer::setHardwareMappingHint
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0
set the hardware mapping hint, for driver
irr::scene::IMeshBuffer::getIndices
virtual u16 * getIndices()=0
Get access to Indices.
irr::scene::IMeshBuffer::getPosition
virtual const core::vector3df & getPosition(u32 i) const =0
returns position of vertex i
irr::scene::IMeshBuffer::getVertices
virtual void * getVertices()=0
Get access to vertex data. The data is an array of vertices.
irr::scene::IMeshBuffer::recalculateBoundingBox
virtual void recalculateBoundingBox()=0
Recalculates the bounding box. Should be called if the mesh changed.
irr::scene::IMeshBuffer::setDirty
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0
flags the meshbuffer as changed, reloads hardware buffers
irr::scene::IMeshBuffer::getHardwareMappingHint_Index
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const =0
get the current hardware mapping hint
irr::scene::IMeshBuffer::getNormal
virtual core::vector3df & getNormal(u32 i)=0
returns normal of vertex i
irr::scene::IMeshBuffer::getTCoords
virtual const core::vector2df & getTCoords(u32 i) const =0
returns texture coord of vertex i
irr::scene::IMeshBuffer::getIndices
virtual const u16 * getIndices() const =0
Get access to Indices.
irr::scene::IMeshBuffer::getNormal
virtual const core::vector3df & getNormal(u32 i) const =0
returns normal of vertex i
irr::scene::IMeshBuffer::getVertexType
virtual video::E_VERTEX_TYPE getVertexType() const =0
Get type of vertex data which is stored in this meshbuffer.
irr::scene::IMeshBuffer::getVertexCount
virtual u32 getVertexCount() const =0
Get amount of vertices in meshbuffer.
irr::scene::IMeshBuffer::append
virtual void append(const IMeshBuffer *const other)=0
Append the meshbuffer to the current buffer.
irr::scene::IMeshBuffer::getIndexType
virtual video::E_INDEX_TYPE getIndexType() const =0
Get type of index data which is stored in this meshbuffer.
irr::scene::IMeshBuffer::getMaterial
virtual video::SMaterial & getMaterial()=0
Get the material of this meshbuffer.
irr::scene::IMeshBuffer::getVertices
virtual const void * getVertices() const =0
Get access to vertex data. The data is an array of vertices.
irr::scene::IMeshBuffer::getIndexCount
virtual u32 getIndexCount() const =0
Get amount of indices in this meshbuffer.
irr::scene::IMeshBuffer::getTCoords
virtual core::vector2df & getTCoords(u32 i)=0
returns texture coord of vertex i
irr::scene::IMeshBuffer::getChangedID_Vertex
virtual u32 getChangedID_Vertex() const =0
Get the currently used ID for identification of changes.
irr::scene::IMeshBuffer::getHardwareMappingHint_Vertex
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const =0
get the current hardware mapping hint
irr::scene::IMeshBuffer::getBoundingBox
virtual const core::aabbox3df & getBoundingBox() const =0
Get the axis aligned bounding box of this meshbuffer.
irr::scene::IMeshBuffer::append
virtual void append(const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)=0
Append the vertices and indices to the current buffer.
irr::scene::IMeshBuffer::getChangedID_Index
virtual u32 getChangedID_Index() const =0
Get the currently used ID for identification of changes.
irr::scene::IMeshBuffer::getMaterial
virtual const video::SMaterial & getMaterial() const =0
Get the material of this meshbuffer.
irr::scene::IMeshBuffer::setBoundingBox
virtual void setBoundingBox(const core::aabbox3df &box)=0
Set axis aligned bounding box.
irr::scene::IMeshBuffer::getPosition
virtual core::vector3df & getPosition(u32 i)=0
returns position of vertex i
irr::video::SMaterial
Struct for holding parameters for a material renderer.
Definition SMaterial.h:227
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
irr::core::vector2df
vector2d< f32 > vector2df
Typedef for f32 2d vector.
Definition vector2d.h:323
irr::core::aabbox3df
aabbox3d< f32 > aabbox3df
Typedef for a f32 3d bounding box.
Definition aabbox3d.h:324
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr::scene::E_BUFFER_TYPE
E_BUFFER_TYPE
Definition EHardwareBufferFlags.h:29
irr::scene::EBT_VERTEX_AND_INDEX
@ EBT_VERTEX_AND_INDEX
Change both vertex and index mapping to the same value.
Definition EHardwareBufferFlags.h:37
irr::scene::E_HARDWARE_MAPPING
E_HARDWARE_MAPPING
Definition EHardwareBufferFlags.h:14
irr::video::E_VERTEX_TYPE
E_VERTEX_TYPE
Enumeration for all vertex types there are.
Definition S3DVertex.h:19
irr::video::E_INDEX_TYPE
E_INDEX_TYPE
Definition SVertexIndex.h:16
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::u16
unsigned short u16
16 bit unsigned variable.
Definition irrTypes.h:40
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0