Browse Source

checkin 1.8.4

master
Otto Naderer 3 years ago
parent
commit
cd359855c8
  1. BIN
      dll/win32/Irrlicht.dll
  2. BIN
      dll/win64/Irrlicht.dll
  3. 116
      inc/CDynamicMeshBuffer.h
  4. 226
      inc/CIndexBuffer.h
  5. 301
      inc/CMeshBuffer.h
  6. 210
      inc/CVertexBuffer.h
  7. 101
      inc/EAttributes.h
  8. 41
      inc/ECullingTypes.h
  9. 50
      inc/EDebugSceneTypes.h
  10. 60
      inc/EDeviceTypes.h
  11. 133
      inc/EDriverFeatures.h
  12. 64
      inc/EDriverTypes.h
  13. 38
      inc/EGUIAlignment.h
  14. 140
      inc/EGUIElementTypes.h
  15. 44
      inc/EHardwareBufferFlags.h
  16. 95
      inc/EMaterialFlags.h
  17. 234
      inc/EMaterialTypes.h
  18. 59
      inc/EMeshWriterEnums.h
  19. 36
      inc/EMessageBoxFlags.h
  20. 56
      inc/EPrimitiveTypes.h
  21. 58
      inc/ESceneNodeAnimatorTypes.h
  22. 106
      inc/ESceneNodeTypes.h
  23. 90
      inc/EShaderTypes.h
  24. 36
      inc/ETerrainElements.h
  25. 115
      inc/IAnimatedMesh.h
  26. 79
      inc/IAnimatedMeshMD2.h
  27. 304
      inc/IAnimatedMeshMD3.h
  28. 228
      inc/IAnimatedMeshSceneNode.h
  29. 71
      inc/IAttributeExchangingObject.h
  30. 738
      inc/IAttributes.h
  31. 75
      inc/IBillboardSceneNode.h
  32. 62
      inc/IBillboardTextSceneNode.h
  33. 108
      inc/IBoneSceneNode.h
  34. 207
      inc/ICameraSceneNode.h
  35. 405
      inc/IColladaMeshWriter.h
  36. 192
      inc/ICursorControl.h
  37. 42
      inc/IDummyTransformationSceneNode.h
  38. 211
      inc/IDynamicMeshBuffer.h
  39. 490
      inc/IEventReceiver.h
  40. 132
      inc/IFileArchive.h
  41. 94
      inc/IFileList.h
  42. 385
      inc/IFileSystem.h
  43. 474
      inc/IGPUProgrammingServices.h
  44. 151
      inc/IGUIButton.h
  45. 38
      inc/IGUICheckBox.h
  46. 30
      inc/IGUIColorSelectDialog.h
  47. 74
      inc/IGUIComboBox.h
  48. 162
      inc/IGUIContextMenu.h
  49. 135
      inc/IGUIEditBox.h
  50. 1037
      inc/IGUIElement.h
  51. 66
      inc/IGUIElementFactory.h
  52. 620
      inc/IGUIEnvironment.h
  53. 44
      inc/IGUIFileOpenDialog.h
  54. 104
      inc/IGUIFont.h
  55. 46
      inc/IGUIFontBitmap.h
  56. 58
      inc/IGUIImage.h
  57. 45
      inc/IGUIImageList.h
  58. 67
      inc/IGUIInOutFader.h
  59. 138
      inc/IGUIListBox.h
  60. 53
      inc/IGUIMeshViewer.h
  61. 65
      inc/IGUIScrollBar.h
  62. 574
      inc/IGUISkin.h
  63. 69
      inc/IGUISpinBox.h
  64. 95
      inc/IGUISpriteBank.h
  65. 135
      inc/IGUIStaticText.h
  66. 136
      inc/IGUITabControl.h
  67. 205
      inc/IGUITable.h
  68. 40
      inc/IGUIToolbar.h
  69. 278
      inc/IGUITreeView.h
  70. 74
      inc/IGUIWindow.h
  71. 177
      inc/IGeometryCreator.h
  72. 155
      inc/IImage.h
  73. 53
      inc/IImageLoader.h
  74. 45
      inc/IImageWriter.h
  75. 65
      inc/IIndexBuffer.h
  76. 62
      inc/ILightManager.h
  77. 86
      inc/ILightSceneNode.h
  78. 102
      inc/ILogger.h
  79. 101
      inc/IMaterialRenderer.h
  80. 115
      inc/IMaterialRendererServices.h
  81. 75
      inc/IMesh.h
  82. 154
      inc/IMeshBuffer.h
  83. 177
      inc/IMeshCache.h
  84. 53
      inc/IMeshLoader.h
  85. 393
      inc/IMeshManipulator.h
  86. 79
      inc/IMeshSceneNode.h
  87. 58
      inc/IMeshWriter.h
  88. 43
      inc/IMetaTriangleSelector.h
  89. 50
      inc/IOSOperator.h
  90. 72
      inc/IParticleAffector.h
  91. 54
      inc/IParticleAnimatedMeshSceneNodeEmitter.h
  92. 59
      inc/IParticleAttractionAffector.h
  93. 36
      inc/IParticleBoxEmitter.h
  94. 59
      inc/IParticleCylinderEmitter.h
  95. 129
      inc/IParticleEmitter.h
  96. 41
      inc/IParticleFadeOutAffector.h
  97. 42
      inc/IParticleGravityAffector.h
  98. 54
      inc/IParticleMeshEmitter.h
  99. 47
      inc/IParticleRingEmitter.h
  100. 41
      inc/IParticleRotationAffector.h

