Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# IMeshBuffer.h

Go to the documentation of this file.

    00001 // Copyright (C) 2002-2009 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __I_MESH_BUFFER_H_INCLUDED__
    00006 #define __I_MESH_BUFFER_H_INCLUDED__
    00007
    00008 #include "IReferenceCounted.h"
    00009 #include "SMaterial.h"
    00010 #include "aabbox3d.h"
    00011 #include "S3DVertex.h"
    00012 #include "SVertexIndex.h"
    00013 #include "EHardwareBufferFlags.h"
    00014
    00015 namespace irr
    00016 {
    00017 namespace scene
    00018 {
    00019
    00021         enum E_PRIMITIVE_TYPE
    00022         {
    00024                 EPT_POINTS=0,
    00025
    00027                 EPT_LINE_STRIP,
    00028
    00030                 EPT_LINE_LOOP,
    00031
    00033                 EPT_LINES,
    00034
    00037                 EPT_TRIANGLE_STRIP,
    00038
    00041                 EPT_TRIANGLE_FAN,
    00042
    00044                 EPT_TRIANGLES,
    00045
    00047                 EPT_QUAD_STRIP,
    00048
    00050                 EPT_QUADS,
    00051
    00053                 EPT_POLYGON,
    00054
    00056                 EPT_POINT_SPRITES
    00057         };
    00058
    00060
    00078         class IMeshBuffer : public virtual IReferenceCounted
    00079         {
    00080         public:
    00081
    00083
    00084                 virtual video::SMaterial& getMaterial() = 0;
    00085
    00087
    00088                 virtual const video::SMaterial& getMaterial() const = 0;
    00089
    00091
    00092                 virtual video::E_VERTEX_TYPE getVertexType() const = 0;
    00093
    00095
    00097                 virtual const void* getVertices() const = 0;
    00098
    00100
    00102                 virtual void* getVertices() = 0;
    00103
    00105
    00106                 virtual u32 getVertexCount() const = 0;
    00107
    00109
    00110                 virtual video::E_INDEX_TYPE getIndexType() const =0;
    00111
    00113
    00114                 virtual const u16* getIndices() const = 0;
    00115
    00117
    00118                 virtual u16* getIndices() = 0;
    00119
    00121
    00122                 virtual u32 getIndexCount() const = 0;
    00123
    00125
    00126                 virtual const core::aabbox3df& getBoundingBox() const = 0;
    00127
    00129
    00131                 virtual void setBoundingBox(const core::aabbox3df& box) = 0;
    00132
    00134                 virtual void recalculateBoundingBox() = 0;
    00135
    00137                 virtual const core::vector3df& getPosition(u32 i) const = 0;
    00138
    00140                 virtual core::vector3df& getPosition(u32 i) = 0;
    00141
    00143                 virtual const core::vector3df& getNormal(u32 i) const = 0;
    00144
    00146                 virtual core::vector3df& getNormal(u32 i) = 0;
    00147
    00149                 virtual const core::vector2df& getTCoords(u32 i) const = 0;
    00150
    00152                 virtual core::vector2df& getTCoords(u32 i) = 0;
    00153
    00155
    00160                 virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) = 0;
    00161
    00163
    00165                 virtual void append(const IMeshBuffer* const other) = 0;
    00166
    00168                 virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const = 0;
    00169
    00171                 virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const = 0;
    00172
    00174                 virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) = 0;
    00175
    00177                 virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
    00178
    00180
    00181                 virtual u32 getChangedID_Vertex() const = 0;
    00182
    00184
    00185                 virtual u32 getChangedID_Index() const = 0;
    00186         };
    00187
    00188 } // end namespace scene
    00189 } // end namespace irr
    00190
    00191 #endif
    00192
    00193

| The Irrlicht Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated on Sun Jan 10 09:24:03 2010 by Doxygen (1.5.6)