* Finally uploaded the correct version of Irrlicht
This commit is contained in:
parent
54bfa60db5
commit
3552e6b9e8
116
src/dep/include/irrlicht/CDynamicMeshBuffer.h
Normal file
116
src/dep/include/irrlicht/CDynamicMeshBuffer.h
Normal file
@ -0,0 +1,116 @@
|
||||
// Copyright (C) 2008 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
|
||||
|
||||
225
src/dep/include/irrlicht/CIndexBuffer.h
Normal file
225
src/dep/include/irrlicht/CIndexBuffer.h
Normal file
@ -0,0 +1,225 @@
|
||||
// Copyright (C) 2008 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)
|
||||
{
|
||||
Indices.push_back((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
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
210
src/dep/include/irrlicht/CVertexBuffer.h
Normal file
210
src/dep/include/irrlicht/CVertexBuffer.h
Normal file
@ -0,0 +1,210 @@
|
||||
// Copyright (C) 2008 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
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -13,43 +13,44 @@ 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. */
|
||||
//! 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. */
|
||||
//! 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. */
|
||||
//! The Burning's Software Renderer, an alternative software
|
||||
//! renderer for Irrlicht. 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. */
|
||||
//! 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. */
|
||||
//! 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. */
|
||||
//! Performs hardware accelerated rendering of 3D and 2D
|
||||
//! primitives.
|
||||
EDT_OPENGL
|
||||
};
|
||||
|
||||
|
||||
37
src/dep/include/irrlicht/EGUIAlignment.h
Normal file
37
src/dep/include/irrlicht/EGUIAlignment.h
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2002-2008 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__
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -88,7 +88,8 @@ enum EGUI_ELEMENT_TYPE
|
||||
//! Unknown type.
|
||||
EGUIET_ELEMENT,
|
||||
|
||||
//! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.
|
||||
//! This enum is never used, it only forces the compiler to
|
||||
//! compile these enumeration values to 32 bit.
|
||||
EGUIET_FORCE_32_BIT = 0x7fffffff
|
||||
|
||||
};
|
||||
|
||||
40
src/dep/include/irrlicht/EHardwareBufferFlags.h
Normal file
40
src/dep/include/irrlicht/EHardwareBufferFlags.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2002-2008 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 load in hardware
|
||||
EHM_NEVER=0,
|
||||
|
||||
//! Rarely changed
|
||||
EHM_STATIC,
|
||||
|
||||
//! Sometimes changed
|
||||
EHM_DYNAMIC,
|
||||
|
||||
//! Always changed
|
||||
EHM_STREAM
|
||||
};
|
||||
|
||||
enum E_BUFFER_TYPE
|
||||
{
|
||||
EBT_NONE=0,
|
||||
EBT_VERTEX,
|
||||
EBT_INDEX,
|
||||
EBT_VERTEX_AND_INDEX
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -13,39 +13,37 @@ 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. */
|
||||
//! 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.
|
||||
*/
|
||||
//! 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. */
|
||||
//! 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. */
|
||||
//! 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. */
|
||||
//! 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
|
||||
ignored. The texture colors are effectively multiplyied by 4
|
||||
for brightening. Like known in DirectX as D3DTOP_MODULATE4X. */
|
||||
//! 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 multiplyied by 4
|
||||
//! for brightening. Like known in DirectX as D3DTOP_MODULATE4X.
|
||||
EMT_LIGHTMAP_M4,
|
||||
|
||||
//! Like EMT_LIGHTMAP, but also supports dynamic lighting.
|
||||
@ -57,142 +55,153 @@ namespace video
|
||||
//! Like EMT_LIGHTMAP_4, but also supports dynamic lighting.
|
||||
EMT_LIGHTMAP_LIGHTING_M4,
|
||||
|
||||
//! Detail mapped material.
|
||||
/** The first texture is diffuse color map, the second is added
|
||||
to this and usually displayed with a bigger scale value so that
|
||||
it adds more detail. The detail map is added to the diffuse map
|
||||
using ADD_SIGNED, so that it is possible to add and substract
|
||||
color from the diffuse map. For example a value of
|
||||
(127,127,127) will not change the appearance of the diffuse map
|
||||
at all. Often used for terrain rendering. */
|
||||
//! Detail mapped material. The first texture is diffuse color
|
||||
//! map, the second is added to this and usually displayed with
|
||||
//! a bigger scale value so that it adds more detail. The
|
||||
//! detail map is added to the diffuse map using ADD_SIGNED, so
|
||||
//! that it is possible to add and substract color from the
|
||||
//! diffuse map. For example a value of (127,127,127) will not
|
||||
//! change the appearance of the diffuse map at all. Often used
|
||||
//! for terrain rendering.
|
||||
EMT_DETAIL_MAP,
|
||||
|
||||
//! Look like a reflection of the environment around it.
|
||||
/** To make this possible, a texture called 'sphere map' is
|
||||
used, which must be set as the first texture. */
|
||||
//! Makes the material look like it was reflection the
|
||||
//! environment around it. To make this possible, a texture
|
||||
//! called 'sphere map' is used, which must be set as the first
|
||||
//! texture.
|
||||
EMT_SPHERE_MAP,
|
||||
|
||||
//! A reflecting material with an optional non reflecting texture layer.
|
||||
/** The reflection map should be set as first texture. */
|
||||
//! A reflecting material with an optional additional non
|
||||
//! reflecting texture layer. The reflection map should be set
|
||||
//! as first texture.
|
||||
EMT_REFLECTION_2_LAYER,
|
||||
|
||||
//! A transparent material.
|
||||
/** Only the first texture is used. The new color is calculated
|
||||
by simply adding the source color and the dest color. This
|
||||
means if for example a billboard using a texture with black
|
||||
background and a red circle on it is drawn with this material,
|
||||
the result is that only the red circle will be drawn a little
|
||||
bit transparent, and everything which was black is 100%
|
||||
transparent and not visible. This material type is useful for
|
||||
particle effects. */
|
||||
//! A transparent material. Only the first texture is used.
|
||||
//! The new color is calculated by simply adding the source
|
||||
//! color and the dest color. This means if for example a
|
||||
//! billboard using a texture with black background and a red
|
||||
//! circle on it is drawn with this material, the result is
|
||||
//! that only the red circle will be drawn a little bit
|
||||
//! transparent, and everything which was black is 100%
|
||||
//! transparent and not visible. This material type is useful
|
||||
//! for particle effects.
|
||||
EMT_TRANSPARENT_ADD_COLOR,
|
||||
|
||||
//! Makes the material transparent based on the texture alpha channel.
|
||||
/** The final color is blended together from the destination
|
||||
color and the texture color, using the alpha channel value as
|
||||
blend factor. Only first texture is used. If you are using
|
||||
this material with small textures, it is a good idea to load
|
||||
the texture in 32 bit mode
|
||||
(video::IVideoDriver::setTextureCreationFlag()). Also, an alpha
|
||||
ref is used, which can be manipulated using
|
||||
SMaterial::MaterialTypeParam. This value controls how sharp the
|
||||
edges become when going from a transparent to a solid spot on
|
||||
the texture. */
|
||||
//! Makes the material transparent based on the texture alpha
|
||||
//! channel. The final color is blended together from the
|
||||
//! destination color and the texture color, using the alpha
|
||||
//! channel value as blend factor. Only first texture is used.
|
||||
//! If you are using this material with small textures, it is a
|
||||
//! good idea to load the texture in 32 bit mode
|
||||
//! (video::IVideoDriver::setTextureCreationFlag()). Also, an
|
||||
//! alpha ref is used, which can be manipulated using
|
||||
//! SMaterial::MaterialTypeParam. If set to 0, the alpha ref
|
||||
//! gets its default value which is 0.5f and means that
|
||||
//! pixels with an alpha value >127 will be written, others not.
|
||||
//! In other, simple words: this value controls how sharp the
|
||||
//! edges become when going from a transparent to a solid spot
|
||||
//! on the texture.
|
||||
EMT_TRANSPARENT_ALPHA_CHANNEL,
|
||||
|
||||
//! Makes the material transparent based on the texture alpha channel.
|
||||
/** If the alpha channel value is greater than 127, a
|
||||
pixel is written to the target, otherwise not. This
|
||||
material does not use alpha blending and is a lot faster
|
||||
than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing
|
||||
stuff like leafes of plants, because the borders are not
|
||||
blurry but sharp. Only first texture is used. If you are
|
||||
using this material with small textures and 3d object, it
|
||||
is a good idea to load the texture in 32 bit mode
|
||||
(video::IVideoDriver::setTextureCreationFlag()). */
|
||||
//! Makes the material transparent based on the texture alpha
|
||||
//! channel. If the alpha channel value is greater than 127, a
|
||||
//! pixel is written to the target, otherwise not. This
|
||||
//! material does not use alpha blending and is a lot faster
|
||||
//! than EMT_TRANSPARENT_ALPHA_CHANNEL. It is ideal for drawing
|
||||
//! stuff like leafes of plants, because the borders are not
|
||||
//! blurry but sharp. Only first texture is used. If you are
|
||||
//! using this material with small textures and 3d object, it
|
||||
//! is a good idea to load the texture in 32 bit mode
|
||||
//! (video::IVideoDriver::setTextureCreationFlag()).
|
||||
EMT_TRANSPARENT_ALPHA_CHANNEL_REF,
|
||||
|
||||
//! Makes the material transparent based on the vertex alpha value.
|
||||
//! Makes the material transparent based on the vertex alpha
|
||||
//! value.
|
||||
EMT_TRANSPARENT_VERTEX_ALPHA,
|
||||
|
||||
//! A transparent reflecting material with an optional additional non reflecting texture layer.
|
||||
/** The reflection map should be set as first texture. The
|
||||
transparency depends on the alpha value in the vertex colors. A
|
||||
texture which will not reflect can be set as second texture.
|
||||
Please note that this material type is currently not 100%
|
||||
implemented in OpenGL. */
|
||||
//! A transparent reflecting material with an optional
|
||||
//! additional non reflecting texture layer. The reflection map
|
||||
//! should be set as first texture. The transparency depends on
|
||||
//! the alpha value in the vertex colors. A texture which will
|
||||
//! not reflect can be set as second texture. Please note that
|
||||
//! this material type is currently not 100% implemented in
|
||||
//! OpenGL.
|
||||
EMT_TRANSPARENT_REFLECTION_2_LAYER,
|
||||
|
||||
//! A solid normal map renderer.
|
||||
/** First texture is the color map, the second should be the
|
||||
normal map. Note that you should use this material only when
|
||||
drawing geometry consisting of vertices of type
|
||||
S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into
|
||||
this format using IMeshManipulator::createMeshWithTangents()
|
||||
(See SpecialFX2 Tutorial). This shader runs on vertex shader
|
||||
1.1 and pixel shader 1.1 capable hardware and falls back to a
|
||||
fixed function lighted material if this hardware is not
|
||||
available. Only two lights are supported by this shader, if
|
||||
there are more, the nearest two are chosen. */
|
||||
//! A solid normal map renderer. First texture is the color
|
||||
//! map, the second should be the normal map. Note that you
|
||||
//! should use this material only when drawing geometry
|
||||
//! consisting of vertices of type S3DVertexTangents
|
||||
//! (EVT_TANGENTS). You can convert any mesh into this format
|
||||
//! using IMeshManipulator::createMeshWithTangents() (See
|
||||
//! SpecialFX2 Tutorial). This shader runs on vertex shader
|
||||
//! 1.1 and pixel shader 1.1 capable hardware and falls back to
|
||||
//! a fixed function lighted material if this hardware is not
|
||||
//! available. Only two lights are supported by this shader,
|
||||
//! if there are more, the nearest two are chosen.
|
||||
EMT_NORMAL_MAP_SOLID,
|
||||
|
||||
//! A transparent normal map renderer.
|
||||
/** First texture is the color map, the second should be the
|
||||
normal map. Note that you should use this material only when
|
||||
drawing geometry consisting of vertices of type
|
||||
S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into
|
||||
this format using IMeshManipulator::createMeshWithTangents()
|
||||
(See SpecialFX2 Tutorial). This shader runs on vertex shader
|
||||
1.1 and pixel shader 1.1 capable hardware and falls back to a
|
||||
fixed function lighted material if this hardware is not
|
||||
available. Only two lights are supported by this shader, if
|
||||
there are more, the nearest two are chosen. */
|
||||
//! A transparent normal map renderer. First texture is the
|
||||
//! color map, the second should be the normal map. Note that
|
||||
//! you should use this material only when drawing geometry
|
||||
//! consisting of vertices of type S3DVertexTangents
|
||||
//! (EVT_TANGENTS). You can convert any mesh into this format
|
||||
//! using IMeshManipulator::createMeshWithTangents() (See
|
||||
//! SpecialFX2 Tutorial). This shader runs on vertex shader
|
||||
//! 1.1 and pixel shader 1.1 capable hardware and falls back to
|
||||
//! a fixed function lighted material if this hardware is not
|
||||
//! available. Only two lights are supported by this shader,
|
||||
//! if there are more, the nearest two are chosen.
|
||||
EMT_NORMAL_MAP_TRANSPARENT_ADD_COLOR,
|
||||
|
||||
//! A transparent (based on the vertex alpha value) normal map renderer.
|
||||
/** First texture is the color map, the second should be the
|
||||
normal map. Note that you should use this material only when
|
||||
drawing geometry consisting of vertices of type
|
||||
S3DVertexTangents (EVT_TANGENTS). You can convert any mesh into
|
||||
this format using IMeshManipulator::createMeshWithTangents()
|
||||
(See SpecialFX2 Tutorial). This shader runs on vertex shader
|
||||
1.1 and pixel shader 1.1 capable hardware and falls back to a
|
||||
fixed function lighted material if this hardware is not
|
||||
available. Only two lights are supported by this shader, if
|
||||
there are more, the nearest two are chosen. */
|
||||
//! A transparent (based on the vertex alpha value) normal map
|
||||
//! renderer. First texture is the color map, the second
|
||||
//! should be the normal map. Note that you should use this
|
||||
//! material only when drawing geometry consisting of vertices
|
||||
//! of type S3DVertexTangents (EVT_TANGENTS). You can convert
|
||||
//! any mesh into this format using
|
||||
//! IMeshManipulator::createMeshWithTangents() (See SpecialFX2
|
||||
//! Tutorial). This shader runs on vertex shader 1.1 and pixel
|
||||
//! shader 1.1 capable hardware and falls back to a fixed
|
||||
//! function lighted material if this hardware is not available.
|
||||
//! Only two lights are supported by this shader, if there are
|
||||
//! more, the nearest two are chosen.
|
||||
EMT_NORMAL_MAP_TRANSPARENT_VERTEX_ALPHA,
|
||||
|
||||
//! Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping.
|
||||
/** Looks a lot more realistic. This only works when the
|
||||
hardware supports at least vertex shader 1.1 and pixel shader
|
||||
1.4. First texture is the color map, the second should be the
|
||||
normal map. The normal map texture should contain the height
|
||||
value in the alpha component. The
|
||||
IVideoDriver::makeNormalMapTexture() method writes this value
|
||||
automatically when creating normal maps from a heightmap when
|
||||
using a 32 bit texture. The height scale of the material
|
||||
(affecting the bumpiness) is being controlled by the
|
||||
SMaterial::MaterialTypeParam member. If set to zero, the
|
||||
default value (0.02f) will be applied. Otherwise the value set
|
||||
in SMaterial::MaterialTypeParam is taken. This value depends on
|
||||
with which scale the texture is mapped on the material. Too
|
||||
high or low values of MaterialTypeParam can result in strange
|
||||
artifacts. */
|
||||
//! Just like EMT_NORMAL_MAP_SOLID, but uses parallax mapping
|
||||
//! too, which looks a lot more realistic. This only works when
|
||||
//! the hardware supports at least vertex shader 1.1 and pixel
|
||||
//! shader 1.4. First texture is the color map, the second
|
||||
//! should be the normal map. The normal map texture should
|
||||
//! contain the height value in the alpha component. The
|
||||
//! IVideoDriver::makeNormalMapTexture() method writes this
|
||||
//! value automatically when creating normal maps from a
|
||||
//! heightmap when using a 32 bit texture. The height scale of
|
||||
//! the material (affecting the bumpiness) is being controlled
|
||||
//! by the SMaterial::MaterialTypeParam member. If set to
|
||||
//! zero, the default value (0.02f) will be applied. Otherwise
|
||||
//! the value set in SMaterial::MaterialTypeParam is taken. This
|
||||
//! value depends on with which scale the texture is mapped on
|
||||
//! the material. Too high or low values of MaterialTypeParam
|
||||
//! can result in strange artifacts.
|
||||
EMT_PARALLAX_MAP_SOLID,
|
||||
|
||||
//! A material like EMT_PARALLAX_MAP_SOLID, but transparent.
|
||||
/** Using EMT_TRANSPARENT_ADD_COLOR as base material. */
|
||||
//! A material just like EMT_PARALLAX_MAP_SOLID, but it is
|
||||
//! transparent, using EMT_TRANSPARENT_ADD_COLOR as base
|
||||
//! material.
|
||||
EMT_PARALLAX_MAP_TRANSPARENT_ADD_COLOR,
|
||||
|
||||
//! A material like EMT_PARALLAX_MAP_SOLID, but transparent.
|
||||
/** Using EMT_TRANSPARENT_VERTEX_ALPHA as base material. */
|
||||
//! A material just like EMT_PARALLAX_MAP_SOLID, but it is
|
||||
//! transparent, using EMT_TRANSPARENT_VERTEX_ALPHA as base
|
||||
//! material.
|
||||
EMT_PARALLAX_MAP_TRANSPARENT_VERTEX_ALPHA,
|
||||
|
||||
//! BlendFunc = source * sourceFactor + dest * destFactor ( E_BLEND_FUNC )
|
||||
/** Using only first texture. Generic blending method. */
|
||||
//! Using only first texture. Generic blending method.
|
||||
EMT_ONETEXTURE_BLEND,
|
||||
|
||||
//! This value is not used. It only forces this enumeration to compile to 32 bit.
|
||||
//! This value is not used. It only forces this enumeration to
|
||||
//! compile in 32 bit.
|
||||
EMT_FORCE_32BIT = 0x7fffffff
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -33,4 +33,3 @@ enum EMESSAGE_BOX_FLAG
|
||||
} // namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -46,7 +46,8 @@ namespace scene
|
||||
//! Unknown scene node animator
|
||||
ESNAT_UNKNOWN,
|
||||
|
||||
//! This enum is never used, it only forces the compiler to compile this enumeration to 32 bit.
|
||||
//! This enum is never used, it only forces the compiler to
|
||||
//! compile these enumeration values to 32 bit.
|
||||
ESNAT_FORCE_32_BIT = 0x7fffffff
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -70,11 +70,11 @@ namespace scene
|
||||
ESNT_MD3_SCENE_NODE = MAKE_IRR_ID('m','d','3','_'),
|
||||
|
||||
//! Maya Camera Scene Node
|
||||
/** Legacy, for loading version <= 1.4.x .irr files */
|
||||
//! Legacy, for loading version <= 1.4.x .irr files
|
||||
ESNT_CAMERA_MAYA = MAKE_IRR_ID('c','a','m','M'),
|
||||
|
||||
//! First Person Shooter Camera
|
||||
/** Legacy, for loading version <= 1.4.x .irr files */
|
||||
//! Legacy, for loading version <= 1.4.x .irr files
|
||||
ESNT_CAMERA_FPS = MAKE_IRR_ID('c','a','m','F'),
|
||||
|
||||
//! Unknown scene node
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2007-2009 Nikolaus Gebhardt / Thomas Alten
|
||||
// Copyright (C) 2007-2008 Nikolaus Gebhardt / Thomas Alten
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
62
src/dep/include/irrlicht/IBillboardTextSceneNode.h
Normal file
62
src/dep/include/irrlicht/IBillboardTextSceneNode.h
Normal file
@ -0,0 +1,62 @@
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__
|
||||
#define __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__
|
||||
|
||||
#include "IBillboardSceneNode.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
|
||||
//! A billboard text scene node.
|
||||
/** Acts like a billboard which displays the currently set text.
|
||||
Due to the exclusion of RTTI in Irrlicht we have to avoid multiple
|
||||
inheritance. Hence, changes to the ITextSceneNode interface have
|
||||
to be copied here manually.
|
||||
*/
|
||||
class IBillboardTextSceneNode : public IBillboardSceneNode
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
IBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
|
||||
const core::vector3df& position = core::vector3df(0,0,0))
|
||||
: IBillboardSceneNode(parent, mgr, id, position) {}
|
||||
|
||||
//! Sets the size of the billboard.
|
||||
virtual void setSize(const core::dimension2d<f32>& size) = 0;
|
||||
|
||||
//! Returns the size of the billboard.
|
||||
virtual const core::dimension2d<f32>& getSize() const = 0;
|
||||
|
||||
//! Set the color of all vertices of the billboard
|
||||
/** \param overallColor: the color to set */
|
||||
virtual void setColor(const video::SColor & overallColor) = 0;
|
||||
|
||||
//! Set the color of the top and bottom vertices of the billboard
|
||||
/** \param topColor: the color to set the top vertices
|
||||
\param bottomColor: the color to set the bottom vertices */
|
||||
virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) = 0;
|
||||
|
||||
//! Gets the color of the top and bottom vertices of the billboard
|
||||
/** \param topColor: stores the color of the top vertices
|
||||
\param bottomColor: stores the color of the bottom vertices */
|
||||
virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const = 0;
|
||||
|
||||
//! sets the text string
|
||||
virtual void setText(const wchar_t* text) = 0;
|
||||
|
||||
//! sets the color of the text
|
||||
virtual void setTextColor(video::SColor color) = 0;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -146,7 +146,7 @@ namespace scene
|
||||
setTarget() will update its rotation so that its +Z axis will
|
||||
point at the target point. FPS camera use this binding by
|
||||
default; other cameras do not.
|
||||
\param bound True to bind the camera's scene node rotation
|
||||
\param binding true to bind the camera's scene node rotation
|
||||
and targetting, false to unbind them.
|
||||
@see getTargetAndRotationBinding() */
|
||||
virtual void bindTargetAndRotation(bool bound) = 0;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
211
src/dep/include/irrlicht/IDynamicMeshBuffer.h
Normal file
211
src/dep/include/irrlicht/IDynamicMeshBuffer.h
Normal file
@ -0,0 +1,211 @@
|
||||
// Copyright (C) 2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__
|
||||
#define __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__
|
||||
|
||||
#include "IMeshBuffer.h"
|
||||
#include "IVertexBuffer.h"
|
||||
#include "IIndexBuffer.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
|
||||
/** a dynamic meshBuffer */
|
||||
class IDynamicMeshBuffer : public IMeshBuffer
|
||||
{
|
||||
public:
|
||||
virtual IVertexBuffer &getVertexBuffer() const =0;
|
||||
virtual IIndexBuffer &getIndexBuffer() const =0;
|
||||
|
||||
virtual void setVertexBuffer(IVertexBuffer *vertexBuffer) =0;
|
||||
virtual void setIndexBuffer(IIndexBuffer *indexBuffer) =0;
|
||||
|
||||
//! Get the material of this meshbuffer
|
||||
/** \return Material of this buffer. */
|
||||
virtual video::SMaterial& getMaterial() =0;
|
||||
|
||||
//! Get the material of this meshbuffer
|
||||
/** \return Material of this buffer. */
|
||||
virtual const video::SMaterial& getMaterial() const =0;
|
||||
|
||||
//! Get the axis aligned bounding box of this meshbuffer.
|
||||
/** \return Axis aligned bounding box of this buffer. */
|
||||
virtual const core::aabbox3df& getBoundingBox() const =0;
|
||||
|
||||
//! Set axis aligned bounding box
|
||||
/** \param box User defined axis aligned bounding box to use
|
||||
for this buffer. */
|
||||
virtual void setBoundingBox(const core::aabbox3df& box) =0;
|
||||
|
||||
//! Recalculates the bounding box. Should be called if the mesh changed.
|
||||
virtual void recalculateBoundingBox() =0;
|
||||
|
||||
//! Append the vertices and indices to the current buffer
|
||||
/** Only works for compatible vertex types.
|
||||
\param vertices Pointer to a vertex array.
|
||||
\param numVertices Number of vertices in the array.
|
||||
\param indices Pointer to index array.
|
||||
\param numIndices Number of indices in array. */
|
||||
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//! Append the meshbuffer to the current buffer
|
||||
/** Only works for compatible vertex types
|
||||
\param other Buffer to append to this one. */
|
||||
virtual void append(const IMeshBuffer* const other)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ------------------- To be removed? ------------------- //
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
|
||||
{
|
||||
return getVertexBuffer().getHardwareMappingHint();
|
||||
}
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
|
||||
{
|
||||
return getIndexBuffer().getHardwareMappingHint();
|
||||
}
|
||||
|
||||
//! 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)
|
||||
getVertexBuffer().setHardwareMappingHint(NewMappingHint);
|
||||
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
|
||||
getIndexBuffer().setHardwareMappingHint(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)
|
||||
getVertexBuffer().setDirty();
|
||||
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
|
||||
getIndexBuffer().setDirty();
|
||||
}
|
||||
|
||||
virtual u32 getChangedID_Vertex() const
|
||||
{
|
||||
return getVertexBuffer().getChangedID();
|
||||
}
|
||||
|
||||
virtual u32 getChangedID_Index() const
|
||||
{
|
||||
return getIndexBuffer().getChangedID();
|
||||
}
|
||||
|
||||
// ------------------- Old interface ------------------- //
|
||||
|
||||
//! Get type of vertex data which is stored in this meshbuffer.
|
||||
/** \return Vertex type of this buffer. */
|
||||
virtual video::E_VERTEX_TYPE getVertexType() const
|
||||
{
|
||||
return getVertexBuffer().getType();
|
||||
}
|
||||
|
||||
//! Get access to vertex data. The data is an array of vertices.
|
||||
/** Which vertex type is used can be determined by getVertexType().
|
||||
\return Pointer to array of vertices. */
|
||||
virtual const void* getVertices() const
|
||||
{
|
||||
return getVertexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get access to vertex data. The data is an array of vertices.
|
||||
/** Which vertex type is used can be determined by getVertexType().
|
||||
\return Pointer to array of vertices. */
|
||||
virtual void* getVertices()
|
||||
{
|
||||
return getVertexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get amount of vertices in meshbuffer.
|
||||
/** \return Number of vertices in this buffer. */
|
||||
virtual u32 getVertexCount() const
|
||||
{
|
||||
return getVertexBuffer().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 getIndexBuffer().getType();
|
||||
}
|
||||
|
||||
//! Get access to Indices.
|
||||
/** \return Pointer to indices array. */
|
||||
virtual const u16* getIndices() const
|
||||
{
|
||||
return (u16*)getIndexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get access to Indices.
|
||||
/** \return Pointer to indices array. */
|
||||
virtual u16* getIndices()
|
||||
{
|
||||
return (u16*)getIndexBuffer().getData();
|
||||
}
|
||||
|
||||
//! Get amount of indices in this meshbuffer.
|
||||
/** \return Number of indices in this buffer. */
|
||||
virtual u32 getIndexCount() const
|
||||
{
|
||||
return getIndexBuffer().size();
|
||||
}
|
||||
|
||||
//! returns position of vertex i
|
||||
virtual const core::vector3df& getPosition(u32 i) const
|
||||
{
|
||||
return getVertexBuffer()[i].Pos;
|
||||
}
|
||||
|
||||
//! returns position of vertex i
|
||||
virtual core::vector3df& getPosition(u32 i)
|
||||
{
|
||||
return getVertexBuffer()[i].Pos;
|
||||
}
|
||||
|
||||
//! returns texture coords of vertex i
|
||||
virtual const core::vector2df& getTCoords(u32 i) const
|
||||
{
|
||||
return getVertexBuffer()[i].TCoords;
|
||||
}
|
||||
|
||||
//! returns texture coords of vertex i
|
||||
virtual core::vector2df& getTCoords(u32 i)
|
||||
{
|
||||
return getVertexBuffer()[i].TCoords;
|
||||
}
|
||||
|
||||
//! returns normal of vertex i
|
||||
virtual const core::vector3df& getNormal(u32 i) const
|
||||
{
|
||||
return getVertexBuffer()[i].Normal;
|
||||
}
|
||||
|
||||
//! returns normal of vertex i
|
||||
virtual core::vector3df& getNormal(u32 i)
|
||||
{
|
||||
return getVertexBuffer()[i].Normal;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -358,7 +358,7 @@ struct SJoystickInfo
|
||||
//! The ID of the joystick
|
||||
/** This is an internal Irrlicht index; it does not map directly
|
||||
* to any particular hardware joystick. It corresponds to the
|
||||
* irr::SJoystickEvent Joystick ID. */
|
||||
* @ref SJoystickEvent Joystick ID. */
|
||||
u8 Joystick;
|
||||
|
||||
//! The name that the joystick uses to identify itself.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -119,9 +119,7 @@ public:
|
||||
|
||||
//! Returns the base part of a filename, i.e. the name without the directory
|
||||
//! part. If no directory is prefixed, the full name is returned.
|
||||
/** \param filename: The file to get the basename from
|
||||
\param keepExtension True if filename with extension is returned otherwise everything
|
||||
after the final '.' is removed as well. */
|
||||
/** \param filename: The file to get the basename from */
|
||||
virtual core::stringc getFileBasename(const core::stringc& filename, bool keepExtension=true) const = 0;
|
||||
|
||||
//! Creates a list of files and directories in the current working directory and returns it.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -45,9 +45,9 @@ namespace gui
|
||||
|
||||
//! Sets text justification of the text area
|
||||
/** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
|
||||
EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
|
||||
EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
|
||||
\param vertical: EGUIA_UPPERLEFT to align with top edge,
|
||||
EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */
|
||||
EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */
|
||||
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -36,7 +36,9 @@ namespace gui
|
||||
\param checked: Specifies if the menu item should be initially checked.
|
||||
\return Returns the index of the new item */
|
||||
virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
|
||||
bool hasSubMenu=false, bool checked=false) = 0;
|
||||
bool hasSubMenu=false,
|
||||
bool checked=false
|
||||
) = 0;
|
||||
|
||||
//! Adds a separator item to the menu
|
||||
virtual void addSeparator() = 0;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -61,7 +61,7 @@ namespace gui
|
||||
virtual void setWordWrap(bool enable) = 0;
|
||||
|
||||
//! Checks if word wrap is enabled
|
||||
/** \return true if word wrap is enabled, false otherwise */
|
||||
//! \return true if word wrap is enabled, false otherwise
|
||||
virtual bool isWordWrapEnabled() const = 0;
|
||||
|
||||
//! Enables or disables newlines.
|
||||
@ -70,15 +70,15 @@ namespace gui
|
||||
virtual void setMultiLine(bool enable) = 0;
|
||||
|
||||
//! Checks if multi line editing is enabled
|
||||
/** \return true if mult-line is enabled, false otherwise */
|
||||
//! \return true if mult-line is enabled, false otherwise
|
||||
virtual bool isMultiLineEnabled() const = 0;
|
||||
|
||||
//! Enables or disables automatic scrolling with cursor position
|
||||
/** \param enable: If set to true, the text will move around with the cursor position */
|
||||
//! \param enable: If set to true, the text will move around with the cursor position
|
||||
virtual void setAutoScroll(bool enable) = 0;
|
||||
|
||||
//! Checks to see if automatic scrolling is enabled
|
||||
/** \return true if automatic scrolling is enabled, false if not */
|
||||
//! \return true if automatic scrolling is enabled, false if not
|
||||
virtual bool isAutoScrollEnabled() const = 0;
|
||||
|
||||
//! Sets whether the edit box is a password box. Setting this to true will
|
||||
@ -91,7 +91,7 @@ namespace gui
|
||||
virtual bool isPasswordBox() const = 0;
|
||||
|
||||
//! Gets the size area of the text in the edit box
|
||||
/** \return The size in pixels of the text */
|
||||
//! \return Returns the size in pixels of the text
|
||||
virtual core::dimension2di getTextDimension() = 0;
|
||||
|
||||
//! Sets the maximum amount of characters which may be entered in the box.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
|
||||
|
||||
//! Sets the relative rectangle of this element.
|
||||
/** \param r The absolute position to set */
|
||||
/** \param r The absolute position to set */
|
||||
void setRelativePosition(const core::rect<s32>& r)
|
||||
{
|
||||
if (Parent)
|
||||
@ -107,12 +107,12 @@ public:
|
||||
}
|
||||
|
||||
//! Sets the relative rectangle of this element, maintaining its current width and height
|
||||
/** \param position The new relative position to set. Width and height will not be changed. */
|
||||
/** \param position The new relative position to set. Width and height will not be changed. */
|
||||
void setRelativePosition(const core::position2di & position)
|
||||
{
|
||||
const core::dimension2di mySize = RelativeRect.getSize();
|
||||
const core::rect<s32> rectangle(position.X, position.Y,
|
||||
position.X + mySize.Width, position.Y + mySize.Height);
|
||||
position.X + mySize.Width, position.Y + mySize.Height);
|
||||
setRelativePosition(rectangle);
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ public:
|
||||
|
||||
|
||||
//! Sets whether the element will ignore its parent's clipping rectangle
|
||||
/** \param noClip If true, the element will not be clipped by its parent's clipping rectangle. */
|
||||
/** \param noClip If true, the element will not be clipped by its parent's clipping rectangle. */
|
||||
void setNotClipped(bool noClip)
|
||||
{
|
||||
NoClip = noClip;
|
||||
@ -222,6 +222,7 @@ public:
|
||||
{
|
||||
core::rect<s32> parentAbsolute(0,0,0,0);
|
||||
core::rect<s32> parentAbsoluteClip;
|
||||
s32 diffx, diffy;
|
||||
f32 fw=0.f, fh=0.f;
|
||||
|
||||
if (Parent)
|
||||
@ -239,8 +240,8 @@ public:
|
||||
parentAbsoluteClip = Parent->AbsoluteClippingRect;
|
||||
}
|
||||
|
||||
const s32 diffx = parentAbsolute.getWidth() - LastParentRect.getWidth();
|
||||
const s32 diffy = parentAbsolute.getHeight() - LastParentRect.getHeight();
|
||||
diffx = parentAbsolute.getWidth() - LastParentRect.getWidth();
|
||||
diffy = parentAbsolute.getHeight() - LastParentRect.getHeight();
|
||||
|
||||
if (AlignLeft == EGUIA_SCALE || AlignRight == EGUIA_SCALE)
|
||||
fw = (f32)parentAbsolute.getWidth();
|
||||
@ -344,18 +345,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//! Returns the topmost GUI element at the specific position.
|
||||
/**
|
||||
This will check this GUI element and all of its descendants, so it
|
||||
may return this GUI element. To check all GUI elements, call this
|
||||
function on device->getGUIEnvironment()->getRootGUIElement(). Note
|
||||
that the root element is the size of the screen, so doing so (with
|
||||
an on-screen point) will always return the root element if no other
|
||||
element is above it at that point.
|
||||
\param point: The point at which to find a GUI element.
|
||||
\return The topmost GUI element at that point, or 0 if there are
|
||||
no candidate elements at this point.
|
||||
*/
|
||||
//! Returns the child element, which is at the position of the point.
|
||||
IGUIElement* getElementFromPoint(const core::position2d<s32>& point)
|
||||
{
|
||||
IGUIElement* target = 0;
|
||||
@ -366,7 +356,6 @@ public:
|
||||
core::list<IGUIElement*>::Iterator it = Children.getLast();
|
||||
|
||||
if (IsVisible)
|
||||
{
|
||||
while(it != Children.end())
|
||||
{
|
||||
target = (*it)->getElementFromPoint(point);
|
||||
@ -375,7 +364,6 @@ public:
|
||||
|
||||
--it;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsVisible && isPointInside(point))
|
||||
target = this;
|
||||
@ -385,13 +373,12 @@ public:
|
||||
|
||||
|
||||
//! Returns true if a point is within this element.
|
||||
/** Elements with a shape other than a rectangle should override this method */
|
||||
//! Elements with a shape other than a rectangle will override this method
|
||||
virtual bool isPointInside(const core::position2d<s32>& point) const
|
||||
{
|
||||
return AbsoluteClippingRect.isPointInside(point);
|
||||
}
|
||||
|
||||
|
||||
//! Adds a GUI element as new child of this element.
|
||||
virtual void addChild(IGUIElement* child)
|
||||
{
|
||||
@ -483,18 +470,19 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//! Sets whether this control was created as part of its parent.
|
||||
/** For example, it is true when a scrollbar is part of a listbox.
|
||||
SubElements are not saved to disk when calling guiEnvironment->saveGUI() */
|
||||
//! Sets whether this control was created as part of its parent,
|
||||
//! for example when a scrollbar is part of a listbox.
|
||||
//! SubElements are not saved to disk when calling guiEnvironment->saveGUI()
|
||||
virtual void setSubElement(bool subElement)
|
||||
{
|
||||
IsSubElement = subElement;
|
||||
}
|
||||
|
||||
|
||||
//! If set to true, the focus will visit this element when using the tab key to cycle through elements.
|
||||
/** If this element is a tab group (see isTabGroup/setTabGroup) then
|
||||
ctrl+tab will be used instead. */
|
||||
//! If set to true, the focus will visit this element when using
|
||||
//! the tab key to cycle through elements.
|
||||
//! If this element is a tab group (see isTabGroup/setTabGroup) then
|
||||
//! ctrl+tab will be used instead.
|
||||
void setTabStop(bool enable)
|
||||
{
|
||||
IsTabStop = enable;
|
||||
@ -509,9 +497,9 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//! Sets the priority of focus when using the tab key to navigate between a group of elements.
|
||||
/** See setTabGroup, isTabGroup and getTabGroup for information on tab groups.
|
||||
Elements with a lower number are focused first */
|
||||
//! Sets the priority of focus when using the tab key to navigate between a group
|
||||
//! of elements. See setTabGroup, isTabGroup and getTabGroup for information on tab groups.
|
||||
//! Elements with a lower number are focused first
|
||||
void setTabOrder(s32 index)
|
||||
{
|
||||
// negative = autonumber
|
||||
@ -546,9 +534,9 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//! Sets whether this element is a container for a group of elements which can be navigated using the tab key.
|
||||
/** For example, windows are tab groups.
|
||||
Groups can be navigated using ctrl+tab, providing isTabStop is true. */
|
||||
//! Sets whether this element is a container for a group of elements which
|
||||
//! can be navigated using the tab key. For example, windows are tab groups.
|
||||
//! Groups can be navigated using ctrl+tab, providing isTabStop is true.
|
||||
void setTabGroup(bool isGroup)
|
||||
{
|
||||
IsTabGroup = isGroup;
|
||||
@ -563,7 +551,8 @@ public:
|
||||
}
|
||||
|
||||
|
||||
//! Returns the container element which holds all elements in this element's tab group.
|
||||
//! Returns the container element which holds all elements in this element's
|
||||
//! tab group.
|
||||
IGUIElement* getTabGroup()
|
||||
{
|
||||
IGUIElement *ret=this;
|
||||
@ -640,7 +629,7 @@ public:
|
||||
|
||||
|
||||
//! Brings a child to front
|
||||
/** \return True if successful, false if not. */
|
||||
/** \return Returns true if successful, false if not. */
|
||||
virtual bool bringToFront(IGUIElement* element)
|
||||
{
|
||||
core::list<IGUIElement*>::Iterator it = Children.begin();
|
||||
@ -713,13 +702,13 @@ public:
|
||||
|
||||
|
||||
//! searches elements to find the closest next element to tab to
|
||||
/** \param startOrder: The TabOrder of the current element, -1 if none
|
||||
\param reverse: true if searching for a lower number
|
||||
\param group: true if searching for a higher one
|
||||
\param first: element with the highest/lowest known tab order depending on search direction
|
||||
\param closest: the closest match, depending on tab order and direction
|
||||
\param includeInvisible: includes invisible elements in the search (default=false)
|
||||
\return true if successfully found an element, false to continue searching/fail */
|
||||
//! \param startOrder: The TabOrder of the current element, -1 if none
|
||||
//! \param reverse: true if searching for a lower number
|
||||
//! \param group: true if searching for a higher one
|
||||
//! \param first: element with the highest/lowest known tab order depending on search direction
|
||||
//! \param closest: the closest match, depending on tab order and direction
|
||||
//! \param includeInvisible: includes invisible elements in the search (default=false)
|
||||
//! \return true if successfully found an element, false to continue searching/fail
|
||||
bool getNextElement(s32 startOrder, bool reverse, bool group,
|
||||
IGUIElement*& first, IGUIElement*& closest, bool includeInvisible=false) const
|
||||
{
|
||||
@ -816,8 +805,8 @@ public:
|
||||
|
||||
|
||||
//! Writes attributes of the scene node.
|
||||
/** Implement this to expose the attributes of your scene node for
|
||||
scripting languages, editors, debuggers or xml serialization purposes. */
|
||||
//! Implement this to expose the attributes of your scene node for
|
||||
//! scripting languages, editors, debuggers or xml serialization purposes.
|
||||
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
|
||||
{
|
||||
out->addInt("Id", ID );
|
||||
@ -839,8 +828,8 @@ public:
|
||||
|
||||
|
||||
//! Reads attributes of the scene node.
|
||||
/** Implement this to set the attributes of your scene node for
|
||||
scripting languages, editors, debuggers or xml deserialization purposes. */
|
||||
//! Implement this to set the attributes of your scene node for
|
||||
//! scripting languages, editors, debuggers or xml deserialization purposes.
|
||||
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
|
||||
{
|
||||
setID(in->getAttributeAsInt("Id"));
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -62,7 +62,8 @@ class IGUIEnvironment : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
|
||||
//! Draws all gui elements by traversing the GUI environment starting at the root node.
|
||||
//! Draws all gui elements by traversing the GUI environment starting
|
||||
//! at the root node.
|
||||
virtual void drawAll() = 0;
|
||||
|
||||
//! Sets the focus to an element.
|
||||
@ -74,7 +75,7 @@ public:
|
||||
virtual bool setFocus(IGUIElement* element) = 0;
|
||||
|
||||
//! Returns the element which holds the focus.
|
||||
/** \return Pointer to the element with focus. */
|
||||
//! \return Pointer to the element with focus.
|
||||
virtual IGUIElement* getFocus() const = 0;
|
||||
|
||||
//! Removes the focus from an element.
|
||||
@ -90,15 +91,15 @@ public:
|
||||
virtual bool hasFocus(IGUIElement* element) const = 0;
|
||||
|
||||
//! Returns the current video driver.
|
||||
/** \return Pointer to the video driver. */
|
||||
//! \return Pointer to the video driver.
|
||||
virtual video::IVideoDriver* getVideoDriver() const = 0;
|
||||
|
||||
//! Returns the file system.
|
||||
/** \return Pointer to the file system. */
|
||||
//! \return Pointer to the file system.
|
||||
virtual io::IFileSystem* getFileSystem() const = 0;
|
||||
|
||||
//! returns a pointer to the OS operator
|
||||
/** \return Pointer to the OS operator. */
|
||||
//! \return Pointer to the OS operator.
|
||||
virtual IOSOperator* getOSOperator() const = 0;
|
||||
|
||||
//! Removes all elements from the environment.
|
||||
@ -118,7 +119,7 @@ public:
|
||||
virtual void setUserEventReceiver(IEventReceiver* evr) = 0;
|
||||
|
||||
//! Returns pointer to the current gui skin.
|
||||
/** \return Pointer to the GUI skin. */
|
||||
//! \return Pointer to the GUI skin.
|
||||
virtual IGUISkin* getSkin() const = 0;
|
||||
|
||||
//! Sets a new GUI Skin
|
||||
@ -172,17 +173,17 @@ public:
|
||||
virtual IGUISpriteBank* addEmptySpriteBank(const c8 *name) = 0;
|
||||
|
||||
//! Returns the root gui element.
|
||||
/** This is the first gui element, the (direct or indirect) parent of all
|
||||
other gui elements. It is a valid IGUIElement, with dimensions the same
|
||||
size as the screen. You should not need to use this method directly, unless
|
||||
you wish to reparent GUI elements to the top level.
|
||||
/** This is the first gui element, parent of all other
|
||||
gui elements. You'll never need to use this method, unless you are
|
||||
creating your own gui elements, trying to add them to the gui elements
|
||||
without a parent.
|
||||
\return Pointer to the root element of the GUI. The returned pointer
|
||||
should not be dropped. See IReferenceCounted::drop() for more
|
||||
information. */
|
||||
virtual IGUIElement* getRootGUIElement() = 0;
|
||||
|
||||
//! Adds a button element.
|
||||
/** \param rectangle Rectangle specifying the borders of the button.
|
||||
/** \param rectangle Position and dimension of the button.
|
||||
\param parent Parent gui element of the button.
|
||||
\param id Id with which the gui element can be identified.
|
||||
\param text Text displayed on the button.
|
||||
@ -194,7 +195,7 @@ public:
|
||||
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext = 0) = 0;
|
||||
|
||||
//! Adds an empty window element.
|
||||
/** \param rectangle Rectangle specifying the borders of the window.
|
||||
/** \param rectangle Position and dimension of the window.
|
||||
\param modal Defines if the dialog is modal. This means, that all other
|
||||
gui elements which were created before the window cannot be used until
|
||||
it is removed.
|
||||
@ -207,10 +208,10 @@ public:
|
||||
virtual IGUIWindow* addWindow(const core::rect<s32>& rectangle, bool modal = false,
|
||||
const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a modal screen.
|
||||
/** This control stops its parent's members from being able to receive
|
||||
input until its last child is removed, it then deletes itself.
|
||||
\param parent Parent gui element of the modal.
|
||||
//! Adds a modal screen. This control stops its parent's members from
|
||||
//! being able to recieve input until its last child is removed, it
|
||||
//! then deletes itself.
|
||||
/** \param parent Parent gui element of the modal.
|
||||
\return Pointer to the created modal. Returns 0 if an error occured.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
@ -236,7 +237,7 @@ public:
|
||||
//! Adds a scrollbar.
|
||||
/** \param horizontal Specifies if the scroll bar is drawn horizontal
|
||||
or vertical.
|
||||
\param rectangle Rectangle specifying the borders of the scrollbar.
|
||||
\param rectangle Position and dimension of the scroll bar.
|
||||
\param parent Parent gui element of the scroll bar.
|
||||
\param id Id to identify the gui element.
|
||||
\return Pointer to the created scrollbar. Returns 0 if an error
|
||||
@ -262,7 +263,7 @@ public:
|
||||
|
||||
//! Adds an image element.
|
||||
/** Use IGUIImage::setImage later to set the image to be displayed.
|
||||
\param rectangle Rectangle specifying the borders of the image.
|
||||
\param rectangle Position and dimension of the image.
|
||||
\param parent Parent gui element of the image.
|
||||
\param id Id to identify the gui element.
|
||||
\param text Title text of the image.
|
||||
@ -274,7 +275,7 @@ public:
|
||||
|
||||
//! Adds a checkbox element.
|
||||
/** \param checked Define the initial state of the check box.
|
||||
\param rectangle Rectangle specifying the borders of the check box.
|
||||
\param rectangle Position and dimension of check box.
|
||||
\param parent Parent gui element of the check box.
|
||||
\param id Id to identify the gui element.
|
||||
\param text Title text of the check box.
|
||||
@ -285,7 +286,7 @@ public:
|
||||
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0;
|
||||
|
||||
//! Adds a list box element.
|
||||
/** \param rectangle Rectangle specifying the borders of the list box.
|
||||
/** \param rectangle Position and dimension of list box.
|
||||
\param parent Parent gui element of the list box.
|
||||
\param id Id to identify the gui element.
|
||||
\param drawBackground Flag whether the background should be drawn.
|
||||
@ -296,7 +297,7 @@ public:
|
||||
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0;
|
||||
|
||||
//! Adds a mesh viewer. Not 100% implemented yet.
|
||||
/** \param rectangle Rectangle specifying the borders of the mesh viewer.
|
||||
/** \param rectangle Position and dimension of mesh viewer.
|
||||
\param parent Parent gui element of the mesh viewer.
|
||||
\param id Id to identify the gui element.
|
||||
\param text Title text of the mesh viewer.
|
||||
@ -334,7 +335,7 @@ public:
|
||||
|
||||
//! Adds a static text.
|
||||
/** \param text Text to be displayed. Can be altered after creation by SetText().
|
||||
\param rectangle Rectangle specifying the borders of the static text
|
||||
\param rectangle Position and dimension of the static text.
|
||||
\param border Set to true if the static text should have a 3d border.
|
||||
\param wordWrap Enable if the text should wrap into multiple lines.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
@ -355,7 +356,7 @@ public:
|
||||
ctrl+X, ctrl+V, ctrl+C, shift+Left, shift+Right, Home, End, and so on.
|
||||
\param text Text to be displayed. Can be altered after creation
|
||||
by setText().
|
||||
\param rectangle Rectangle specifying the borders of the edit box.
|
||||
\param rectangle Position and dimension of the edit box.
|
||||
\param border Set to true if the edit box should have a 3d border.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the edit box directly in the environment.
|
||||
@ -369,7 +370,7 @@ public:
|
||||
//! Adds a spin box.
|
||||
/** An edit box with up and down buttons
|
||||
\param text Text to be displayed. Can be altered after creation by setText().
|
||||
\param rectangle Rectangle specifying the borders of the spin box.
|
||||
\param rectangle Position and dimension of the spin box.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the spin box directly in the environment.
|
||||
\param id The ID of the element.
|
||||
@ -380,7 +381,7 @@ public:
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds an element for fading in or out.
|
||||
/** \param rectangle Rectangle specifying the borders of the fader.
|
||||
/* \param rectangle Rectangle specifying the borders of the element.
|
||||
If the pointer is NULL, the whole screen is used.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
\param id An identifier for the fader.
|
||||
@ -390,7 +391,7 @@ public:
|
||||
virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a tab control to the environment.
|
||||
/** \param rectangle Rectangle specifying the borders of the tab control.
|
||||
/** \param rectangle Position and dimension of the tab control.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the tab control directly in the environment.
|
||||
\param fillbackground Specifies if the background of the tab control
|
||||
@ -410,7 +411,7 @@ public:
|
||||
/** You can use this element to group other elements. This is not used
|
||||
for creating tabs on tab controls, please use IGUITabControl::addTab()
|
||||
for this instead.
|
||||
\param rectangle Rectangle specifying the borders of the tab.
|
||||
\param rectangle Position and dimension of the tab.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the tab directly in the environment.
|
||||
\param id An identifier for the tab.
|
||||
@ -421,8 +422,8 @@ public:
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a context menu to the environment.
|
||||
/** \param rectangle Rectangle specifying the borders of the menu.
|
||||
Note that the menu is resizing itself based on what items you add.
|
||||
/** \param rectangle Position and dimension of the menu. Note that the
|
||||
menu is resizing itself based on what items you add.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the menu directly in the environment.
|
||||
\param id An identifier for the menu.
|
||||
@ -455,7 +456,7 @@ public:
|
||||
virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a combo box to the environment.
|
||||
/** \param rectangle Rectangle specifying the borders of the combo box.
|
||||
/** \param rectangle Position and dimension of the combo box.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the combo box directly in the environment.
|
||||
\param id An identifier for the combo box.
|
||||
@ -466,18 +467,10 @@ public:
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a table to the environment
|
||||
/** \param rectangle Rectangle specifying the borders of the table.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the table directly in the environment.
|
||||
\param id An identifier for the combo box.
|
||||
\param drawBackground Sets whether to draw the background filled.
|
||||
\return Pointer to the created table. Returns 0 if an error occured.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUITable* addTable(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) =0;
|
||||
IGUIElement* parent=0, s32 id=-1, bool drawBackground = false) = 0;
|
||||
|
||||
//! Get the default element factory which can create all built-in elements
|
||||
//! Returns the default element factory which can create all built in elements
|
||||
/** \return Pointer to the factory.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
@ -490,45 +483,34 @@ public:
|
||||
\param factoryToAdd Pointer to new factory. */
|
||||
virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd) = 0;
|
||||
|
||||
//! Get amount of registered gui element factories.
|
||||
/** \return Amount of registered gui element factories. */
|
||||
//! Returns amount of registered gui element factories.
|
||||
//! \return Amount of registered gui element factories.
|
||||
virtual u32 getRegisteredGUIElementFactoryCount() const = 0;
|
||||
|
||||
//! Get a gui element factory by index
|
||||
/** \param index Index of the factory.
|
||||
\return Factory at given index, or 0 if no such factory exists. */
|
||||
//! Returns a gui element factory by index
|
||||
virtual IGUIElementFactory* getGUIElementFactory(u32 index) const = 0;
|
||||
|
||||
//! Adds a GUI element by its name
|
||||
/** Each factory is checked if it can create an element of the given
|
||||
name. The first match will be created.
|
||||
\param elementName Name of the element to be created.
|
||||
\param parent Parent of the new element, if not 0.
|
||||
\return New GUI element, or 0 if no such element exists. */
|
||||
//! Adds a GUI Element by its name
|
||||
virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Saves the current gui into a file.
|
||||
/** \param filename Name of the file.
|
||||
\param start The GUIElement to start with. Root if 0.
|
||||
\return True if saving succeeded, else false. */
|
||||
//! \param filename Name of the file.
|
||||
//! \param start The GUIElement to start with. Root if 0.
|
||||
virtual bool saveGUI(const c8* filename, IGUIElement* start=0) = 0;
|
||||
|
||||
//! Saves the current gui into a file.
|
||||
/** \param file The file to write to.
|
||||
\param start The GUIElement to start with. Root if 0.
|
||||
\return True if saving succeeded, else false. */
|
||||
//! \param file The file to write to.
|
||||
//! \param start The GUIElement to start with. Root if 0.
|
||||
virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) = 0;
|
||||
|
||||
//! Loads the gui. Note that the current gui is not cleared before.
|
||||
/** \param filename Name of the file .
|
||||
\param parent Parent for the loaded GUI, root if 0.
|
||||
\return True if loading succeeded, else false. */
|
||||
//! \param filename Name of the file .
|
||||
//! \param parent Parent for the loaded GUI, root if 0.
|
||||
virtual bool loadGUI(const c8* filename, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Loads the gui. Note that the current gui is not cleared before.
|
||||
/** \param file The file to load from.
|
||||
\param parent Parent for the loaded GUI, root if 0.
|
||||
\return True if loading succeeded, else false. */
|
||||
//! \param file The file to load from.
|
||||
//! \param parent Parent for the loaded GUI, root if 0.
|
||||
virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Writes attributes of the gui environment
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -21,13 +21,13 @@ enum EGUI_FONT_TYPE
|
||||
EGFT_BITMAP = 0,
|
||||
|
||||
//! Scalable vector fonts loaded from an XML file.
|
||||
/** These fonts reside in system memory and use no video memory
|
||||
until they are displayed. These are slower than bitmap fonts
|
||||
but can be easily scaled and rotated. */
|
||||
//! These fonts reside in system memory and use no video memory
|
||||
//! until they are displayed. These are slower than bitmap fonts
|
||||
//! but can be easily scaled and rotated.
|
||||
EGFT_VECTOR,
|
||||
|
||||
//! A font which uses a the native API provided by the operating system.
|
||||
/** Currently not used. */
|
||||
//! Currently not used.
|
||||
EGFT_OS,
|
||||
|
||||
//! An external font type provided by the user.
|
||||
@ -66,10 +66,8 @@ public:
|
||||
//! Returns the type of this font
|
||||
virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; }
|
||||
|
||||
//! Sets global kerning width for the font.
|
||||
//! Sets global kerning for the font.
|
||||
virtual void setKerningWidth (s32 kerning) = 0;
|
||||
|
||||
//! Sets global kerning height for the font.
|
||||
virtual void setKerningHeight (s32 kerning) = 0;
|
||||
|
||||
//! Gets kerning values (distance between letters) for the font. If no parameters are provided,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -36,23 +36,22 @@ namespace gui
|
||||
virtual video::SColor getColor() const = 0;
|
||||
|
||||
//! Sets the color to fade out to or to fade in from.
|
||||
/** \param color: Color to where it is faded out od from it is faded in. */
|
||||
//! \param color: Color to where it is faded out od from it is faded in.
|
||||
virtual void setColor(video::SColor color) = 0;
|
||||
virtual void setColor(video::SColor source, video::SColor dest) = 0;
|
||||
|
||||
//! Starts the fade in process.
|
||||
/** In the beginning the whole rect is drawn by the set color
|
||||
(black by default) and at the end of the overgiven time the
|
||||
color has faded out.
|
||||
\param time: Time specifing how long it should need to fade in,
|
||||
in milliseconds. */
|
||||
//! Starts the fade in process. In the beginning the whole rect is drawn by
|
||||
//! the set color (black by default) and at the end of the overgiven
|
||||
//! time the color has faded out.
|
||||
//! \param time: Time specifing how long it should need to fade in,
|
||||
//! in milliseconds.
|
||||
virtual void fadeIn(u32 time) = 0;
|
||||
|
||||
//! Starts the fade out process.
|
||||
/** In the beginning everything is visible, and at the end of
|
||||
the time only the set color (black by the fault) will be drawn.
|
||||
\param time: Time specifing how long it should need to fade out,
|
||||
in milliseconds. */
|
||||
//! Starts the fade out process. In the beginning everything is visible,
|
||||
//! and at the end of the time only the set color (black by the fault)
|
||||
//! will be drawn.
|
||||
//! \param time: Time specifing how long it should need to fade out,
|
||||
//! in milliseconds.
|
||||
virtual void fadeOut(u32 time) = 0;
|
||||
|
||||
//! Returns if the fade in or out process is done.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -12,6 +12,7 @@ namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
class IGUIFont;
|
||||
class IGUISpriteBank;
|
||||
|
||||
//! Enumeration for listbox colors
|
||||
@ -48,9 +49,10 @@ namespace gui
|
||||
virtual u32 addItem(const wchar_t* text) = 0;
|
||||
|
||||
//! adds an list item with an icon
|
||||
/** \param text Text of list entry
|
||||
\param icon Sprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon
|
||||
\return The id of the new created item */
|
||||
//! \param text Text of list entry
|
||||
//! \param icon Sprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon
|
||||
//! \return
|
||||
//! returns the id of the new created item
|
||||
virtual u32 addItem(const wchar_t* text, s32 icon) = 0;
|
||||
|
||||
//! Removes an item from the list
|
||||
@ -59,11 +61,10 @@ namespace gui
|
||||
//! Returns the icon of an item
|
||||
virtual s32 getIcon(u32 index) const = 0;
|
||||
|
||||
//! Sets the sprite bank which should be used to draw list icons.
|
||||
/** This font is set to the sprite bank of the built-in-font by
|
||||
default. A sprite can be displayed in front of every list item.
|
||||
An icon is an index within the icon sprite bank. Several
|
||||
default icons are available in the skin through getIcon. */
|
||||
//! Sets the sprite bank which should be used to draw list icons. This font is set to the sprite bank of
|
||||
//! the built-in-font by default. A sprite can be displayed in front of every list item.
|
||||
//! An icon is an index within the icon sprite bank. Several default icons are available in the
|
||||
//! skin through getIcon
|
||||
virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
|
||||
|
||||
//! clears the list, deletes all items in the listbox
|
||||
@ -75,7 +76,8 @@ namespace gui
|
||||
//! sets the selected item. Set this to -1 if no item should be selected
|
||||
virtual void setSelected(s32 index) = 0;
|
||||
|
||||
//! set whether the listbox should scroll to new or newly selected items
|
||||
//! set whether the listbox should scroll to show a newly selected item
|
||||
//! or a new item as it is added to the list.
|
||||
virtual void setAutoScrollEnabled(bool scroll) = 0;
|
||||
|
||||
//! returns true if automatic scrolling is enabled, false if not.
|
||||
@ -106,7 +108,7 @@ namespace gui
|
||||
virtual void setItem(u32 index, const wchar_t* text, s32 icon) = 0;
|
||||
|
||||
//! Insert the item at the given index
|
||||
/** \return The index on success or -1 on failure. */
|
||||
//! Return the index on success or -1 on failure.
|
||||
virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon) = 0;
|
||||
|
||||
//! Swap the items at the given indices
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -30,17 +30,15 @@ namespace gui
|
||||
//! gets the small step value
|
||||
virtual s32 getSmallStep() const = 0;
|
||||
|
||||
//! Sets the small step
|
||||
/** That is the amount that the value changes by when clicking
|
||||
on the buttons or using the cursor keys. */
|
||||
//! Sets the small step, the amount that the value changes by when clicking
|
||||
//! on the buttons or using the cursor keys.
|
||||
virtual void setSmallStep(s32 step) = 0;
|
||||
|
||||
//! gets the large step value
|
||||
virtual s32 getLargeStep() const = 0;
|
||||
|
||||
//! Sets the large step
|
||||
/** That is the amount that the value changes by when clicking
|
||||
in the tray, or using the page up and page down keys. */
|
||||
//! Sets the large step, the amount that the value changes by when clicking
|
||||
//! in the tray, or using the page up and page down keys.
|
||||
virtual void setLargeStep(s32 step) = 0;
|
||||
|
||||
//! gets the current position of the scrollbar
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -460,8 +460,7 @@ namespace gui
|
||||
implementations to find out how to draw the part exactly.
|
||||
\param active: Specifies if the tab is currently active.
|
||||
\param rect: Defining area where to draw.
|
||||
\param clip: Clip area.
|
||||
\param alignment Alignment of GUI element. */
|
||||
\param clip: Clip area. */
|
||||
virtual void draw3DTabButton(IGUIElement* element, bool active,
|
||||
const core::rect<s32>& rect, const core::rect<s32>* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT) = 0;
|
||||
|
||||
@ -472,9 +471,7 @@ namespace gui
|
||||
\param border: Specifies if the border should be drawn.
|
||||
\param background: Specifies if the background should be drawn.
|
||||
\param rect: Defining area where to draw.
|
||||
\param clip: Clip area.
|
||||
\param tabHeight Height of tab.
|
||||
\param alignment Alignment of GUI element. */
|
||||
\param clip: Clip area. */
|
||||
virtual void draw3DTabBody(IGUIElement* element, bool border, bool background,
|
||||
const core::rect<s32>& rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT ) = 0;
|
||||
|
||||
@ -514,3 +511,6 @@ namespace gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2006-2009 Michael Zeilfelder
|
||||
// Copyright (C) 2006-2008 Michael Zeilfelder
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -29,7 +29,7 @@ namespace gui
|
||||
virtual void setOverrideFont(IGUIFont* font=0) = 0;
|
||||
|
||||
//! Gets the override font (if any)
|
||||
/** \return The override font (may be 0) */
|
||||
//! \return The override font (may be 0)
|
||||
virtual IGUIFont* getOverrideFont(void) const = 0;
|
||||
|
||||
//! Sets another color for the text.
|
||||
@ -43,7 +43,7 @@ namespace gui
|
||||
virtual void setOverrideColor(video::SColor color) = 0;
|
||||
|
||||
//! Gets the override color
|
||||
/** \return: The override color */
|
||||
//! \return: The override color
|
||||
virtual video::SColor const& getOverrideColor(void) const = 0;
|
||||
|
||||
//! Sets if the static text should use the overide color or the color in the gui skin.
|
||||
@ -53,7 +53,7 @@ namespace gui
|
||||
virtual void enableOverrideColor(bool enable) = 0;
|
||||
|
||||
//! Checks if an override color is enabled
|
||||
/** \return true if the override color is enabled, false otherwise */
|
||||
//! \return true if the override color is enabled, false otherwise
|
||||
virtual bool isOverrideColorEnabled(void) const = 0;
|
||||
|
||||
//! Sets another color for the background.
|
||||
@ -78,7 +78,7 @@ namespace gui
|
||||
virtual void setWordWrap(bool enable) = 0;
|
||||
|
||||
//! Checks if word wrap is enabled
|
||||
/** \return true if word wrap is enabled, false otherwise */
|
||||
//! \return true if word wrap is enabled, false otherwise
|
||||
virtual bool isWordWrapEnabled(void) const = 0;
|
||||
|
||||
//! Returns the height of the text in pixels when it is drawn.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -87,7 +87,7 @@ namespace gui
|
||||
virtual s32 getTabHeight() const = 0;
|
||||
|
||||
//! Set the alignment of the tabs
|
||||
/** Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT */
|
||||
//! Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT
|
||||
virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0;
|
||||
|
||||
//! Get the alignment of the tabs
|
||||
@ -108,3 +108,7 @@ namespace gui
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
192
src/dep/include/irrlicht/IGUITable.h
Normal file
192
src/dep/include/irrlicht/IGUITable.h
Normal file
@ -0,0 +1,192 @@
|
||||
// Copyright (C) 2003-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_TABLE_H_INCLUDED__
|
||||
#define __I_GUI_TABLE_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
#include "irrTypes.h"
|
||||
#include "SColor.h"
|
||||
#include "IGUISkin.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
|
||||
//! modes for ordering used when a column header is clicked
|
||||
enum EGUI_COLUMN_ORDERING
|
||||
{
|
||||
//! Do not use ordering
|
||||
EGCO_NONE,
|
||||
|
||||
//! Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked.
|
||||
EGCO_CUSTOM,
|
||||
|
||||
//! Sort it ascending by it's ascii value like: a,b,c,...
|
||||
EGCO_ASCENDING,
|
||||
|
||||
//! Sort it descending by it's ascii value like: z,x,y,...
|
||||
EGCO_DESCENDING,
|
||||
|
||||
//! Sort it ascending on first click, descending on next, etc
|
||||
EGCO_FLIP_ASCENDING_DESCENDING,
|
||||
|
||||
//! Not used as mode, only to get maximum value for this enum
|
||||
EGCO_COUNT
|
||||
};
|
||||
|
||||
//! Names for EGUI_COLUMN_ORDERING types
|
||||
const c8* const GUIColumnOrderingNames[] =
|
||||
{
|
||||
"none",
|
||||
"custom",
|
||||
"ascend",
|
||||
"descend",
|
||||
"ascend_descend",
|
||||
0,
|
||||
};
|
||||
|
||||
enum EGUI_ORDERING_MODE
|
||||
{
|
||||
//! No element ordering
|
||||
EGOM_NONE,
|
||||
|
||||
//! Elements are ordered from the smallest to the largest.
|
||||
EGOM_ASCENDING,
|
||||
|
||||
//! Elements are ordered from the largest to the smallest.
|
||||
EGOM_DESCENDING,
|
||||
|
||||
//! this value is not used, it only specifies the amount of default ordering types
|
||||
//! available.
|
||||
EGOM_COUNT
|
||||
};
|
||||
|
||||
const c8* const GUIOrderingModeNames[] =
|
||||
{
|
||||
"ascending",
|
||||
"descending",
|
||||
0
|
||||
};
|
||||
|
||||
enum EGUI_TABLE_DRAW_FLAGS
|
||||
{
|
||||
EGTDF_ROWS = 1,
|
||||
EGTDF_COLUMNS = 2,
|
||||
EGTDF_ACTIVE_ROW = 4,
|
||||
EGTDF_COUNT
|
||||
};
|
||||
|
||||
class IGUIFont;
|
||||
|
||||
//! Default list box GUI element.
|
||||
class IGUITable : public IGUIElement
|
||||
{
|
||||
public:
|
||||
//! constructor
|
||||
IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Adds a column
|
||||
//! If columnIndex is outside the current range, do push new colum at the end
|
||||
virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
|
||||
|
||||
//! remove a column from the table
|
||||
virtual void removeColumn(u32 columnIndex) = 0;
|
||||
|
||||
//! Returns the number of columns in the table control
|
||||
virtual s32 getColumnCount() const = 0;
|
||||
|
||||
//! Makes a column active. This will trigger an ordering process.
|
||||
/** \param idx: The id of the column to make active.
|
||||
//! \param doOrder: Do also the ordering which depending on mode for active column
|
||||
\return Returns true if successful. */
|
||||
virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
|
||||
|
||||
//! Returns which header is currently active
|
||||
virtual s32 getActiveColumn() const = 0;
|
||||
|
||||
//! Returns the ordering used by the currently active column
|
||||
virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
|
||||
|
||||
//! Set the width of a column
|
||||
virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
|
||||
|
||||
//! columns can be resized by drag 'n drop
|
||||
virtual void setResizableColumns(bool resizable) = 0;
|
||||
|
||||
//! can columns be resized by dran 'n drop?
|
||||
virtual bool hasResizableColumns() const = 0;
|
||||
|
||||
//! This tells the table control which ordering mode should be used when
|
||||
//! a column header is clicked.
|
||||
/** \param columnIndex: The index of the column header.
|
||||
\param state: If true, a EGET_TABLE_HEADER_CHANGED message will be sent and you can order the table data as you whish.*/
|
||||
//! \param mode: One of the modes defined in EGUI_COLUMN_ORDERING
|
||||
virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
|
||||
|
||||
//! Returns which row is currently selected
|
||||
virtual s32 getSelected() const = 0;
|
||||
|
||||
//! Returns amount of rows in the tabcontrol
|
||||
virtual s32 getRowCount() const = 0;
|
||||
|
||||
//! adds a row to the table
|
||||
/** \param rowIndex: zero based index of rows. The row will be inserted at this
|
||||
position, if a row already exist there, it will be placed after it. If the row
|
||||
is larger than the actual number of row by more than one, it won't be created.
|
||||
Note that if you create a row that's not at the end, there might be performance issues*/
|
||||
virtual void addRow(u32 rowIndex) = 0;
|
||||
|
||||
//! Remove a row from the table
|
||||
virtual void removeRow(u32 rowIndex) = 0;
|
||||
|
||||
//! clears the table rows, but keeps the columns intact
|
||||
virtual void clearRows() = 0;
|
||||
|
||||
//! Swap two row positions. This is useful for a custom ordering algo.
|
||||
virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
|
||||
|
||||
//! This tells the table to start ordering all the rows. You need to explicitly
|
||||
//! tell the table to re order the rows when a new row is added or the cells data is
|
||||
//! changed. This makes the system more flexible and doesn't make you pay the cost of
|
||||
//! ordering when adding a lot of rows.
|
||||
//! \param columnIndex: When set to -1 the active column is used.
|
||||
virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
|
||||
|
||||
//! Set the text of a cell
|
||||
virtual void setCellText(u32 rowIndex, u32 columnIndex, const wchar_t* text) = 0;
|
||||
|
||||
//! Set the text of a cell, and set a color of this cell.
|
||||
virtual void setCellText(u32 rowIndex, u32 columnIndex, const wchar_t* text, video::SColor color) = 0;
|
||||
|
||||
//! Set the data of a cell
|
||||
virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
|
||||
|
||||
//! Set the color of a cell text
|
||||
virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
|
||||
|
||||
//! Get the text of a cell
|
||||
virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
|
||||
|
||||
//! Get the data of a cell
|
||||
virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
|
||||
|
||||
//! clears the table, deletes all items in the table
|
||||
virtual void clear() = 0;
|
||||
|
||||
//! Set flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout
|
||||
virtual void setDrawFlags(s32 flags) = 0;
|
||||
|
||||
//! Get the flags, as defined in EGUI_TABLE_DRAW_FLAGS, which influence the layout
|
||||
virtual s32 getDrawFlags() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
65
src/dep/include/irrlicht/IIndexBuffer.h
Normal file
65
src/dep/include/irrlicht/IIndexBuffer.h
Normal file
@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_INDEX_BUFFER_H_INCLUDED__
|
||||
#define __I_INDEX_BUFFER_H_INCLUDED__
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "irrArray.h"
|
||||
|
||||
#include "SVertexIndex.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
namespace video
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
namespace scene
|
||||
{
|
||||
|
||||
class IIndexBuffer : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void* getData() =0;
|
||||
|
||||
virtual video::E_INDEX_TYPE getType() const =0;
|
||||
virtual void setType(video::E_INDEX_TYPE IndexType) =0;
|
||||
|
||||
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;
|
||||
|
||||
//! get the current hardware mapping hint
|
||||
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0;
|
||||
|
||||
//! set the hardware mapping hint, for driver
|
||||
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0;
|
||||
|
||||
//! flags the meshbuffer as changed, reloads hardware buffers
|
||||
virtual void setDirty() = 0;
|
||||
|
||||
//! Get the currently used ID for identification of changes.
|
||||
/** This shouldn't be used for anything outside the VideoDriver. */
|
||||
virtual u32 getChangedID() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -15,37 +15,36 @@ namespace scene
|
||||
{
|
||||
class IMeshBuffer;
|
||||
|
||||
//! Class which holds the geometry of an object.
|
||||
//! Class for accessing a mesh with multiple mesh buffers.
|
||||
/** An IMesh is nothing more than a collection of some mesh buffers
|
||||
(IMeshBuffer). SMesh is a simple implementation of an IMesh.
|
||||
A mesh is usually added to an IMeshSceneNode in order to be rendered.
|
||||
*/
|
||||
class IMesh : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
|
||||
//! Get the amount of mesh buffers.
|
||||
/** \return Amount of mesh buffers (IMeshBuffer) in this mesh. */
|
||||
//! Returns the amount of mesh buffers.
|
||||
/** \return Returns the amount of mesh buffers (IMeshBuffer) in this mesh. */
|
||||
virtual u32 getMeshBufferCount() const = 0;
|
||||
|
||||
//! Get pointer to a mesh buffer.
|
||||
//! Returns pointer to a mesh buffer.
|
||||
/** \param nr: Zero based index of the mesh buffer. The maximum value is
|
||||
getMeshBufferCount() - 1;
|
||||
\return Pointer to the mesh buffer or 0 if there is no such
|
||||
mesh buffer. */
|
||||
\return Returns the pointer to the mesh buffer or
|
||||
NULL if there is no such mesh buffer. */
|
||||
virtual IMeshBuffer* getMeshBuffer(u32 nr) const = 0;
|
||||
|
||||
//! Get pointer to a mesh buffer which fits a material
|
||||
//! Returns pointer to a mesh buffer which fits a material
|
||||
/** \param material: material to search for
|
||||
\return Pointer to the mesh buffer or 0 if there is no such
|
||||
mesh buffer. */
|
||||
\return Returns the pointer to the mesh buffer or
|
||||
NULL if there is no such mesh buffer. */
|
||||
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0;
|
||||
|
||||
//! Get an axis aligned bounding box of the mesh.
|
||||
/** \return Bounding box of this mesh. */
|
||||
//! Returns an axis aligned bounding box of the mesh.
|
||||
/** \return A bounding box of this mesh is returned. */
|
||||
virtual const core::aabbox3d<f32>& getBoundingBox() const = 0;
|
||||
|
||||
//! Set user-defined axis aligned bounding box
|
||||
//! set user axis aligned bounding box
|
||||
/** \param box New bounding box to use for the mesh. */
|
||||
virtual void setBoundingBox( const core::aabbox3df& box) = 0;
|
||||
|
||||
@ -54,17 +53,10 @@ namespace scene
|
||||
\param newvalue: New value to set in all materials. */
|
||||
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) = 0;
|
||||
|
||||
//! Set the hardware mapping hint
|
||||
/** This methods allows to define optimization hints for the
|
||||
hardware. This enables, e.g., the use of hardware buffers on
|
||||
pltforms that support this feature. This can lead to noticeable
|
||||
performance gains. */
|
||||
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
|
||||
//! set the hardware mapping hint, for driver
|
||||
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) = 0;
|
||||
|
||||
//! Flag the meshbuffer as changed, reloads hardware buffers
|
||||
/** This method has to be called every time the vertices or
|
||||
indices have changed. Otherwise, changes won't be updated
|
||||
on the GPU in the next render cycle. */
|
||||
//! flags the meshbuffer as changed, reloads hardware buffers
|
||||
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -56,23 +56,13 @@ namespace scene
|
||||
EPT_POINT_SPRITES
|
||||
};
|
||||
|
||||
//! Struct for holding a mesh with a single material.
|
||||
/** A part of an IMesh which has the same material on each face of that
|
||||
group. Logical groups of an IMesh need not be put into separate mesh
|
||||
buffers, but can be. Separately animated parts of the mesh must be put
|
||||
into separate mesh buffers.
|
||||
Some mesh buffer implementations have limitations on the number of
|
||||
vertices the buffer can hold. In that case, logical grouping can help.
|
||||
Moreover, the number of vertices should be optimized for the GPU upload,
|
||||
which often depends on the type of gfx card. Typial figures are
|
||||
1000-10000 vertices per buffer.
|
||||
SMeshBuffer is a simple implementation of a MeshBuffer, which supports
|
||||
up to 65535 vertices.
|
||||
//! Struct for holding a mesh with a single material
|
||||
/** SMeshBuffer is a simple implementation of a MeshBuffer.
|
||||
|
||||
Since meshbuffers are used for drawing, and hence will be exposed
|
||||
to the driver, chances are high that they are grab()'ed from somewhere.
|
||||
It's therefore required to dynamically allocate meshbuffers which are
|
||||
passed to a video driver and only drop the buffer once it's not used in
|
||||
passed to a video driver and only drop hte buffer once it's not used in
|
||||
the current code block anymore.
|
||||
*/
|
||||
class IMeshBuffer : public virtual IReferenceCounted
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -79,10 +79,10 @@ namespace scene
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param factor Vector which defines the scale for each axis.
|
||||
\param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */
|
||||
virtual void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const =0;
|
||||
virtual void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 layer=1) const =0;
|
||||
|
||||
//! Scale the texture coords of a meshbuffer.
|
||||
/** \param buffer Meshbuffer on which the operation is performed.
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param factor Vector which defines the scale for each axis.
|
||||
\param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */
|
||||
virtual void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const =0;
|
||||
@ -106,8 +106,8 @@ namespace scene
|
||||
//! Clones a static IMesh into a modifiable SMesh.
|
||||
/** All meshbuffers in the returned SMesh
|
||||
are of type SMeshBuffer or SMeshBufferLightMap.
|
||||
\param mesh Mesh to copy.
|
||||
\return Cloned mesh. If you no longer need the
|
||||
\param mesh: Mesh to copy.
|
||||
\return Returns the cloned mesh. If you no longer need the
|
||||
cloned mesh, you should call SMesh::drop(). See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual SMesh* createMeshCopy(IMesh* mesh) const = 0;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2006-2009 Nikolaus Gebhardt / Thomas Alten
|
||||
// Copyright (C) 2006-2008 Nikolaus Gebhardt / Thomas Alten
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -144,7 +144,7 @@ namespace scene
|
||||
//! Destructor
|
||||
virtual ~ISceneManager() {}
|
||||
|
||||
//! Get pointer to an animateable mesh. Loads the file if not loaded already.
|
||||
//! Returns pointer to an animateable mesh. Loads the file if not loaded already.
|
||||
/**
|
||||
* If you want to remove a loaded mesh from the cache again, use removeMesh().
|
||||
* Currently there are the following mesh formats supported:
|
||||
@ -329,12 +329,13 @@ namespace scene
|
||||
* If you would like to implement and add your own file format loader to Irrlicht,
|
||||
* see addExternalMeshLoader().
|
||||
* \param filename: Filename of the mesh to load.
|
||||
* \return Null if failed, otherwise pointer to the mesh.
|
||||
* \return Returns NULL if failed and the pointer to the mesh if
|
||||
* successful.
|
||||
* This pointer should not be dropped. See IReferenceCounted::drop() for more information.
|
||||
**/
|
||||
virtual IAnimatedMesh* getMesh(const c8* filename) = 0;
|
||||
|
||||
//! Get pointer to an animateable mesh. Loads the file if not loaded already.
|
||||
//! Returns pointer to an animateable mesh. Loads the file if not loaded already.
|
||||
/** Works just as getMesh(const char* filename). If you want to
|
||||
remove a loaded mesh from the cache again, use removeMesh().
|
||||
\param file File handle of the mesh to load.
|
||||
@ -343,23 +344,24 @@ namespace scene
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IAnimatedMesh* getMesh(io::IReadFile* file) = 0;
|
||||
|
||||
//! Get interface to the mesh cache which is shared beween all existing scene managers.
|
||||
//! Returns an interface to the mesh cache which is shared beween all existing scene managers.
|
||||
/** With this interface, it is possible to manually add new loaded
|
||||
meshes (if ISceneManager::getMesh() is not sufficient), to remove them and to iterate
|
||||
through already loaded meshes. */
|
||||
virtual IMeshCache* getMeshCache() = 0;
|
||||
|
||||
//! Get the video driver.
|
||||
/** \return Pointer to the video Driver.
|
||||
//! Returns the video driver.
|
||||
/** \return Returns pointer to the video Driver.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual video::IVideoDriver* getVideoDriver() = 0;
|
||||
|
||||
//! Get the active GUIEnvironment
|
||||
/** \return Pointer to the GUIEnvironment
|
||||
//! Returns the active GUIEnvironment
|
||||
/** \return Returns pointer to the GUIEnvironment
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual gui::IGUIEnvironment* getGUIEnvironment() = 0;
|
||||
|
||||
//! adds Volume Lighting Scene Node.
|
||||
//! the returned pointer must not be dropped.
|
||||
/** Example Usage:
|
||||
scene::IVolumeLightSceneNode * n = smgr->addVolumeLightSceneNode(NULL, -1,
|
||||
32, 32, //Subdivide U/V
|
||||
@ -371,8 +373,7 @@ namespace scene
|
||||
n->setScale(core::vector3df(46.0f, 45.0f, 46.0f));
|
||||
n->getMaterial(0).setTexture(0, smgr->getVideoDriver()->getTexture("lightFalloff.png"));
|
||||
}
|
||||
\return Pointer to the volumeLight if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
**/
|
||||
virtual IVolumeLightSceneNode* addVolumeLightSceneNode(ISceneNode* parent=0, s32 id=-1,
|
||||
const u32 subdivU = 32, const u32 subdivV = 32,
|
||||
const video::SColor foot = video::SColor(51, 0, 230, 180),
|
||||
@ -391,7 +392,7 @@ namespace scene
|
||||
scene node will be placed.
|
||||
\param rotation: Initital rotation of the scene node.
|
||||
\param scale: Initial scale of the scene node.
|
||||
\return Pointer to the created test scene node. This
|
||||
\return Returns pointer to the created test scene node. This
|
||||
pointer should not be dropped. See IReferenceCounted::drop()
|
||||
for more information. */
|
||||
virtual IMeshSceneNode* addCubeSceneNode(f32 size=10.0f, ISceneNode* parent=0, s32 id=-1,
|
||||
@ -409,7 +410,7 @@ namespace scene
|
||||
scene node will be placed.
|
||||
\param rotation: Initital rotation of the scene node.
|
||||
\param scale: Initial scale of the scene node.
|
||||
\return Pointer to the created test scene node. This
|
||||
\return Returns pointer to the created test scene node. This
|
||||
pointer should not be dropped. See IReferenceCounted::drop()
|
||||
for more information. */
|
||||
virtual IMeshSceneNode* addSphereSceneNode(f32 radius=5.0f, s32 polyCount=16,
|
||||
@ -427,7 +428,7 @@ namespace scene
|
||||
\param rotation: Initital rotation of the scene node.
|
||||
\param scale: Initial scale of the scene node.
|
||||
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
|
||||
\return Pointer to the created scene node.
|
||||
\return Returns pointer to the created scene node.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual IAnimatedMeshSceneNode* addAnimatedMeshSceneNode(IAnimatedMesh* mesh,
|
||||
ISceneNode* parent=0, s32 id=-1,
|
||||
@ -445,7 +446,7 @@ namespace scene
|
||||
\param rotation: Initital rotation of the scene node.
|
||||
\param scale: Initial scale of the scene node.
|
||||
\param alsoAddIfMeshPointerZero: Add the scene node even if a 0 pointer is passed.
|
||||
\return Pointer to the created scene node.
|
||||
\return Returns pointer to the created scene node.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual IMeshSceneNode* addMeshSceneNode(IMesh* mesh, ISceneNode* parent=0, s32 id=-1,
|
||||
const core::vector3df& position = core::vector3df(0,0,0),
|
||||
@ -512,16 +513,12 @@ namespace scene
|
||||
/** This camera does not react on user input like for example the one created with
|
||||
addCameraSceneNodeFPS(). If you want to move or animate it, use animators or the
|
||||
ISceneNode::setPosition(), ICameraSceneNode::setTarget() etc methods.
|
||||
By default, a camera's look at position (set with setTarget()) and its scene node
|
||||
rotation (set with setRotation()) are independent. If you want to be able to
|
||||
control the direction that the camera looks by using setRotation() then call
|
||||
ICameraSceneNode::bindTargetAndRotation(true) on it.
|
||||
\param position: Position of the space relative to its parent where the camera will be placed.
|
||||
\param lookat: Position where the camera will look at. Also known as target.
|
||||
\param parent: Parent scene node of the camera. Can be null. If the parent moves,
|
||||
the camera will move too.
|
||||
\param id: id of the camera. This id can be used to identify the camera.
|
||||
\return Pointer to interface to camera if successful, otherwise 0.
|
||||
\return Returns pointer to interface to camera if successful, otherwise 0.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ICameraSceneNode* addCameraSceneNode(ISceneNode* parent = 0,
|
||||
const core::vector3df& position = core::vector3df(0,0,0),
|
||||
@ -613,7 +610,7 @@ namespace scene
|
||||
the ILightSceneNode::getLightData() method.
|
||||
\param radius: Radius of the light.
|
||||
\param id: id of the node. This id can be used to identify the node.
|
||||
\return Pointer to the interface of the light if successful, otherwise NULL.
|
||||
\return Returns pointer to the interface of the light if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ILightSceneNode* addLightSceneNode(ISceneNode* parent = 0,
|
||||
const core::vector3df& position = core::vector3df(0,0,0),
|
||||
@ -633,7 +630,7 @@ namespace scene
|
||||
\param id: An id of the node. This id can be used to identify the node.
|
||||
\param colorTop: The color of the vertices at the top of the billboard (default: white).
|
||||
\param colorBottom: The color of the vertices at the bottom of the billboard (default: white).
|
||||
\return Pointer to the billboard if successful, otherwise NULL.
|
||||
\return Returns pointer to the billboard if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual IBillboardSceneNode* addBillboardSceneNode(ISceneNode* parent = 0,
|
||||
const core::dimension2d<f32>& size = core::dimension2d<f32>(10.0f, 10.0f),
|
||||
@ -653,7 +650,7 @@ namespace scene
|
||||
so this should be null. Note: If a parent is set to the skybox, the box will not
|
||||
change how it is drawn.
|
||||
\param id: An id of the node. This id can be used to identify the node.
|
||||
\return Pointer to the sky box if successful, otherwise NULL.
|
||||
\return Returns a pointer to the sky box if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addSkyBoxSceneNode(video::ITexture* top, video::ITexture* bottom,
|
||||
video::ITexture* left, video::ITexture* right, video::ITexture* front,
|
||||
@ -674,7 +671,7 @@ namespace scene
|
||||
so this should be null. Note: If a parent is set, the dome will not
|
||||
change how it is drawn.
|
||||
\param id: An id of the node. This id can be used to identify the node.
|
||||
\return Pointer to the sky dome if successful, otherwise NULL.
|
||||
\return Returns a pointer to the sky dome if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addSkyDomeSceneNode(video::ITexture* texture,
|
||||
u32 horiRes=16, u32 vertRes=8,
|
||||
@ -692,7 +689,7 @@ namespace scene
|
||||
scene node will be placed.
|
||||
\param rotation: Initital rotation of the scene node.
|
||||
\param scale: Initial scale of the scene node.
|
||||
\return Pointer to the created scene node.
|
||||
\return Returns pointer to the created scene node.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual IParticleSystemSceneNode* addParticleSystemSceneNode(
|
||||
bool withDefaultEmitter=true, ISceneNode* parent=0, s32 id=-1,
|
||||
@ -751,7 +748,7 @@ namespace scene
|
||||
know what you are doing, this might lead to strange behaviour.
|
||||
\param smoothFactor: The number of times the vertices are smoothed.
|
||||
\param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap.
|
||||
\return Pointer to the created scene node. Can be null
|
||||
\return Returns pointer to the created scene node. Can be null
|
||||
if the terrain could not be created, for example because the
|
||||
heightmap could not be loaded. The returned pointer should
|
||||
not be dropped. See IReferenceCounted::drop() for more
|
||||
@ -789,7 +786,7 @@ namespace scene
|
||||
know what you are doing, this might lead to strange behaviour.
|
||||
\param smoothFactor: The number of times the vertices are smoothed.
|
||||
\param addAlsoIfHeightmapEmpty: Add terrain node even with empty heightmap.
|
||||
\return Pointer to the created scene node. Can be null
|
||||
\return Returns pointer to the created scene node. Can be null
|
||||
if the terrain could not be created, for example because the
|
||||
heightmap could not be loaded. The returned pointer should
|
||||
not be dropped. See IReferenceCounted::drop() for more
|
||||
@ -806,7 +803,7 @@ namespace scene
|
||||
|
||||
//! Adds a quake3 scene node to the scene graph.
|
||||
/** A Quake3 Scene renders multiple meshes for a specific HighLanguage Shader (Quake3 Style )
|
||||
\return Pointer to the quake3 scene node if successful, otherwise NULL.
|
||||
\return Returns a pointer to the quake3 scene node if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addQuake3SceneNode(IMeshBuffer* meshBuffer, const quake3::SShader * shader,
|
||||
ISceneNode* parent=0, s32 id=-1
|
||||
@ -816,7 +813,7 @@ namespace scene
|
||||
//! Adds an empty scene node to the scene graph.
|
||||
/** Can be used for doing advanced transformations
|
||||
or structuring the scene graph.
|
||||
\return Pointer to the created scene node.
|
||||
\return Returns pointer to the created scene node.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addEmptySceneNode(ISceneNode* parent=0, s32 id=-1) = 0;
|
||||
|
||||
@ -825,7 +822,7 @@ namespace scene
|
||||
set/getRotation and set/getScale. Its just a simple scene node that takes a
|
||||
matrix as relative transformation, making it possible to insert any transformation
|
||||
anywhere into the scene graph.
|
||||
\return Pointer to the created scene node.
|
||||
\return Returns pointer to the created scene node.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual IDummyTransformationSceneNode* addDummyTransformationSceneNode(
|
||||
ISceneNode* parent=0, s32 id=-1) = 0;
|
||||
@ -843,10 +840,9 @@ namespace scene
|
||||
\param parent The billboard's parent. Pass 0 to use the root scene node.
|
||||
\param size The billboard's width and height.
|
||||
\param position The billboards position relative to its parent.
|
||||
\param id: An id of the node. This id can be used to identify the node.
|
||||
\param colorTop: The color of the vertices at the top of the billboard (default: white).
|
||||
\param colorBottom: The color of the vertices at the bottom of the billboard (default: white).
|
||||
\return Pointer to the billboard if successful, otherwise NULL.
|
||||
\return Returns pointer to the billboard if successful, otherwise NULL.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual IBillboardTextSceneNode* addBillboardTextSceneNode( gui::IGUIFont* font, const wchar_t* text,
|
||||
ISceneNode* parent = 0,
|
||||
@ -877,7 +873,7 @@ namespace scene
|
||||
will be countHills.X * countHills.Y hills.
|
||||
\param textureRepeatCount: Defines how often the texture will be repeated in
|
||||
x and y direction.
|
||||
\return Null if the creation failed. The reason could be that you
|
||||
\return Returns null if the creation failed. The reason could be that you
|
||||
specified some invalid parameters or that a mesh with that name already
|
||||
exists. If successful, a pointer to the mesh is returned.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
@ -906,7 +902,7 @@ namespace scene
|
||||
\param stretchSize: Parameter defining how big a is pixel on the heightmap.
|
||||
\param maxHeight: Defines how high a white pixel on the heighmap is.
|
||||
\param defaultVertexBlockSize: Defines the initial dimension between vertices.
|
||||
\return Null if the creation failed. The reason could be that you
|
||||
\return Returns null if the creation failed. The reason could be that you
|
||||
specified some invalid parameters, that a mesh with that name already
|
||||
exists, or that a texture could not be found. If successful, a pointer to the mesh is returned.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
@ -925,9 +921,7 @@ namespace scene
|
||||
\param height Total height of the arrow
|
||||
\param cylinderHeight Total height of the cylinder, should be lesser than total height
|
||||
\param width0 Diameter of the cylinder
|
||||
\param width1 Diameter of the cone's base, should be not smaller than the cylinder's diameter
|
||||
\return Pointer to the arrow mesh if successful, otherwise 0.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
\param width1 Diameter of the cone's base, should be not smaller than the cylinder's diameter */
|
||||
virtual IAnimatedMesh* addArrowMesh(const c8* name,
|
||||
video::SColor vtxColor0=0xFFFFFFFF,
|
||||
video::SColor vtxColor1=0xFFFFFFFF,
|
||||
@ -939,50 +933,44 @@ namespace scene
|
||||
/** \param name Name of the mesh
|
||||
\param radius Radius of the sphere
|
||||
\param polyCountX Number of quads used for the horizontal tiling
|
||||
\param polyCountY Number of quads used for the vertical tiling
|
||||
\return Pointer to the sphere mesh if successful, otherwise 0.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
\param polyCountY Number of quads used for the vertical tiling */
|
||||
virtual IAnimatedMesh* addSphereMesh(const c8* name,
|
||||
f32 radius=5.f, u32 polyCountX = 16,
|
||||
u32 polyCountY = 16) = 0;
|
||||
|
||||
//! Gets the root scene node.
|
||||
//! Returns the root scene node.
|
||||
/** This is the scene node which is parent
|
||||
of all scene nodes. The root scene node is a special scene node which
|
||||
only exists to manage all scene nodes. It will not be rendered and cannot
|
||||
be removed from the scene.
|
||||
\return Pointer to the root scene node.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
of all scene nodes. The root scene node is a special scene node which
|
||||
only exists to manage all scene nodes. It will not be rendered and cannot
|
||||
be removed from the scene.
|
||||
\return Returns a pointer to the root scene node. */
|
||||
virtual ISceneNode* getRootSceneNode() = 0;
|
||||
|
||||
//! Get the first scene node with the specified id.
|
||||
//! Returns the first scene node with the specified id.
|
||||
/** \param id: The id to search for
|
||||
\param start: Scene node to start from. All children of this scene
|
||||
node are searched. If null is specified, the root scene node is
|
||||
taken.
|
||||
\return Pointer to the first scene node with this id,
|
||||
and null if no scene node could be found.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
\param start: Scene node to start from. All children of this scene
|
||||
node are searched. If null is specified, the root scene node is
|
||||
taken.
|
||||
\return Returns pointer to the first scene node with this id,
|
||||
and null if no scene node could be found. */
|
||||
virtual ISceneNode* getSceneNodeFromId(s32 id, ISceneNode* start=0) = 0;
|
||||
|
||||
//! Get the first scene node with the specified name.
|
||||
//! Returns the first scene node with the specified name.
|
||||
/** \param name: The name to search for
|
||||
\param start: Scene node to start from. All children of this scene
|
||||
node are searched. If null is specified, the root scene node is
|
||||
taken.
|
||||
\return Pointer to the first scene node with this id,
|
||||
and null if no scene node could be found.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
\param start: Scene node to start from. All children of this scene
|
||||
node are searched. If null is specified, the root scene node is
|
||||
taken.
|
||||
\return Returns pointer to the first scene node with this id,
|
||||
and null if no scene node could be found. */
|
||||
virtual ISceneNode* getSceneNodeFromName(const c8* name, ISceneNode* start=0) = 0;
|
||||
|
||||
//! Get the first scene node with the specified type.
|
||||
//! Returns the first scene node with the specified type.
|
||||
/** \param type: The type to search for
|
||||
\param start: Scene node to start from. All children of this scene
|
||||
node are searched. If null is specified, the root scene node is
|
||||
taken.
|
||||
\return Pointer to the first scene node with this type,
|
||||
and null if no scene node could be found.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
\param start: Scene node to start from. All children of this scene
|
||||
node are searched. If null is specified, the root scene node is
|
||||
taken.
|
||||
\return Returns pointer to the first scene node with this type,
|
||||
and null if no scene node could be found. */
|
||||
virtual ISceneNode* getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode* start=0) = 0;
|
||||
|
||||
//! Get scene nodes by type.
|
||||
@ -996,20 +984,19 @@ namespace scene
|
||||
ISceneNode* start=0) = 0;
|
||||
|
||||
//! Get the current active camera.
|
||||
/** \return The active camera is returned. Note that this can
|
||||
be NULL, if there was no camera created yet.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
/** \return The active camera is returned. Note that this can be NULL, if there
|
||||
was no camera created yet. */
|
||||
virtual ICameraSceneNode* getActiveCamera() = 0;
|
||||
|
||||
//! Sets the currently active camera.
|
||||
/** The previous active camera will be deactivated.
|
||||
\param camera: The new camera which should be active. */
|
||||
\param camera: The new camera which should be active. */
|
||||
virtual void setActiveCamera(ICameraSceneNode* camera) = 0;
|
||||
|
||||
//! Sets the color of stencil buffers shadows drawn by the scene manager.
|
||||
virtual void setShadowColor(video::SColor color = video::SColor(150,0,0,0)) = 0;
|
||||
|
||||
//! Get the current color of shadows.
|
||||
//! Returns the current color of shadows.
|
||||
virtual video::SColor getShadowColor() const = 0;
|
||||
|
||||
//! Registers a node for rendering it at a specific time.
|
||||
@ -1042,7 +1029,7 @@ namespace scene
|
||||
//! Creates a fly circle animator, which lets the attached scene node fly around a center.
|
||||
/** \param center: Center of the circle.
|
||||
\param radius: Radius of the circle.
|
||||
\param speed: The orbital speed, in radians per millisecond.
|
||||
\param speed: Specifies the speed of the flight.
|
||||
\param direction: Specifies the upvector used for alignment of the mesh.
|
||||
\return The animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
and the animator will animate it.
|
||||
@ -1060,7 +1047,7 @@ namespace scene
|
||||
move from the start point to the end point.
|
||||
\param loop: If set to false, the node stops when the end point is reached.
|
||||
If loop is true, the node begins again at the start.
|
||||
\return The animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
\return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
and the animator will animate it.
|
||||
If you no longer need the animator, you should call ISceneNodeAnimator::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
@ -1073,7 +1060,7 @@ namespace scene
|
||||
should be visible.
|
||||
\param loop: If set to to false, the last texture remains set, and the animation
|
||||
stops. If set to true, the animation restarts with the first texture.
|
||||
\return The animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
\return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
and the animator will animate it.
|
||||
If you no longer need the animator, you should call ISceneNodeAnimator::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
@ -1082,7 +1069,7 @@ namespace scene
|
||||
|
||||
//! Creates a scene node animator, which deletes the scene node after some time automatically.
|
||||
/** \param timeMs: Time in milliseconds, after when the node will be deleted.
|
||||
\return The animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
\return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
and the animator will animate it.
|
||||
If you no longer need the animator, you should call ISceneNodeAnimator::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
@ -1113,7 +1100,7 @@ namespace scene
|
||||
it completely. If this is not what you want, you may specify a translation
|
||||
for the ellipsoid.
|
||||
\param slidingValue: DOCUMENTATION NEEDED.
|
||||
\return The animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
\return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator()
|
||||
and the animator will cause it to do collision detection and response.
|
||||
If you no longer need the animator, you should call ISceneNodeAnimator::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
@ -1126,13 +1113,11 @@ namespace scene
|
||||
|
||||
//! Creates a follow spline animator.
|
||||
/** The animator modifies the position of
|
||||
the attached scene node to make it follow a hermite spline.
|
||||
It uses a subset of hermite splines: either cardinal splines
|
||||
(tightness != 0.5) or catmull-rom-splines (tightness == 0.5).
|
||||
The animator moves from one control point to the next in
|
||||
1/speed seconds. This code was sent in by Matthias Gall.
|
||||
If you no longer need the animator, you should call ISceneNodeAnimator::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
the attached scene node to make it follow a hermite spline.
|
||||
It uses a subset of hermite splines: either cardinal splines
|
||||
(tightness != 0.5) or catmull-rom-splines (tightness == 0.5).
|
||||
The animator moves from one control point to the next in
|
||||
1/speed seconds. This code was sent in by Matthias Gall. */
|
||||
virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime,
|
||||
const core::array< core::vector3df >& points,
|
||||
f32 speed = 1.0f, f32 tightness = 0.5f) = 0;
|
||||
@ -1153,7 +1138,7 @@ namespace scene
|
||||
\endcode
|
||||
\param mesh: Mesh of which the triangles are taken.
|
||||
\param node: Scene node of which visibility and transformation is used.
|
||||
\return The selector, or null if not successful.
|
||||
\return Returns the selector, or null if not successful.
|
||||
If you no longer need the selector, you should call ITriangleSelector::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
virtual ITriangleSelector* createTriangleSelector(IMesh* mesh, ISceneNode* node) = 0;
|
||||
@ -1164,7 +1149,7 @@ namespace scene
|
||||
queried, the triangle selector gets the bounding box of the scene node,
|
||||
an creates new triangles. In this way, it works good with animated scene nodes.
|
||||
\param node: Scene node of which the bounding box, visibility and transformation is used.
|
||||
\return The selector, or null if not successful.
|
||||
\return Returns the selector, or null if not successful.
|
||||
If you no longer need the selector, you should call ITriangleSelector::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
virtual ITriangleSelector* createTriangleSelectorFromBoundingBox(ISceneNode* node) = 0;
|
||||
@ -1189,7 +1174,7 @@ namespace scene
|
||||
\param minimalPolysPerNode: Specifies the minimal polygons contained a octree node.
|
||||
If a node gets less polys the this value, it will not be splitted into
|
||||
smaller nodes.
|
||||
\return The selector, or null if not successful.
|
||||
\return Returns the selector, or null if not successful.
|
||||
If you no longer need the selector, you should call ITriangleSelector::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
virtual ITriangleSelector* createOctTreeTriangleSelector(IMesh* mesh,
|
||||
@ -1200,37 +1185,30 @@ namespace scene
|
||||
collection of one or more triangle selectors providing together
|
||||
the interface of one triangle selector. In this way,
|
||||
collision tests can be done with different triangle soups in one pass.
|
||||
\return The selector, or null if not successful.
|
||||
\return Returns the selector, or null if not successful.
|
||||
If you no longer need the selector, you should call ITriangleSelector::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
virtual IMetaTriangleSelector* createMetaTriangleSelector() = 0;
|
||||
|
||||
//! Creates a triangle selector which can select triangles from a terrain scene node.
|
||||
/** \param node: Pointer to the created terrain scene node
|
||||
\param LOD: Level of detail, 0 for highest detail.
|
||||
\return The selector, or null if not successful.
|
||||
If you no longer need the selector, you should call ITriangleSelector::drop().
|
||||
See IReferenceCounted::drop() for more information. */
|
||||
\param LOD: Level of detail, 0 for highest detail. */
|
||||
virtual ITriangleSelector* createTerrainTriangleSelector(
|
||||
ITerrainSceneNode* node, s32 LOD=0) = 0;
|
||||
|
||||
//! Adds an external mesh loader for extending the engine with new file formats.
|
||||
/** If you want the engine to be extended with
|
||||
file formats it currently is not able to load (e.g. .cob), just implement
|
||||
the IMeshLoader interface in your loading class and add it with this method.
|
||||
Using this method it is also possible to override built-in mesh loaders with
|
||||
newer or updated versions without the need of recompiling the engine.
|
||||
\param externalLoader: Implementation of a new mesh loader. */
|
||||
file formats it currently is not able to load (e.g. .cob), just implement
|
||||
the IMeshLoader interface in your loading class and add it with this method.
|
||||
Using this method it is also possible to override built-in mesh loaders with
|
||||
newer or updated versions without the need of recompiling the engine.
|
||||
\param externalLoader: Implementation of a new mesh loader. */
|
||||
virtual void addExternalMeshLoader(IMeshLoader* externalLoader) = 0;
|
||||
|
||||
//! Get pointer to the scene collision manager.
|
||||
/** \return Pointer to the collision manager
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
//! Returns a pointer to the scene collision manager.
|
||||
virtual ISceneCollisionManager* getSceneCollisionManager() = 0;
|
||||
|
||||
//! Get pointer to the mesh manipulator.
|
||||
/** \return Pointer to the mesh manipulator
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
//! Returns a pointer to the mesh manipulator.
|
||||
virtual IMeshManipulator* getMeshManipulator() = 0;
|
||||
|
||||
//! Adds a scene node to the deletion queue.
|
||||
@ -1253,7 +1231,7 @@ namespace scene
|
||||
/** All scene nodes are removed. */
|
||||
virtual void clear() = 0;
|
||||
|
||||
//! Get interface to the parameters set in this scene.
|
||||
//! Returns interface to the parameters set in this scene.
|
||||
/** String parameters can be used by plugins and mesh loaders.
|
||||
For example the CMS and LMTS loader want a parameter named 'CSM_TexturePath'
|
||||
and 'LMTS_TexturePath' set to the path were attached textures can be found. See
|
||||
@ -1261,7 +1239,7 @@ namespace scene
|
||||
COLLADA_CREATE_SCENE_INSTANCES, DMF_TEXTURE_PATH and DMF_USE_MATERIALS_DIRS*/
|
||||
virtual io::IAttributes* getParameters() = 0;
|
||||
|
||||
//! Get current render pass.
|
||||
//! Returns current render pass.
|
||||
/** All scene nodes are being rendered in a specific order.
|
||||
First lights, cameras, sky boxes, solid geometry, and then transparent
|
||||
stuff. During the rendering process, scene nodes may want to know what the scene
|
||||
@ -1270,9 +1248,7 @@ namespace scene
|
||||
pass currently is active they can render the correct part of their geometry. */
|
||||
virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0;
|
||||
|
||||
//! Get the default scene node factory which can create all built in scene nodes
|
||||
/** \return Pointer to the default scene node factory
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
//! Returns the default scene node factory which can create all built in scene nodes
|
||||
virtual ISceneNodeFactory* getDefaultSceneNodeFactory() = 0;
|
||||
|
||||
//! Adds a scene node factory to the scene manager.
|
||||
@ -1280,17 +1256,13 @@ namespace scene
|
||||
able to create automaticly, for example when loading data from xml files. */
|
||||
virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0;
|
||||
|
||||
//! Get amount of registered scene node factories.
|
||||
//! Returns amount of registered scene node factories.
|
||||
virtual u32 getRegisteredSceneNodeFactoryCount() const = 0;
|
||||
|
||||
//! Get a scene node factory by index
|
||||
/** \return Pointer to the requested scene node factory, or 0 if it does not exist.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
//! Returns a scene node factory by index
|
||||
virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0;
|
||||
|
||||
//! Get the default scene node animator factory which can create all built-in scene node animators
|
||||
/** \return Pointer to the default scene node animator factory
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
//! Returns the default scene node animator factory which can create all built-in scene node animators
|
||||
virtual ISceneNodeAnimatorFactory* getDefaultSceneNodeAnimatorFactory() = 0;
|
||||
|
||||
//! Adds a scene node animator factory to the scene manager.
|
||||
@ -1298,20 +1270,16 @@ namespace scene
|
||||
able to create automaticly, for example when loading data from xml files. */
|
||||
virtual void registerSceneNodeAnimatorFactory(ISceneNodeAnimatorFactory* factoryToAdd) = 0;
|
||||
|
||||
//! Get amount of registered scene node animator factories.
|
||||
//! Returns amount of registered scene node animator factories.
|
||||
virtual u32 getRegisteredSceneNodeAnimatorFactoryCount() const = 0;
|
||||
|
||||
//! Get scene node animator factory by index
|
||||
/** \return Pointer to the requested scene node animator factory, or 0 if it does not exist.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
//! Returns a scene node animator factory by index
|
||||
virtual ISceneNodeAnimatorFactory* getSceneNodeAnimatorFactory(u32 index) = 0;
|
||||
|
||||
//! Get typename from a scene node type or null if not found
|
||||
//! Returns a typename from a scene node type or null if not found
|
||||
virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0;
|
||||
|
||||
//! Adds a scene node to the scene by name
|
||||
/** \return Pointer to the scene node added by a factory
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0;
|
||||
|
||||
//! Creates a new scene manager.
|
||||
@ -1344,7 +1312,7 @@ namespace scene
|
||||
\param userDataSerializer: If you want to save some user data for every scene node into the
|
||||
file, implement the ISceneUserDataSerializer interface and provide it as parameter here.
|
||||
Otherwise, simply specify 0 as this parameter.
|
||||
\return True if successful. */
|
||||
\return Returns true if successful. */
|
||||
virtual bool saveScene(const c8* filename, ISceneUserDataSerializer* userDataSerializer=0) = 0;
|
||||
|
||||
//! Saves the current scene into a file.
|
||||
@ -1356,7 +1324,7 @@ namespace scene
|
||||
\param userDataSerializer: If you want to save some user data for every scene node into the
|
||||
file, implement the ISceneUserDataSerializer interface and provide it as parameter here.
|
||||
Otherwise, simply specify 0 as this parameter.
|
||||
\return True if successful. */
|
||||
\return Returns true if successful. */
|
||||
virtual bool saveScene(io::IWriteFile* file, ISceneUserDataSerializer* userDataSerializer=0) = 0;
|
||||
|
||||
//! Loads a scene. Note that the current scene is not cleared before.
|
||||
@ -1369,7 +1337,7 @@ namespace scene
|
||||
implement the ISceneUserDataSerializer interface and provide it
|
||||
as parameter here. Otherwise, simply specify 0 as this
|
||||
parameter.
|
||||
\return True if successful. */
|
||||
\return Returns true if successful. */
|
||||
virtual bool loadScene(const c8* filename, ISceneUserDataSerializer* userDataSerializer=0) = 0;
|
||||
|
||||
//! Loads a scene. Note that the current scene is not cleared before.
|
||||
@ -1382,10 +1350,10 @@ namespace scene
|
||||
implement the ISceneUserDataSerializer interface and provide it
|
||||
as parameter here. Otherwise, simply specify 0 as this
|
||||
parameter.
|
||||
\return True if successful. */
|
||||
\return Returns true if successful. */
|
||||
virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0) = 0;
|
||||
|
||||
//! Get a mesh writer implementation if available
|
||||
//! Returns a mesh writer implementation if available
|
||||
/** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop()
|
||||
for details. */
|
||||
virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0;
|
||||
@ -1393,7 +1361,7 @@ namespace scene
|
||||
//! Sets ambient color of the scene
|
||||
virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;
|
||||
|
||||
//! Get ambient color of the scene
|
||||
//! Returns ambient color of the scene
|
||||
virtual const video::SColorf& getAmbientLight() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
@ -107,15 +107,8 @@ namespace scene
|
||||
// animate this node with all animators
|
||||
|
||||
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin();
|
||||
while (ait != Animators.end())
|
||||
{
|
||||
// continue to the next node before calling animateNode()
|
||||
// so that the animator may remove itself from the scene
|
||||
// node without the iterator becoming invalid
|
||||
ISceneNodeAnimator* anim = *ait;
|
||||
++ait;
|
||||
anim->animateNode(this, timeMs);
|
||||
}
|
||||
for (; ait != Animators.end(); ++ait)
|
||||
(*ait)->animateNode(this, timeMs);
|
||||
|
||||
// update absolute position
|
||||
updateAbsolutePosition();
|
||||
@ -208,20 +201,20 @@ namespace scene
|
||||
}
|
||||
|
||||
|
||||
//! Returns whether the node should be visible (if all of its parents are visible).
|
||||
//! Returns true if the node is visible.
|
||||
/** This is only an option set by the user, but has nothing to
|
||||
do with geometry culling
|
||||
\return The requested visibility of the node, true means visible (if all parents are also visible). */
|
||||
\return The visibility of the node, true means visible. */
|
||||
virtual bool isVisible() const
|
||||
{
|
||||
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
||||
return IsVisible;
|
||||
}
|
||||
|
||||
|
||||
//! Sets if the node should be visible or not.
|
||||
/** All children of this node won't be visible either, when set
|
||||
to false. Invisible nodes are not valid candidates for selection by
|
||||
collision manager bounding box methods.
|
||||
to false.
|
||||
\param isVisible If the node shall be visible. */
|
||||
virtual void setVisible(bool isVisible)
|
||||
{
|
||||
@ -413,11 +406,8 @@ namespace scene
|
||||
}
|
||||
|
||||
|
||||
//! Gets the scale of the scene node relative to its parent.
|
||||
/** This is the scale of this node relative to its parent.
|
||||
If you want the absolute scale, use
|
||||
getAbsoluteTransformation().getScale()
|
||||
\return The scale of the scene node. */
|
||||
//! Gets the relative scale of the scene node.
|
||||
/** \return The scale of the scene node. */
|
||||
virtual const core::vector3df& getScale() const
|
||||
{
|
||||
return RelativeScale;
|
||||
@ -425,17 +415,15 @@ namespace scene
|
||||
|
||||
|
||||
//! Sets the relative scale of the scene node.
|
||||
/** \param scale New scale of the node, relative to its parent. */
|
||||
/** \param scale New scale of the node */
|
||||
virtual void setScale(const core::vector3df& scale)
|
||||
{
|
||||
RelativeScale = scale;
|
||||
}
|
||||
|
||||
|
||||
//! Gets the rotation of the node relative to its parent.
|
||||
//! Gets the rotation of the node.
|
||||
/** Note that this is the relative rotation of the node.
|
||||
If you want the absolute rotation, use
|
||||
getAbsoluteTransformation().getRotation()
|
||||
\return Current relative rotation of the scene node. */
|
||||
virtual const core::vector3df& getRotation() const
|
||||
{
|
||||
@ -443,7 +431,7 @@ namespace scene
|
||||
}
|
||||
|
||||
|
||||
//! Sets the rotation of the node relative to its parent.
|
||||
//! Sets the rotation of the node.
|
||||
/** This only modifies the relative rotation of the node.
|
||||
\param rotation New rotation of the node in degrees. */
|
||||
virtual void setRotation(const core::vector3df& rotation)
|
||||
@ -452,9 +440,8 @@ namespace scene
|
||||
}
|
||||
|
||||
|
||||
//! Gets the position of the node relative to its parent.
|
||||
/** Note that the position is relative to the parent. If you want
|
||||
the position in world coordinates, use getAbsolutePosition() instead.
|
||||
//! Gets the position of the node.
|
||||
/** Note that the position is relative to the parent.
|
||||
\return The current position of the node relative to the parent. */
|
||||
virtual const core::vector3df& getPosition() const
|
||||
{
|
||||
@ -462,19 +449,17 @@ namespace scene
|
||||
}
|
||||
|
||||
|
||||
//! Sets the position of the node relative to its parent.
|
||||
//! Sets the position of the node.
|
||||
/** Note that the position is relative to the parent.
|
||||
\param newpos New relative position of the scene node. */
|
||||
\param newpos New relative postition of the scene node. */
|
||||
virtual void setPosition(const core::vector3df& newpos)
|
||||
{
|
||||
RelativeTranslation = newpos;
|
||||
}
|
||||
|
||||
|
||||
//! Gets the absolute position of the node in world coordinates.
|
||||
/** If you want the position of the node relative to its parent,
|
||||
use getPosition() instead.
|
||||
\return The current absolute position of the scene node. */
|
||||
//! Gets the abolute position of the node.
|
||||
/** \return The current absolute position of the scene node. */
|
||||
virtual core::vector3df getAbsolutePosition() const
|
||||
{
|
||||
return AbsoluteTransformation.getTranslation();
|
||||
@ -691,10 +676,6 @@ namespace scene
|
||||
return 0; // to be implemented by derived classes
|
||||
}
|
||||
|
||||
//! Retrieve the scene manager for this node.
|
||||
/** \return The node's scene manager. */
|
||||
virtual ISceneManager* getSceneManager(void) const { return SceneManager; }
|
||||
|
||||
protected:
|
||||
|
||||
//! A clone function for the ISceneNode members.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
56
src/dep/include/irrlicht/ISceneNodeAnimatorCameraFPS.h
Normal file
56
src/dep/include/irrlicht/ISceneNodeAnimatorCameraFPS.h
Normal file
@ -0,0 +1,56 @@
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
|
||||
#define __I_SCENE_NODE_ANIMATOR_CAMERA_FPS_H_INCLUDED__
|
||||
|
||||
#include "ISceneNodeAnimator.h"
|
||||
#include "IEventReceiver.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
struct SKeyMap;
|
||||
|
||||
namespace scene
|
||||
{
|
||||
|
||||
//! Special scene node animator for FPS cameras
|
||||
/** This scene node animator can be attached to a camera to make it act
|
||||
like a first person shooter
|
||||
*/
|
||||
class ISceneNodeAnimatorCameraFPS : public ISceneNodeAnimator
|
||||
{
|
||||
public:
|
||||
|
||||
//! Returns the speed of movement in units per millisecond
|
||||
virtual f32 getMoveSpeed() const = 0;
|
||||
|
||||
//! Sets the speed of movement in units per millisecond
|
||||
virtual void setMoveSpeed(f32 moveSpeed) = 0;
|
||||
|
||||
//! Returns the rotation speed in degrees
|
||||
/** The degrees are equivalent to a half screen movement of the mouse,
|
||||
i.e. if the mouse cursor had been moved to the border of the screen since
|
||||
the last animation. */
|
||||
virtual f32 getRotateSpeed() const = 0;
|
||||
|
||||
//! Set the rotation speed in degrees
|
||||
virtual void setRotateSpeed(f32 rotateSpeed) = 0;
|
||||
|
||||
//! Sets the keyboard mapping for this animator
|
||||
/** \param keymap Array of keyboard mappings, see SKeyMap
|
||||
\param count Size of the keyboard map array */
|
||||
virtual void setKeyMap(SKeyMap *map, u32 count) = 0;
|
||||
|
||||
//! Sets whether vertical movement should be allowed.
|
||||
/** If vertical movement is enabled then the camera may fight with
|
||||
gravity causing camera shake. Disable this if the camera has
|
||||
a collision animator with gravity enabled. */
|
||||
virtual void setVerticalMovement(bool allow) = 0;
|
||||
};
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
50
src/dep/include/irrlicht/ISceneNodeAnimatorCameraMaya.h
Normal file
50
src/dep/include/irrlicht/ISceneNodeAnimatorCameraMaya.h
Normal file
@ -0,0 +1,50 @@
|
||||
// Copyright (C) 2002-2008 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__
|
||||
#define __I_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__
|
||||
|
||||
#include "ISceneNodeAnimator.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
namespace scene
|
||||
{
|
||||
|
||||
//! Special scene node animator for Maya-style cameras
|
||||
/** This scene node animator can be attached to a camera to make it act like a 3d
|
||||
modelling tool.
|
||||
The camera is moving relative to the target with the mouse, by pressing either
|
||||
of the three buttons.
|
||||
*/
|
||||
class ISceneNodeAnimatorCameraMaya : public ISceneNodeAnimator
|
||||
{
|
||||
public:
|
||||
|
||||
//! Returns the speed of movement
|
||||
virtual f32 getMoveSpeed() const = 0;
|
||||
|
||||
//! Sets the speed of movement
|
||||
virtual void setMoveSpeed(f32 moveSpeed) = 0;
|
||||
|
||||
//! Returns the rotation speed
|
||||
virtual f32 getRotateSpeed() const = 0;
|
||||
|
||||
//! Set the rotation speed
|
||||
virtual void setRotateSpeed(f32 rotateSpeed) = 0;
|
||||
|
||||
//! Returns the zoom speed
|
||||
virtual f32 getZoomSpeed() const = 0;
|
||||
|
||||
//! Set the zoom speed
|
||||
virtual void setZoomSpeed(f32 zoomSpeed) = 0;
|
||||
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user