BIN
dll/win32/Irrlicht.dll

Binary file not shown.

BIN
dll/win64/Irrlicht.dll

Binary file not shown.

116
inc/CDynamicMeshBuffer.h

@ -0,0 +1,116 @@
// Copyright (C) 2008-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_DYNAMIC_MESHBUFFER_H_INCLUDED__
#define __C_DYNAMIC_MESHBUFFER_H_INCLUDED__
#include "IDynamicMeshBuffer.h"
#include "CVertexBuffer.h"
#include "CIndexBuffer.h"
namespace irr
{
namespace scene
{
class CDynamicMeshBuffer: public IDynamicMeshBuffer
{
public:
//! constructor
CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType)
{
VertexBuffer=new CVertexBuffer(vertexType);
IndexBuffer=new CIndexBuffer(indexType);
}
//! destructor
virtual ~CDynamicMeshBuffer()
{
if (VertexBuffer)
VertexBuffer->drop();
if (IndexBuffer)
IndexBuffer->drop();
}
virtual IVertexBuffer& getVertexBuffer() const
{
return *VertexBuffer;
}
virtual IIndexBuffer& getIndexBuffer() const
{
return *IndexBuffer;
}
virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer)
{
if (newVertexBuffer)
newVertexBuffer->grab();
if (VertexBuffer)
VertexBuffer->drop();
VertexBuffer=newVertexBuffer;
}
virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer)
{
if (newIndexBuffer)
newIndexBuffer->grab();
if (IndexBuffer)
IndexBuffer->drop();
IndexBuffer=newIndexBuffer;
}
//! Get Material of this buffer.
virtual const video::SMaterial& getMaterial() const
{
return Material;
}
//! Get Material of this buffer.
virtual video::SMaterial& getMaterial()
{
return Material;
}
//! Get bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const
{
return BoundingBox;
}
//! Set bounding box
virtual void setBoundingBox( const core::aabbox3df& box)
{
BoundingBox = box;
}
//! Recalculate bounding box
virtual void recalculateBoundingBox()
{
if (!getVertexBuffer().size())
BoundingBox.reset(0,0,0);
else
{
BoundingBox.reset(getVertexBuffer()[0].Pos);
for (u32 i=1; i<getVertexBuffer().size(); ++i)
BoundingBox.addInternalPoint(getVertexBuffer()[i].Pos);
}
}
video::SMaterial Material;
core::aabbox3d<f32> BoundingBox;
private:
IVertexBuffer *VertexBuffer;
IIndexBuffer *IndexBuffer;
};
} // end namespace scene
} // end namespace irr
#endif

226
inc/CIndexBuffer.h

@ -0,0 +1,226 @@
// Copyright (C) 2008-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_INDEX_BUFFER_H_INCLUDED__
#define __C_INDEX_BUFFER_H_INCLUDED__
#include "IIndexBuffer.h"
namespace irr
{
namespace scene
{
class CIndexBuffer : public IIndexBuffer
{
class IIndexList
{
public:
virtual ~IIndexList(){};
virtual u32 stride() const =0;
virtual u32 size() const =0;
virtual void push_back(const u32 &element) =0;
virtual u32 operator [](u32 index) const =0;
virtual u32 getLast() =0;
virtual void setValue(u32 index, u32 value) =0;
virtual void set_used(u32 usedNow) =0;
virtual void reallocate(u32 new_size) =0;
virtual u32 allocated_size() const =0;
virtual void* pointer() =0;
virtual video::E_INDEX_TYPE getType() const =0;
};
template <class T>
class CSpecificIndexList : public IIndexList
{
public:
core::array<T> Indices;
virtual u32 stride() const {return sizeof(T);}
virtual u32 size() const {return Indices.size();}
virtual void push_back(const u32 &element)
{
// push const ref due to compiler problem with gcc 4.6, big endian
Indices.push_back((const T&)element);
}
virtual u32 operator [](u32 index) const
{
return (u32)(Indices[index]);
}
virtual u32 getLast() {return (u32)Indices.getLast();}
virtual void setValue(u32 index, u32 value)
{
Indices[index]=(T)value;
}
virtual void set_used(u32 usedNow)
{
Indices.set_used(usedNow);
}
virtual void reallocate(u32 new_size)
{
Indices.reallocate(new_size);
}
virtual u32 allocated_size() const
{
return Indices.allocated_size();
}
virtual void* pointer() {return Indices.pointer();}
virtual video::E_INDEX_TYPE getType() const
{
if (sizeof(T)==sizeof(u16))
return video::EIT_16BIT;
else
return video::EIT_32BIT;
}
};
public:
IIndexList *Indices;
CIndexBuffer(video::E_INDEX_TYPE IndexType) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1)
{
setType(IndexType);
}
CIndexBuffer(const IIndexBuffer &IndexBufferCopy) :Indices(0), MappingHint(EHM_NEVER), ChangedID(1)
{
setType(IndexBufferCopy.getType());
reallocate(IndexBufferCopy.size());
for (u32 n=0;n<IndexBufferCopy.size();++n)
push_back(IndexBufferCopy[n]);
}
virtual ~CIndexBuffer()
{
delete Indices;
}
//virtual void setType(video::E_INDEX_TYPE IndexType);
virtual void setType(video::E_INDEX_TYPE IndexType)
{
IIndexList *NewIndices=0;
switch (IndexType)
{
case video::EIT_16BIT:
{
NewIndices=new CSpecificIndexList<u16>;
break;
}
case video::EIT_32BIT:
{
NewIndices=new CSpecificIndexList<u32>;
break;
}
}
if (Indices)
{
NewIndices->reallocate( Indices->size() );
for(u32 n=0;n<Indices->size();++n)
NewIndices->push_back((*Indices)[n]);
delete Indices;
}
Indices=NewIndices;
}
virtual void* getData() {return Indices->pointer();}
virtual video::E_INDEX_TYPE getType() const {return Indices->getType();}
virtual u32 stride() const {return Indices->stride();}
virtual u32 size() const
{
return Indices->size();
}
virtual void push_back(const u32 &element)
{
Indices->push_back(element);
}
virtual u32 operator [](u32 index) const
{
return (*Indices)[index];
}
virtual u32 getLast()
{
return Indices->getLast();
}
virtual void setValue(u32 index, u32 value)
{
Indices->setValue(index, value);
}
virtual void set_used(u32 usedNow)
{
Indices->set_used(usedNow);
}
virtual void reallocate(u32 new_size)
{
Indices->reallocate(new_size);
}
virtual u32 allocated_size() const
{
return Indices->allocated_size();
}
virtual void* pointer()
{
return Indices->pointer();
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
{
return MappingHint;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
{
MappingHint=NewMappingHint;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty()
{
++ChangedID;
}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID() const {return ChangedID;}
E_HARDWARE_MAPPING MappingHint;
u32 ChangedID;
};
} // end namespace scene
} // end namespace irr
#endif

301
inc/CMeshBuffer.h

@ -0,0 +1,301 @@
// 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 __T_MESH_BUFFER_H_INCLUDED__
#define __T_MESH_BUFFER_H_INCLUDED__
#include "irrArray.h"
#include "IMeshBuffer.h"
namespace irr
{
namespace scene
{
//! Template implementation of the IMeshBuffer interface
template <class T>
class CMeshBuffer : public IMeshBuffer
{
public:
//! Default constructor for empty meshbuffer
CMeshBuffer():ChangedID_Vertex(1),ChangedID_Index(1),MappingHint_Vertex(EHM_NEVER), MappingHint_Index(EHM_NEVER)
{
#ifdef _DEBUG
setDebugName("SMeshBuffer");
#endif
}
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual const video::SMaterial& getMaterial() const
{
return Material;
}
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual video::SMaterial& getMaterial()
{
return Material;
}
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual const void* getVertices() const
{
return Vertices.const_pointer();
}
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual void* getVertices()
{
return Vertices.pointer();
}
//! Get number of vertices
/** \return Number of vertices. */
virtual u32 getVertexCount() const
{
return Vertices.size();
}
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const
{
return video::EIT_16BIT;
}
//! Get pointer to indices
/** \return Pointer to indices. */
virtual const u16* getIndices() const
{
return Indices.const_pointer();
}
//! Get pointer to indices
/** \return Pointer to indices. */
virtual u16* getIndices()
{
return Indices.pointer();
}
//! Get number of indices
/** \return Number of indices. */
virtual u32 getIndexCount() const
{
return Indices.size();
}
//! Get the axis aligned bounding box
/** \return Axis aligned bounding box of this buffer. */
virtual const core::aabbox3d<f32>& getBoundingBox() const
{
return BoundingBox;
}
//! Set the axis aligned bounding box
/** \param box New axis aligned bounding box for this buffer. */
//! set user axis aligned bounding box
virtual void setBoundingBox(const core::aabbox3df& box)
{
BoundingBox = box;
}
//! Recalculate the bounding box.
/** should be called if the mesh changed. */
virtual void recalculateBoundingBox()
{
if (Vertices.empty())
BoundingBox.reset(0,0,0);
else
{
BoundingBox.reset(Vertices[0].Pos);
for (u32 i=1; i<Vertices.size(); ++i)
BoundingBox.addInternalPoint(Vertices[i].Pos);
}
}
//! Get type of vertex data stored in this buffer.
/** \return Type of vertex data. */
virtual video::E_VERTEX_TYPE getVertexType() const
{
return T().getType();
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const
{
return Vertices[i].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i)
{
return Vertices[i].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const
{
return Vertices[i].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i)
{
return Vertices[i].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const
{
return Vertices[i].TCoords;
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i)
{
return Vertices[i].TCoords;
}
//! Append the vertices and indices to the current buffer
/** Only works for compatible types, i.e. either the same type
or the main buffer is of standard type. Otherwise, behavior is
undefined.
*/
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices)
{
if (vertices == getVertices())
return;
const u32 vertexCount = getVertexCount();
u32 i;
Vertices.reallocate(vertexCount+numVertices);
for (i=0; i<numVertices; ++i)
{
Vertices.push_back(reinterpret_cast<const T*>(vertices)[i]);
BoundingBox.addInternalPoint(reinterpret_cast<const T*>(vertices)[i].Pos);
}
Indices.reallocate(getIndexCount()+numIndices);
for (i=0; i<numIndices; ++i)
{
Indices.push_back(indices[i]+vertexCount);
}
}
//! Append the meshbuffer to the current buffer
/** Only works for compatible types, i.e. either the same type
or the main buffer is of standard type. Otherwise, behavior is
undefined.
\param other Meshbuffer to be appended to this one.
*/
virtual void append(const IMeshBuffer* const other)
{
/*
if (this==other)
return;
const u32 vertexCount = getVertexCount();
u32 i;
Vertices.reallocate(vertexCount+other->getVertexCount());
for (i=0; i<other->getVertexCount(); ++i)
{
Vertices.push_back(reinterpret_cast<const T*>(other->getVertices())[i]);
}
Indices.reallocate(getIndexCount()+other->getIndexCount());
for (i=0; i<other->getIndexCount(); ++i)
{
Indices.push_back(other->getIndices()[i]+vertexCount);
}
BoundingBox.addInternalBox(other->getBoundingBox());
*/
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
{
return MappingHint_Vertex;
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
{
return MappingHint_Index;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
MappingHint_Vertex=NewMappingHint;
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
MappingHint_Index=NewMappingHint;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
{
if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX)
++ChangedID_Vertex;
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
++ChangedID_Index;
}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Index() const {return ChangedID_Index;}
u32 ChangedID_Vertex;
u32 ChangedID_Index;
//! hardware mapping hint
E_HARDWARE_MAPPING MappingHint_Vertex;
E_HARDWARE_MAPPING MappingHint_Index;
//! Material for this meshbuffer.
video::SMaterial Material;
//! Vertices of this buffer
core::array<T> Vertices;
//! Indices into the vertices of this buffer.
core::array<u16> Indices;
//! Bounding box of this meshbuffer.
core::aabbox3d<f32> BoundingBox;
};
//! Standard meshbuffer
typedef CMeshBuffer<video::S3DVertex> SMeshBuffer;
//! Meshbuffer with two texture coords per vertex, e.g. for lightmaps
typedef CMeshBuffer<video::S3DVertex2TCoords> SMeshBufferLightMap;
//! Meshbuffer with vertices having tangents stored, e.g. for normal mapping
typedef CMeshBuffer<video::S3DVertexTangents> SMeshBufferTangents;
} // end namespace scene
} // end namespace irr
#endif

210
inc/CVertexBuffer.h

@ -0,0 +1,210 @@
// Copyright (C) 2008-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_VERTEX_BUFFER_H_INCLUDED__
#define __C_VERTEX_BUFFER_H_INCLUDED__
#include "IVertexBuffer.h"
namespace irr
{
namespace scene
{
class CVertexBuffer : public IVertexBuffer
{
class IVertexList
{
public:
virtual ~IVertexList(){};
virtual u32 stride() const =0;
virtual u32 size() const =0;
virtual void push_back (const video::S3DVertex &element) =0;
virtual video::S3DVertex& operator [](const u32 index) const =0;
virtual video::S3DVertex& getLast() =0;
virtual void set_used(u32 usedNow) =0;
virtual void reallocate(u32 new_size) =0;
virtual u32 allocated_size() const =0;
virtual video::S3DVertex* pointer() =0;
virtual video::E_VERTEX_TYPE getType() const =0;
};
template <class T>
class CSpecificVertexList : public IVertexList
{
public:
core::array<T> Vertices;
virtual u32 stride() const {return sizeof(T);}
virtual u32 size() const {return Vertices.size();}
virtual void push_back (const video::S3DVertex &element)
{Vertices.push_back((T&)element);}
virtual video::S3DVertex& operator [](const u32 index) const
{return (video::S3DVertex&)Vertices[index];}
virtual video::S3DVertex& getLast()
{return (video::S3DVertex&)Vertices.getLast();}
virtual void set_used(u32 usedNow)
{Vertices.set_used(usedNow);}
virtual void reallocate(u32 new_size)
{Vertices.reallocate(new_size);}
virtual u32 allocated_size() const
{
return Vertices.allocated_size();
}
virtual video::S3DVertex* pointer() {return Vertices.pointer();}
virtual video::E_VERTEX_TYPE getType() const {return T().getType();}
};
public:
IVertexList *Vertices;
CVertexBuffer(video::E_VERTEX_TYPE vertexType) : Vertices(0),
MappingHint(EHM_NEVER), ChangedID(1)
{
setType(vertexType);
}
CVertexBuffer(const IVertexBuffer &VertexBufferCopy) :
Vertices(0), MappingHint(EHM_NEVER),
ChangedID(1)
{
setType(VertexBufferCopy.getType());
reallocate(VertexBufferCopy.size());
for (u32 n=0;n<VertexBufferCopy.size();++n)
push_back(VertexBufferCopy[n]);
}
virtual ~CVertexBuffer()
{
delete Vertices;
}
virtual void setType(video::E_VERTEX_TYPE vertexType)
{
IVertexList *NewVertices=0;
switch (vertexType)
{
case video::EVT_STANDARD:
{
NewVertices=new CSpecificVertexList<video::S3DVertex>;
break;
}
case video::EVT_2TCOORDS:
{
NewVertices=new CSpecificVertexList<video::S3DVertex2TCoords>;
break;
}
case video::EVT_TANGENTS:
{
NewVertices=new CSpecificVertexList<video::S3DVertexTangents>;
break;
}
}
if (Vertices)
{
NewVertices->reallocate( Vertices->size() );
for(u32 n=0;n<Vertices->size();++n)
NewVertices->push_back((*Vertices)[n]);
delete Vertices;
}
Vertices=NewVertices;
}
virtual void* getData() {return Vertices->pointer();}
virtual video::E_VERTEX_TYPE getType() const {return Vertices->getType();}
virtual u32 stride() const {return Vertices->stride();}
virtual u32 size() const
{
return Vertices->size();
}
virtual void push_back (const video::S3DVertex &element)
{
Vertices->push_back(element);
}
virtual video::S3DVertex& operator [](const u32 index) const
{
return (*Vertices)[index];
}
virtual video::S3DVertex& getLast()
{
return Vertices->getLast();
}
virtual void set_used(u32 usedNow)
{
Vertices->set_used(usedNow);
}
virtual void reallocate(u32 new_size)
{
Vertices->reallocate(new_size);
}
virtual u32 allocated_size() const
{
return Vertices->allocated_size();
}
virtual video::S3DVertex* pointer()
{
return Vertices->pointer();
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
{
return MappingHint;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
{
MappingHint=NewMappingHint;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty()
{
++ChangedID;
}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID() const {return ChangedID;}
E_HARDWARE_MAPPING MappingHint;
u32 ChangedID;
};
} // end namespace scene
} // end namespace irr
#endif

101
inc/EAttributes.h

@ -0,0 +1,101 @@
// 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 __E_ATTRIBUTES_H_INCLUDED__
#define __E_ATTRIBUTES_H_INCLUDED__
namespace irr
{
namespace io
{
//! Types of attributes available for IAttributes
enum E_ATTRIBUTE_TYPE
{
// integer attribute
EAT_INT = 0,
// float attribute
EAT_FLOAT,
// string attribute
EAT_STRING,
// boolean attribute
EAT_BOOL,
// enumeration attribute
EAT_ENUM,
// color attribute
EAT_COLOR,
// floating point color attribute
EAT_COLORF,
// 3d vector attribute
EAT_VECTOR3D,
// 2d position attribute
EAT_POSITION2D,
// vector 2d attribute
EAT_VECTOR2D,
// rectangle attribute
EAT_RECT,
// matrix attribute
EAT_MATRIX,
// quaternion attribute
EAT_QUATERNION,
// 3d bounding box
EAT_BBOX,
// plane
EAT_PLANE,
// 3d triangle
EAT_TRIANGLE3D,
// line 2d
EAT_LINE2D,
// line 3d
EAT_LINE3D,
// array of stringws attribute
EAT_STRINGWARRAY,
// array of float
EAT_FLOATARRAY,
// array of int
EAT_INTARRAY,
// binary data attribute
EAT_BINARY,
// texture reference attribute
EAT_TEXTURE,
// user pointer void*
EAT_USER_POINTER,
// dimension attribute
EAT_DIMENSION2D,
// known attribute type count
EAT_COUNT,
// unknown attribute
EAT_UNKNOWN
};
} // end namespace io
} // end namespace irr
#endif

41
inc/ECullingTypes.h

@ -0,0 +1,41 @@
// 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 __E_CULLING_TYPES_H_INCLUDED__
#define __E_CULLING_TYPES_H_INCLUDED__
#include "irrTypes.h"
namespace irr
{
namespace scene
{
//! An enumeration for all types of automatic culling for built-in scene nodes
enum E_CULLING_TYPE
{
EAC_OFF = 0,
EAC_BOX = 1,
EAC_FRUSTUM_BOX = 2,
EAC_FRUSTUM_SPHERE = 4,
EAC_OCC_QUERY = 8
};
//! Names for culling type
const c8* const AutomaticCullingNames[] =
{
"false",
"box", // camera box against node box
"frustum_box", // camera frustum against node box
"frustum_sphere", // camera frustum against node sphere
"occ_query", // occlusion query
0
};
} // end namespace scene
} // end namespace irr
#endif // __E_CULLING_TYPES_H_INCLUDED__

50
inc/EDebugSceneTypes.h

@ -0,0 +1,50 @@
// 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 __E_DEBUG_SCENE_TYPES_H_INCLUDED__
#define __E_DEBUG_SCENE_TYPES_H_INCLUDED__
namespace irr
{
namespace scene
{
//! An enumeration for all types of debug data for built-in scene nodes (flags)
enum E_DEBUG_SCENE_TYPE
{
//! No Debug Data ( Default )
EDS_OFF = 0,
//! Show Bounding Boxes of SceneNode
EDS_BBOX = 1,
//! Show Vertex Normals
EDS_NORMALS = 2,
//! Shows Skeleton/Tags
EDS_SKELETON = 4,
//! Overlays Mesh Wireframe
EDS_MESH_WIRE_OVERLAY = 8,
//! Temporary use transparency Material Type
EDS_HALF_TRANSPARENCY = 16,
//! Show Bounding Boxes of all MeshBuffers
EDS_BBOX_BUFFERS = 32,
//! EDS_BBOX | EDS_BBOX_BUFFERS
EDS_BBOX_ALL = EDS_BBOX | EDS_BBOX_BUFFERS,
//! Show all debug infos
EDS_FULL = 0xffffffff
};
} // end namespace scene
} // end namespace irr
#endif // __E_DEBUG_SCENE_TYPES_H_INCLUDED__

60
inc/EDeviceTypes.h

@ -0,0 +1,60 @@
// 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 __E_DEVICE_TYPES_H_INCLUDED__
#define __E_DEVICE_TYPES_H_INCLUDED__
namespace irr
{
//! An enum for the different device types supported by the Irrlicht Engine.
enum E_DEVICE_TYPE
{
//! A device native to Microsoft Windows
/** This device uses the Win32 API and works in all versions of Windows. */
EIDT_WIN32,
//! A device native to Windows CE devices
/** This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices */
EIDT_WINCE,
//! A device native to Unix style operating systems.
/** This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and
other operating systems which support X11. */
EIDT_X11,
//! A device native to Mac OSX
/** This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above. */
EIDT_OSX,
//! A device which uses Simple DirectMedia Layer
/** The SDL device works under all platforms supported by SDL but first must be compiled
in by defining the IRR_USE_SDL_DEVICE macro in IrrCompileConfig.h */
EIDT_SDL,
//! A device for raw framebuffer access
/** Best used with embedded devices and mobile systems.
Does not need X11 or other graphical subsystems.
May support hw-acceleration via OpenGL-ES for FBDirect */
EIDT_FRAMEBUFFER,
//! A simple text only device supported by all platforms.
/** This device allows applications to run from the command line without opening a window.
It can render the output of the software drivers to the console as ASCII. It only supports
mouse and keyboard in Windows operating systems. */
EIDT_CONSOLE,
//! This selection allows Irrlicht to choose the best device from the ones available.
/** If this selection is chosen then Irrlicht will try to use the IrrlichtDevice native
to your operating system. If this is unavailable then the X11, SDL and then console device
will be tried. This ensures that Irrlicht will run even if your platform is unsupported,
although it may not be able to render anything. */
EIDT_BEST
};
} // end namespace irr
#endif // __E_DEVICE_TYPES_H_INCLUDED__

133
inc/EDriverFeatures.h

@ -0,0 +1,133 @@
// 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 __E_DRIVER_FEATURES_H_INCLUDED__
#define __E_DRIVER_FEATURES_H_INCLUDED__
namespace irr
{
namespace video
{
//! enumeration for querying features of the video driver.
enum E_VIDEO_DRIVER_FEATURE
{
//! Is driver able to render to a surface?
EVDF_RENDER_TO_TARGET = 0,
//! Is hardeware transform and lighting supported?
EVDF_HARDWARE_TL,
//! Are multiple textures per material possible?
EVDF_MULTITEXTURE,
//! Is driver able to render with a bilinear filter applied?
EVDF_BILINEAR_FILTER,
//! Can the driver handle mip maps?
EVDF_MIP_MAP,
//! Can the driver update mip maps automatically?
EVDF_MIP_MAP_AUTO_UPDATE,
//! Are stencilbuffers switched on and does the device support stencil buffers?
EVDF_STENCIL_BUFFER,
//! Is Vertex Shader 1.1 supported?
EVDF_VERTEX_SHADER_1_1,
//! Is Vertex Shader 2.0 supported?
EVDF_VERTEX_SHADER_2_0,
//! Is Vertex Shader 3.0 supported?
EVDF_VERTEX_SHADER_3_0,
//! Is Pixel Shader 1.1 supported?
EVDF_PIXEL_SHADER_1_1,
//! Is Pixel Shader 1.2 supported?
EVDF_PIXEL_SHADER_1_2,
//! Is Pixel Shader 1.3 supported?
EVDF_PIXEL_SHADER_1_3,
//! Is Pixel Shader 1.4 supported?
EVDF_PIXEL_SHADER_1_4,
//! Is Pixel Shader 2.0 supported?
EVDF_PIXEL_SHADER_2_0,
//! Is Pixel Shader 3.0 supported?
EVDF_PIXEL_SHADER_3_0,
//! Are ARB vertex programs v1.0 supported?
EVDF_ARB_VERTEX_PROGRAM_1,
//! Are ARB fragment programs v1.0 supported?
EVDF_ARB_FRAGMENT_PROGRAM_1,
//! Is GLSL supported?
EVDF_ARB_GLSL,
//! Is HLSL supported?
EVDF_HLSL,
//! Are non-square textures supported?
EVDF_TEXTURE_NSQUARE,
//! Are non-power-of-two textures supported?
EVDF_TEXTURE_NPOT,
//! Are framebuffer objects supported?
EVDF_FRAMEBUFFER_OBJECT,
//! Are vertex buffer objects supported?
EVDF_VERTEX_BUFFER_OBJECT,
//! Supports Alpha To Coverage
EVDF_ALPHA_TO_COVERAGE,
//! Supports Color masks (disabling color planes in output)
EVDF_COLOR_MASK,
//! Supports multiple render targets at once
EVDF_MULTIPLE_RENDER_TARGETS,
//! Supports separate blend settings for multiple render targets
EVDF_MRT_BLEND,
//! Supports separate color masks for multiple render targets
EVDF_MRT_COLOR_MASK,
//! Supports separate blend functions for multiple render targets
EVDF_MRT_BLEND_FUNC,
//! Supports geometry shaders
EVDF_GEOMETRY_SHADER,
//! Supports occlusion queries
EVDF_OCCLUSION_QUERY,
//! Supports polygon offset/depth bias for avoiding z-fighting
EVDF_POLYGON_OFFSET,
//! Support for different blend functions. Without, only ADD is available
EVDF_BLEND_OPERATIONS,
//! Support for texture coord transformation via texture matrix
EVDF_TEXTURE_MATRIX,
//! Support for NVidia's CG shader language
EVDF_CG,
//! Only used for counting the elements of this enum
EVDF_COUNT
};
} // end namespace video
} // end namespace irr
#endif

64
inc/EDriverTypes.h

@ -0,0 +1,64 @@
// 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 __E_DRIVER_TYPES_H_INCLUDED__
#define __E_DRIVER_TYPES_H_INCLUDED__
namespace irr
{
namespace video
{
//! An enum for all types of drivers the Irrlicht Engine supports.
enum E_DRIVER_TYPE
{
//! Null driver, useful for applications to run the engine without visualisation.
/** The null device is able to load textures, but does not
render and display any graphics. */
EDT_NULL,
//! The Irrlicht Engine Software renderer.
/** Runs on all platforms, with every hardware. It should only
be used for 2d graphics, but it can also perform some primitive
3d functions. These 3d drawing functions are quite fast, but
very inaccurate, and don't even support clipping in 3D mode. */
EDT_SOFTWARE,
//! The Burning's Software Renderer, an alternative software renderer
/** Basically it can be described as the Irrlicht Software
renderer on steroids. It rasterizes 3D geometry perfectly: It
is able to perform correct 3d clipping, perspective correct
texture mapping, perspective correct color mapping, and renders
sub pixel correct, sub texel correct primitives. In addition,
it does bilinear texel filtering and supports more materials
than the EDT_SOFTWARE driver. This renderer has been written
entirely by Thomas Alten, thanks a lot for this huge
contribution. */
EDT_BURNINGSVIDEO,
//! Direct3D8 device, only available on Win32 platforms.
/** Performs hardware accelerated rendering of 3D and 2D
primitives. */
EDT_DIRECT3D8,
//! Direct3D 9 device, only available on Win32 platforms.
/** Performs hardware accelerated rendering of 3D and 2D
primitives. */
EDT_DIRECT3D9,
//! OpenGL device, available on most platforms.
/** Performs hardware accelerated rendering of 3D and 2D
primitives. */
EDT_OPENGL,
//! No driver, just for counting the elements
EDT_COUNT
};
} // end namespace video
} // end namespace irr
#endif

38
inc/EGUIAlignment.h

@ -0,0 +1,38 @@
// 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 __E_GUI_ALIGNMENT_H_INCLUDED__
#define __E_GUI_ALIGNMENT_H_INCLUDED__
namespace irr
{
namespace gui
{
enum EGUI_ALIGNMENT
{
//! Aligned to parent's top or left side (default)
EGUIA_UPPERLEFT=0,
//! Aligned to parent's bottom or right side
EGUIA_LOWERRIGHT,
//! Aligned to the center of parent
EGUIA_CENTER,
//! Stretched to fit parent
EGUIA_SCALE
};
//! Names for alignments
const c8* const GUIAlignmentNames[] =
{
"upperLeft",
"lowerRight",
"center",
"scale",
0
};
} // namespace gui
} // namespace irr
#endif // __E_GUI_ALIGNMENT_H_INCLUDED__

140
inc/EGUIElementTypes.h

@ -0,0 +1,140 @@
// 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 __E_GUI_ELEMENT_TYPES_H_INCLUDED__
#define __E_GUI_ELEMENT_TYPES_H_INCLUDED__
#include "irrTypes.h"
namespace irr
{
namespace gui
{
//! List of all basic Irrlicht GUI elements.
/** An IGUIElement returns this when calling IGUIElement::getType(); */
enum EGUI_ELEMENT_TYPE
{
//! A button (IGUIButton)
EGUIET_BUTTON = 0,
//! A check box (IGUICheckBox)
EGUIET_CHECK_BOX,
//! A combo box (IGUIComboBox)
EGUIET_COMBO_BOX,
//! A context menu (IGUIContextMenu)
EGUIET_CONTEXT_MENU,
//! A menu (IGUIMenu)
EGUIET_MENU,
//! An edit box (IGUIEditBox)
EGUIET_EDIT_BOX,
//! A file open dialog (IGUIFileOpenDialog)
EGUIET_FILE_OPEN_DIALOG,
//! A color select open dialog (IGUIColorSelectDialog)
EGUIET_COLOR_SELECT_DIALOG,
//! A in/out fader (IGUIInOutFader)
EGUIET_IN_OUT_FADER,
//! An image (IGUIImage)
EGUIET_IMAGE,
//! A list box (IGUIListBox)
EGUIET_LIST_BOX,
//! A mesh viewer (IGUIMeshViewer)
EGUIET_MESH_VIEWER,
//! A message box (IGUIWindow)
EGUIET_MESSAGE_BOX,
//! A modal screen
EGUIET_MODAL_SCREEN,
//! A scroll bar (IGUIScrollBar)
EGUIET_SCROLL_BAR,
//! A spin box (IGUISpinBox)
EGUIET_SPIN_BOX,
//! A static text (IGUIStaticText)
EGUIET_STATIC_TEXT,
//! A tab (IGUITab)
EGUIET_TAB,
//! A tab control
EGUIET_TAB_CONTROL,
//! A Table
EGUIET_TABLE,
//! A tool bar (IGUIToolBar)
EGUIET_TOOL_BAR,
//! A Tree View
EGUIET_TREE_VIEW,
//! A window
EGUIET_WINDOW,
//! Unknown type.
EGUIET_ELEMENT,
//! The root of the GUI
EGUIET_ROOT,
//! Not an element, amount of elements in there
EGUIET_COUNT,
//! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.
EGUIET_FORCE_32_BIT = 0x7fffffff
};
//! Names for built-in element types
const c8* const GUIElementTypeNames[] =
{
"button",
"checkBox",
"comboBox",
"contextMenu",
"menu",
"editBox",
"fileOpenDialog",
"colorSelectDialog",
"inOutFader",
"image",
"listBox",
"meshViewer",
"messageBox",
"modalScreen",
"scrollBar",
"spinBox",
"staticText",
"tab",
"tabControl",
"table",
"toolBar",
"treeview",
"window",
"element",
"root",
0
};
} // end namespace gui
} // end namespace irr
#endif

44
inc/EHardwareBufferFlags.h

@ -0,0 +1,44 @@
// 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 __E_HARDWARE_BUFFER_FLAGS_INCLUDED__
#define __E_HARDWARE_BUFFER_FLAGS_INCLUDED__
namespace irr
{
namespace scene
{
enum E_HARDWARE_MAPPING
{
//! Don't store on the hardware
EHM_NEVER=0,
//! Rarely changed, usually stored completely on the hardware
EHM_STATIC,
//! Sometimes changed, driver optimized placement
EHM_DYNAMIC,
//! Always changed, cache optimizing on the GPU
EHM_STREAM
};
enum E_BUFFER_TYPE
{
//! Does not change anything
EBT_NONE=0,
//! Change the vertex mapping
EBT_VERTEX,
//! Change the index mapping
EBT_INDEX,
//! Change both vertex and index mapping to the same value
EBT_VERTEX_AND_INDEX
};
} // end namespace scene
} // end namespace irr
#endif

95
inc/EMaterialFlags.h

@ -0,0 +1,95 @@
// 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 __E_MATERIAL_FLAGS_H_INCLUDED__
#define __E_MATERIAL_FLAGS_H_INCLUDED__
namespace irr
{
namespace video
{
//! Material flags
enum E_MATERIAL_FLAG
{
//! Draw as wireframe or filled triangles? Default: false
EMF_WIREFRAME = 0x1,
//! Draw as point cloud or filled triangles? Default: false
EMF_POINTCLOUD = 0x2,
//! Flat or Gouraud shading? Default: true
EMF_GOURAUD_SHADING = 0x4,
//! Will this material be lighted? Default: true
EMF_LIGHTING = 0x8,
//! Is the ZBuffer enabled? Default: true
EMF_ZBUFFER = 0x10,
//! May be written to the zbuffer or is it readonly. Default: true
/** This flag is ignored, if the material type is a transparent type. */
EMF_ZWRITE_ENABLE = 0x20,
//! Is backface culling enabled? Default: true
EMF_BACK_FACE_CULLING = 0x40,
//! Is frontface culling enabled? Default: false
/** Overrides EMF_BACK_FACE_CULLING if both are enabled. */
EMF_FRONT_FACE_CULLING = 0x80,
//! Is bilinear filtering enabled? Default: true
EMF_BILINEAR_FILTER = 0x100,
//! Is trilinear filtering enabled? Default: false
/** If the trilinear filter flag is enabled,
the bilinear filtering flag is ignored. */
EMF_TRILINEAR_FILTER = 0x200,
//! Is anisotropic filtering? Default: false
/** In Irrlicht you can use anisotropic texture filtering in
conjunction with bilinear or trilinear texture filtering
to improve rendering results. Primitives will look less
blurry with this flag switched on. */
EMF_ANISOTROPIC_FILTER = 0x400,
//! Is fog enabled? Default: false
EMF_FOG_ENABLE = 0x800,
//! Normalizes normals. Default: false
/** You can enable this if you need to scale a dynamic lighted
model. Usually, its normals will get scaled too then and it
will get darker. If you enable the EMF_NORMALIZE_NORMALS flag,
the normals will be normalized again, and the model will look
as bright as it should. */
EMF_NORMALIZE_NORMALS = 0x1000,
//! Access to all layers texture wrap settings. Overwrites separate layer settings.
EMF_TEXTURE_WRAP = 0x2000,
//! AntiAliasing mode
EMF_ANTI_ALIASING = 0x4000,
//! ColorMask bits, for enabling the color planes
EMF_COLOR_MASK = 0x8000,
//! ColorMaterial enum for vertex color interpretation
EMF_COLOR_MATERIAL = 0x10000,
//! Flag for enabling/disabling mipmap usage
EMF_USE_MIP_MAPS = 0x20000,
//! Flag for blend operation
EMF_BLEND_OPERATION = 0x40000,
//! Flag for polygon offset
EMF_POLYGON_OFFSET = 0x80000
};
} // end namespace video
} // end namespace irr
#endif // __E_MATERIAL_FLAGS_H_INCLUDED__

234
inc/EMaterialTypes.h

@ -0,0 +1,234 @@
// 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 __E_MATERIAL_TYPES_H_INCLUDED__
#define __E_MATERIAL_TYPES_H_INCLUDED__
namespace irr
{
namespace video
{
//! Abstracted and easy to use fixed function/programmable pipeline material modes.
enum E_MATERIAL_TYPE
{
//! Standard solid material.
/** Only first texture is used, which is supposed to be the
diffuse material. */
EMT_SOLID = 0,
//! Solid material with 2 texture layers.
/** The second is blended onto the first using the alpha value
of the vertex colors. This material is currently not implemented in OpenGL.
*/
EMT_SOLID_2_LAYER,
//! Material type with standard lightmap technique
/** There should be 2 textures: The first texture layer is a
diffuse map, the second is a light map. Dynamic light is
ignored. */
EMT_LIGHTMAP,
//! Material type with lightmap technique like EMT_LIGHTMAP.
/** But lightmap and diffuse texture are added instead of modulated. */
EMT_LIGHTMAP_ADD,
//! Material type with standard lightmap technique
/** There should be 2 textures: The first texture layer is a
diffuse map, the second is a light map. Dynamic light is
ignored. The texture colors are effectively multiplied by 2
for brightening. Like known in DirectX as D3DTOP_MODULATE2X. */
EMT_LIGHTMAP_M2,
//! Material type with standard lightmap technique
/** There should be 2 textures: The first texture layer is a
diffuse map, the second is a light map. Dynamic light is