First round of override updates.

Some fixes:
Added get/setCurrentRenderPass to scene manager (internally renamed, exposed)
Removed destructor from light scene node.
Removed getType calls from archive loaders (one file archives have this)
Removed some internal exposures and virtual attributes for protected classes

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4543 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2013-06-17 14:18:14 +00:00
parent 80efea5574
commit b93788fa3d
67 changed files with 2295 additions and 2298 deletions

View File

@ -1638,6 +1638,12 @@ namespace scene
current callbacks manager and restore the default behavior. */ current callbacks manager and restore the default behavior. */
virtual void setLightManager(ILightManager* lightManager) = 0; virtual void setLightManager(ILightManager* lightManager) = 0;
//! Get current render pass.
virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const =0;
//! Set current render pass.
virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass) =0;
//! Get an instance of a geometry creator. //! Get an instance of a geometry creator.
/** The geometry creator provides some helper methods to create various types of /** The geometry creator provides some helper methods to create various types of
basic geometry. This can be useful for custom scene nodes. */ basic geometry. This can be useful for custom scene nodes. */

File diff suppressed because it is too large Load Diff

View File

@ -127,7 +127,7 @@ namespace scene
virtual void setMesh(IAnimatedMesh* mesh); virtual void setMesh(IAnimatedMesh* mesh);
//! Returns the current mesh //! Returns the current mesh
virtual IAnimatedMesh* getMesh(void) { return Mesh; } virtual IAnimatedMesh* getMesh(void) _IRR_OVERRIDE_ { return Mesh; }
//! Writes attributes of the scene node. //! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
@ -136,7 +136,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_ANIMATED_MESH; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_ANIMATED_MESH; }
// returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, // returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh,
// or the absolutetransformation if it's a normal scenenode // or the absolutetransformation if it's a normal scenenode

View File

@ -74,7 +74,7 @@ public:
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_BILLBOARD; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_BILLBOARD; }
//! Creates a clone of this scene node and its children. //! Creates a clone of this scene node and its children.
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);

View File

@ -137,7 +137,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_CAMERA; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_CAMERA; }
//! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them. //! Binds the camera scene node's rotation to its target position and vice vera, or unbinds them.
virtual void bindTargetAndRotation(bool bound); virtual void bindTargetAndRotation(bool bound);

View File

@ -1,177 +1,177 @@
// Copyright (C) 2012 Patryk Nadrowski // Copyright (C) 2012 Patryk Nadrowski
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_CG_MATERIAL_RENDERER_H_INCLUDED__ #ifndef __C_CG_MATERIAL_RENDERER_H_INCLUDED__
#define __C_CG_MATERIAL_RENDERER_H_INCLUDED__ #define __C_CG_MATERIAL_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_CG_ #ifdef _IRR_COMPILE_WITH_CG_
#include "IMaterialRenderer.h" #include "IMaterialRenderer.h"
#include "IMaterialRendererServices.h" #include "IMaterialRendererServices.h"
#include "IShaderConstantSetCallBack.h" #include "IShaderConstantSetCallBack.h"
#include "IGPUProgrammingServices.h" #include "IGPUProgrammingServices.h"
#include "irrArray.h" #include "irrArray.h"
#include "irrString.h" #include "irrString.h"
#include "IVideoDriver.h" #include "IVideoDriver.h"
#include "os.h" #include "os.h"
#include "Cg/cg.h" #include "Cg/cg.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma comment(lib, "cg.lib") #pragma comment(lib, "cg.lib")
#endif #endif
namespace irr namespace irr
{ {
namespace video namespace video
{ {
class CCgUniform class CCgUniform
{ {
public: public:
CCgUniform(const CGparameter& parameter, bool global); CCgUniform(const CGparameter& parameter, bool global);
virtual ~CCgUniform(); virtual ~CCgUniform();
const core::stringc& getName() const; const core::stringc& getName() const;
const CGparameter& getParameter() const; const CGparameter& getParameter() const;
CGenum getSpace() const; CGenum getSpace() const;
CGtype getType() const; CGtype getType() const;
virtual void update(const void* data, const SMaterial& material) const = 0; virtual void update(const void* data, const SMaterial& material) const = 0;
protected: protected:
core::stringc Name; core::stringc Name;
CGparameter Parameter; CGparameter Parameter;
CGenum Space; CGenum Space;
CGtype Type; CGtype Type;
}; };
class CCgUniform1f : public CCgUniform class CCgUniform1f : public CCgUniform
{ {
public: public:
CCgUniform1f(const CGparameter& parameter, bool global); CCgUniform1f(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform2f : public CCgUniform class CCgUniform2f : public CCgUniform
{ {
public: public:
CCgUniform2f(const CGparameter& parameter, bool global); CCgUniform2f(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform3f : public CCgUniform class CCgUniform3f : public CCgUniform
{ {
public: public:
CCgUniform3f(const CGparameter& parameter, bool global); CCgUniform3f(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform4f : public CCgUniform class CCgUniform4f : public CCgUniform
{ {
public: public:
CCgUniform4f(const CGparameter& parameter, bool global); CCgUniform4f(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform1i : public CCgUniform class CCgUniform1i : public CCgUniform
{ {
public: public:
CCgUniform1i(const CGparameter& parameter, bool global); CCgUniform1i(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform2i : public CCgUniform class CCgUniform2i : public CCgUniform
{ {
public: public:
CCgUniform2i(const CGparameter& parameter, bool global); CCgUniform2i(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform3i : public CCgUniform class CCgUniform3i : public CCgUniform
{ {
public: public:
CCgUniform3i(const CGparameter& parameter, bool global); CCgUniform3i(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform4i : public CCgUniform class CCgUniform4i : public CCgUniform
{ {
public: public:
CCgUniform4i(const CGparameter& parameter, bool global); CCgUniform4i(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniform4x4f : public CCgUniform class CCgUniform4x4f : public CCgUniform
{ {
public: public:
CCgUniform4x4f(const CGparameter& parameter, bool global); CCgUniform4x4f(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgUniformSampler2D : public CCgUniform class CCgUniformSampler2D : public CCgUniform
{ {
public: public:
CCgUniformSampler2D(const CGparameter& parameter, bool global); CCgUniformSampler2D(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CCgMaterialRenderer : public IMaterialRenderer, public IMaterialRendererServices class CCgMaterialRenderer : public IMaterialRenderer, public IMaterialRendererServices
{ {
public: public:
CCgMaterialRenderer(IShaderConstantSetCallBack* callback = 0, IMaterialRenderer* baseMaterial = 0, s32 userData = 0); CCgMaterialRenderer(IShaderConstantSetCallBack* callback = 0, IMaterialRenderer* baseMaterial = 0, s32 userData = 0);
virtual ~CCgMaterialRenderer(); virtual ~CCgMaterialRenderer();
virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) = 0; virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services) = 0;
virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) = 0; virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) = 0;
virtual void OnUnsetMaterial() = 0; virtual void OnUnsetMaterial() = 0;
virtual bool isTransparent() const; virtual bool isTransparent() const;
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) = 0; virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates) = 0;
virtual s32 getVertexShaderConstantID(const c8* name); virtual s32 getVertexShaderConstantID(const c8* name);
virtual s32 getPixelShaderConstantID(const c8* name); virtual s32 getPixelShaderConstantID(const c8* name);
virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1);
virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1); virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1);
virtual bool setVertexShaderConstant(s32 index, const f32* floats, int count); virtual bool setVertexShaderConstant(s32 index, const f32* floats, int count);
virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count); virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count);
virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count); virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count);
virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count); virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count);
virtual IVideoDriver* getVideoDriver() = 0; virtual IVideoDriver* getVideoDriver() = 0;
protected: protected:
void getUniformList(); void getUniformList();
IShaderConstantSetCallBack* CallBack; IShaderConstantSetCallBack* CallBack;
IMaterialRenderer* BaseMaterial; IMaterialRenderer* BaseMaterial;
s32 UserData; s32 UserData;
core::array<CCgUniform*> UniformInfo; core::array<CCgUniform*> UniformInfo;
CGprogram VertexProgram; CGprogram VertexProgram;
CGprogram FragmentProgram; CGprogram FragmentProgram;
CGprogram GeometryProgram; CGprogram GeometryProgram;
CGprofile VertexProfile; CGprofile VertexProfile;
CGprofile FragmentProfile; CGprofile FragmentProfile;
CGprofile GeometryProfile; CGprofile GeometryProfile;
SMaterial Material; SMaterial Material;
CGerror Error; CGerror Error;
}; };
} }
} }
#endif #endif
#endif #endif

View File

@ -43,7 +43,7 @@ namespace scene
virtual u32 getMaterialCount() const; virtual u32 getMaterialCount() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_CUBE; }
//! Creates shadow volume scene node as child of this node //! Creates shadow volume scene node as child of this node
//! and returns a pointer to it. //! and returns a pointer to it.
@ -60,18 +60,18 @@ namespace scene
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
//! Sets a new mesh to display //! Sets a new mesh to display
virtual void setMesh(IMesh* mesh) {} virtual void setMesh(IMesh* mesh) _IRR_OVERRIDE_ {}
//! Returns the current mesh //! Returns the current mesh
virtual IMesh* getMesh(void) { return Mesh; } virtual IMesh* getMesh(void) _IRR_OVERRIDE_ { return Mesh; }
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes /* In this way it is possible to change the materials a mesh causing all mesh scene nodes
referencing this mesh to change too. */ referencing this mesh to change too. */
virtual void setReadOnlyMaterials(bool readonly) {} virtual void setReadOnlyMaterials(bool readonly) _IRR_OVERRIDE_ {}
//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style
virtual bool isReadOnlyMaterials() const { return false; } virtual bool isReadOnlyMaterials() const _IRR_OVERRIDE_ { return false; }
//! Removes a child from this scene node. //! Removes a child from this scene node.
//! Implemented here, to be able to remove the shadow properly, if there is one, //! Implemented here, to be able to remove the shadow properly, if there is one,

View File

@ -227,7 +227,7 @@ namespace video
//! Returns the maximum texture size supported. //! Returns the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const; virtual core::dimension2du getMaxTextureSize() const;
virtual bool checkDriverReset() {return DriverWasReset;} virtual bool checkDriverReset() _IRR_OVERRIDE_ {return DriverWasReset;}
private: private:
// enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates. // enumeration for rendering modes such as 2d and 3d for minizing the switching of renderStates.

View File

@ -35,7 +35,7 @@ public:
virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype);
virtual void OnSetMaterial(const SMaterial& material) { } virtual void OnSetMaterial(const SMaterial& material) _IRR_OVERRIDE_ { }
virtual void OnSetMaterial(const video::SMaterial& material, virtual void OnSetMaterial(const video::SMaterial& material,
const video::SMaterial& lastMaterial, const video::SMaterial& lastMaterial,
bool resetAllRenderstates, video::IMaterialRendererServices* services); bool resetAllRenderstates, video::IMaterialRendererServices* services);

View File

@ -1,83 +1,83 @@
// Copyright (C) 2012-2012 Patryk Nadrowski // Copyright (C) 2012-2012 Patryk Nadrowski
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_DIRECT3D_9_CG_MATERIAL_RENDERER_H_INCLUDED__ #ifndef __C_DIRECT3D_9_CG_MATERIAL_RENDERER_H_INCLUDED__
#define __C_DIRECT3D_9_CG_MATERIAL_RENDERER_H_INCLUDED__ #define __C_DIRECT3D_9_CG_MATERIAL_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#if defined(_IRR_COMPILE_WITH_DIRECT3D_9_) && defined(_IRR_COMPILE_WITH_CG_) #if defined(_IRR_COMPILE_WITH_DIRECT3D_9_) && defined(_IRR_COMPILE_WITH_CG_)
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <d3d9.h> #include <d3d9.h>
#include <d3dx9.h> #include <d3dx9.h>
#include "CCgMaterialRenderer.h" #include "CCgMaterialRenderer.h"
#include "Cg/cgD3D9.h" #include "Cg/cgD3D9.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma comment(lib, "cgD3D9.lib") #pragma comment(lib, "cgD3D9.lib")
#endif #endif
namespace irr namespace irr
{ {
namespace video namespace video
{ {
class CD3D9Driver; class CD3D9Driver;
class IShaderConstantSetCallBack; class IShaderConstantSetCallBack;
class CD3D9CgUniformSampler2D : public CCgUniform class CD3D9CgUniformSampler2D : public CCgUniform
{ {
public: public:
CD3D9CgUniformSampler2D(const CGparameter& parameter, bool global); CD3D9CgUniformSampler2D(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class CD3D9CgMaterialRenderer : public CCgMaterialRenderer class CD3D9CgMaterialRenderer : public CCgMaterialRenderer
{ {
public: public:
CD3D9CgMaterialRenderer(CD3D9Driver* driver, s32& materialType, CD3D9CgMaterialRenderer(CD3D9Driver* driver, s32& materialType,
const c8* vertexProgram = 0, const c8* vertexEntry = "main", const c8* vertexProgram = 0, const c8* vertexEntry = "main",
E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1,
const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", const c8* fragmentProgram = 0, const c8* fragmentEntry = "main",
E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1,
const c8* geometryProgram = 0, const c8* geometryEntry = "main", const c8* geometryProgram = 0, const c8* geometryEntry = "main",
E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 vertices = 0, IShaderConstantSetCallBack* callback = 0, u32 vertices = 0, IShaderConstantSetCallBack* callback = 0,
IMaterialRenderer* baseMaterial = 0, s32 userData = 0); IMaterialRenderer* baseMaterial = 0, s32 userData = 0);
virtual ~CD3D9CgMaterialRenderer(); virtual ~CD3D9CgMaterialRenderer();
virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services); virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services);
virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype); virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype);
virtual void OnUnsetMaterial(); virtual void OnUnsetMaterial();
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates); virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates);
virtual IVideoDriver* getVideoDriver(); virtual IVideoDriver* getVideoDriver();
protected: protected:
void init(s32& materialType, void init(s32& materialType,
const c8* vertexProgram = 0, const c8* vertexEntry = "main", const c8* vertexProgram = 0, const c8* vertexEntry = "main",
E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1,
const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", const c8* fragmentProgram = 0, const c8* fragmentEntry = "main",
E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1,
const c8* geometryProgram = 0, const c8* geometryEntry = "main", const c8* geometryProgram = 0, const c8* geometryEntry = "main",
E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 vertices = 0); u32 vertices = 0);
CD3D9Driver* Driver; CD3D9Driver* Driver;
}; };
} }
} }
#endif #endif
#endif #endif

View File

@ -304,13 +304,13 @@ namespace video
virtual void enableClipPlane(u32 index, bool enable); virtual void enableClipPlane(u32 index, bool enable);
//! Returns the graphics card vendor name. //! Returns the graphics card vendor name.
virtual core::stringc getVendorInfo() {return VendorName;} virtual core::stringc getVendorInfo() _IRR_OVERRIDE_ {return VendorName;}
//! Enable the 2d override material //! Enable the 2d override material
virtual void enableMaterial2D(bool enable=true); virtual void enableMaterial2D(bool enable=true);
//! Check if the driver was recently reset. //! Check if the driver was recently reset.
virtual bool checkDriverReset() {return DriverWasReset;} virtual bool checkDriverReset() _IRR_OVERRIDE_ {return DriverWasReset;}
// removes the depth struct from the DepthSurface array // removes the depth struct from the DepthSurface array
void removeDepthSurface(SDepthSurface* depth); void removeDepthSurface(SDepthSurface* depth);

View File

@ -43,7 +43,7 @@ public:
//! Returns the render capability of the material. //! Returns the render capability of the material.
virtual s32 getRenderCapability() const; virtual s32 getRenderCapability() const;
virtual void OnSetMaterial(const SMaterial& material) { } virtual void OnSetMaterial(const SMaterial& material) _IRR_OVERRIDE_ { }
virtual void OnSetMaterial(const video::SMaterial& material, virtual void OnSetMaterial(const video::SMaterial& material,
const video::SMaterial& lastMaterial, const video::SMaterial& lastMaterial,
bool resetAllRenderstates, video::IMaterialRendererServices* services); bool resetAllRenderstates, video::IMaterialRendererServices* services);

View File

@ -32,13 +32,13 @@ namespace video
virtual const core::dimension2d<u32>& getSize() const; virtual const core::dimension2d<u32>& getSize() const;
//! locks the zbuffer //! locks the zbuffer
virtual void* lock() { return (void*) Buffer; } virtual void* lock() _IRR_OVERRIDE_ { return (void*) Buffer; }
//! unlocks the zbuffer //! unlocks the zbuffer
virtual void unlock() {} virtual void unlock() _IRR_OVERRIDE_ {}
//! returns pitch of depthbuffer (in bytes) //! returns pitch of depthbuffer (in bytes)
virtual u32 getPitch() const { return Pitch; } virtual u32 getPitch() const _IRR_OVERRIDE_ { return Pitch; }
private: private:
@ -70,13 +70,13 @@ namespace video
virtual const core::dimension2d<u32>& getSize() const; virtual const core::dimension2d<u32>& getSize() const;
//! locks the zbuffer //! locks the zbuffer
virtual void* lock() { return (void*) Buffer; } virtual void* lock() _IRR_OVERRIDE_ { return (void*) Buffer; }
//! unlocks the zbuffer //! unlocks the zbuffer
virtual void unlock() {} virtual void unlock() _IRR_OVERRIDE_ {}
//! returns pitch of depthbuffer (in bytes) //! returns pitch of depthbuffer (in bytes)
virtual u32 getPitch() const { return Pitch; } virtual u32 getPitch() const _IRR_OVERRIDE_ { return Pitch; }
private: private:

View File

@ -31,10 +31,10 @@ namespace scene
virtual core::matrix4 getRelativeTransformation() const; virtual core::matrix4 getRelativeTransformation() const;
//! does nothing. //! does nothing.
virtual void render() {} virtual void render() _IRR_OVERRIDE_ {}
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_DUMMY_TRANSFORMATION; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_DUMMY_TRANSFORMATION; }
//! Creates a clone of this scene node and its children. //! Creates a clone of this scene node and its children.
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);

View File

@ -29,7 +29,7 @@ namespace scene
virtual void render(); virtual void render();
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_EMPTY; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_EMPTY; }
//! Creates a clone of this scene node and its children. //! Creates a clone of this scene node and its children.
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);

View File

@ -60,7 +60,7 @@ public:
virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const; virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const;
//! Returns the type of this font //! Returns the type of this font
virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; } virtual EGUI_FONT_TYPE getType() const _IRR_OVERRIDE_ { return EGFT_BITMAP; }
//! set an Pixel Offset on Drawing ( scale position on width ) //! set an Pixel Offset on Drawing ( scale position on width )
virtual void setKerningWidth (s32 kerning); virtual void setKerningWidth (s32 kerning);

View File

@ -40,7 +40,7 @@ public:
} }
//! Unlock function. //! Unlock function.
virtual void unlock() {} virtual void unlock() _IRR_OVERRIDE_ {}
//! Returns width and height of image data. //! Returns width and height of image data.
virtual const core::dimension2d<u32>& getDimension() const; virtual const core::dimension2d<u32>& getDimension() const;
@ -79,7 +79,7 @@ public:
virtual ECOLOR_FORMAT getColorFormat() const; virtual ECOLOR_FORMAT getColorFormat() const;
//! returns pitch of image //! returns pitch of image
virtual u32 getPitch() const { return Pitch; } virtual u32 getPitch() const _IRR_OVERRIDE_ { return Pitch; }
//! copies this surface into another, scaling it to fit. //! copies this surface into another, scaling it to fit.
virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format, u32 pitch=0); virtual void copyToScaling(void* target, u32 width, u32 height, ECOLOR_FORMAT format, u32 pitch=0);

View File

@ -1,215 +1,215 @@
// Copyright (C) 2002-2012 Thomas Alten // Copyright (C) 2002-2012 Thomas Alten
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_IMAGE_LOADER_DDS_H_INCLUDED__ #ifndef __C_IMAGE_LOADER_DDS_H_INCLUDED__
#define __C_IMAGE_LOADER_DDS_H_INCLUDED__ #define __C_IMAGE_LOADER_DDS_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#if defined(_IRR_COMPILE_WITH_DDS_LOADER_) || defined(_IRR_COMPILE_WITH_DDS_DECODER_LOADER_) #if defined(_IRR_COMPILE_WITH_DDS_LOADER_) || defined(_IRR_COMPILE_WITH_DDS_DECODER_LOADER_)
#include "IImageLoader.h" #include "IImageLoader.h"
namespace irr namespace irr
{ {
namespace video namespace video
{ {
/* dds pixel format types */ /* dds pixel format types */
enum eDDSPixelFormat enum eDDSPixelFormat
{ {
DDS_PF_ARGB8888, DDS_PF_ARGB8888,
DDS_PF_DXT1, DDS_PF_DXT1,
DDS_PF_DXT2, DDS_PF_DXT2,
DDS_PF_DXT3, DDS_PF_DXT3,
DDS_PF_DXT4, DDS_PF_DXT4,
DDS_PF_DXT5, DDS_PF_DXT5,
DDS_PF_UNKNOWN DDS_PF_UNKNOWN
}; };
// byte-align structures // byte-align structures
#include "irrpack.h" #include "irrpack.h"
/* structures */ /* structures */
struct ddsPixelFormat struct ddsPixelFormat
{ {
u32 Size; u32 Size;
u32 Flags; u32 Flags;
u32 FourCC; u32 FourCC;
u32 RGBBitCount; u32 RGBBitCount;
u32 RBitMask; u32 RBitMask;
u32 GBitMask; u32 GBitMask;
u32 BBitMask; u32 BBitMask;
u32 ABitMask; u32 ABitMask;
} PACK_STRUCT; } PACK_STRUCT;
struct ddsCaps struct ddsCaps
{ {
u32 caps1; u32 caps1;
u32 caps2; u32 caps2;
u32 caps3; u32 caps3;
u32 caps4; u32 caps4;
} PACK_STRUCT; } PACK_STRUCT;
struct ddsHeader struct ddsHeader
{ {
c8 Magic[4]; c8 Magic[4];
u32 Size; u32 Size;
u32 Flags; u32 Flags;
u32 Height; u32 Height;
u32 Width; u32 Width;
u32 PitchOrLinearSize; u32 PitchOrLinearSize;
u32 Depth; u32 Depth;
u32 MipMapCount; u32 MipMapCount;
u32 Reserved1[11]; u32 Reserved1[11];
ddsPixelFormat PixelFormat; ddsPixelFormat PixelFormat;
ddsCaps Caps; ddsCaps Caps;
u32 Reserved2; u32 Reserved2;
} PACK_STRUCT; } PACK_STRUCT;
#ifdef _IRR_COMPILE_WITH_DDS_DECODER_LOADER_ #ifdef _IRR_COMPILE_WITH_DDS_DECODER_LOADER_
struct ddsColorBlock struct ddsColorBlock
{ {
u16 colors[ 2 ]; u16 colors[ 2 ];
u8 row[ 4 ]; u8 row[ 4 ];
} PACK_STRUCT; } PACK_STRUCT;
struct ddsAlphaBlockExplicit struct ddsAlphaBlockExplicit
{ {
u16 row[ 4 ]; u16 row[ 4 ];
} PACK_STRUCT; } PACK_STRUCT;
struct ddsAlphaBlock3BitLinear struct ddsAlphaBlock3BitLinear
{ {
u8 alpha0; u8 alpha0;
u8 alpha1; u8 alpha1;
u8 stuff[ 6 ]; u8 stuff[ 6 ];
} PACK_STRUCT; } PACK_STRUCT;
struct ddsColor struct ddsColor
{ {
u8 r, g, b, a; u8 r, g, b, a;
} PACK_STRUCT; } PACK_STRUCT;
#endif #endif
// Default alignment // Default alignment
#include "irrunpack.h" #include "irrunpack.h"
/* endian tomfoolery */ /* endian tomfoolery */
typedef union typedef union
{ {
f32 f; f32 f;
c8 c[ 4 ]; c8 c[ 4 ];
} }
floatSwapUnion; floatSwapUnion;
#ifndef __BIG_ENDIAN__ #ifndef __BIG_ENDIAN__
#ifdef _SGI_SOURCE #ifdef _SGI_SOURCE
#define __BIG_ENDIAN__ #define __BIG_ENDIAN__
#endif #endif
#endif #endif
#ifdef __BIG_ENDIAN__ #ifdef __BIG_ENDIAN__
s32 DDSBigLong( s32 src ) { return src; } s32 DDSBigLong( s32 src ) { return src; }
s16 DDSBigShort( s16 src ) { return src; } s16 DDSBigShort( s16 src ) { return src; }
f32 DDSBigFloat( f32 src ) { return src; } f32 DDSBigFloat( f32 src ) { return src; }
s32 DDSLittleLong( s32 src ) s32 DDSLittleLong( s32 src )
{ {
return ((src & 0xFF000000) >> 24) | return ((src & 0xFF000000) >> 24) |
((src & 0x00FF0000) >> 8) | ((src & 0x00FF0000) >> 8) |
((src & 0x0000FF00) << 8) | ((src & 0x0000FF00) << 8) |
((src & 0x000000FF) << 24); ((src & 0x000000FF) << 24);
} }
s16 DDSLittleShort( s16 src ) s16 DDSLittleShort( s16 src )
{ {
return ((src & 0xFF00) >> 8) | return ((src & 0xFF00) >> 8) |
((src & 0x00FF) << 8); ((src & 0x00FF) << 8);
} }
f32 DDSLittleFloat( f32 src ) f32 DDSLittleFloat( f32 src )
{ {
floatSwapUnion in,out; floatSwapUnion in,out;
in.f = src; in.f = src;
out.c[ 0 ] = in.c[ 3 ]; out.c[ 0 ] = in.c[ 3 ];
out.c[ 1 ] = in.c[ 2 ]; out.c[ 1 ] = in.c[ 2 ];
out.c[ 2 ] = in.c[ 1 ]; out.c[ 2 ] = in.c[ 1 ];
out.c[ 3 ] = in.c[ 0 ]; out.c[ 3 ] = in.c[ 0 ];
return out.f; return out.f;
} }
#else /*__BIG_ENDIAN__*/ #else /*__BIG_ENDIAN__*/
s32 DDSLittleLong( s32 src ) { return src; } s32 DDSLittleLong( s32 src ) { return src; }
s16 DDSLittleShort( s16 src ) { return src; } s16 DDSLittleShort( s16 src ) { return src; }
f32 DDSLittleFloat( f32 src ) { return src; } f32 DDSLittleFloat( f32 src ) { return src; }
s32 DDSBigLong( s32 src ) s32 DDSBigLong( s32 src )
{ {
return ((src & 0xFF000000) >> 24) | return ((src & 0xFF000000) >> 24) |
((src & 0x00FF0000) >> 8) | ((src & 0x00FF0000) >> 8) |
((src & 0x0000FF00) << 8) | ((src & 0x0000FF00) << 8) |
((src & 0x000000FF) << 24); ((src & 0x000000FF) << 24);
} }
s16 DDSBigShort( s16 src ) s16 DDSBigShort( s16 src )
{ {
return ((src & 0xFF00) >> 8) | return ((src & 0xFF00) >> 8) |
((src & 0x00FF) << 8); ((src & 0x00FF) << 8);
} }
f32 DDSBigFloat( f32 src ) f32 DDSBigFloat( f32 src )
{ {
floatSwapUnion in,out; floatSwapUnion in,out;
in.f = src; in.f = src;
out.c[ 0 ] = in.c[ 3 ]; out.c[ 0 ] = in.c[ 3 ];
out.c[ 1 ] = in.c[ 2 ]; out.c[ 1 ] = in.c[ 2 ];
out.c[ 2 ] = in.c[ 1 ]; out.c[ 2 ] = in.c[ 1 ];
out.c[ 3 ] = in.c[ 0 ]; out.c[ 3 ] = in.c[ 0 ];
return out.f; return out.f;
} }
#endif /*__BIG_ENDIAN__*/ #endif /*__BIG_ENDIAN__*/
/*! /*!
Surface Loader for DDS images Surface Loader for DDS images
*/ */
class CImageLoaderDDS : public IImageLoader class CImageLoaderDDS : public IImageLoader
{ {
public: public:
//! returns true if the file maybe is able to be loaded by this class //! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".tga") //! based on the file extension (e.g. ".tga")
virtual bool isALoadableFileExtension(const io::path& filename) const; virtual bool isALoadableFileExtension(const io::path& filename) const;
//! returns true if the file maybe is able to be loaded by this class //! returns true if the file maybe is able to be loaded by this class
virtual bool isALoadableFileFormat(io::IReadFile* file) const; virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! creates a surface from the file //! creates a surface from the file
virtual IImage* loadImage(io::IReadFile* file) const; virtual IImage* loadImage(io::IReadFile* file) const;
}; };
} // end namespace video } // end namespace video
} // end namespace irr } // end namespace irr
#endif // compiled with DDS loader #endif // compiled with DDS loader
#endif #endif

View File

@ -310,16 +310,16 @@ namespace gui
} }
//! Calculates the index of the character in the text which is on a specific position. //! Calculates the index of the character in the text which is on a specific position.
virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const { return pixel_x; }; virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const _IRR_OVERRIDE_ { return pixel_x; };
//! No kerning //! No kerning
virtual void setKerningWidth (s32 kerning) { } virtual void setKerningWidth (s32 kerning) _IRR_OVERRIDE_ { }
virtual void setKerningHeight (s32 kerning) { } virtual void setKerningHeight (s32 kerning) _IRR_OVERRIDE_ { }
virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const {return 0;} virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const _IRR_OVERRIDE_ {return 0;}
virtual s32 getKerningHeight() const { return 0;} virtual s32 getKerningHeight() const _IRR_OVERRIDE_ { return 0;}
virtual void setInvisibleCharacters( const wchar_t *s ) { } virtual void setInvisibleCharacters( const wchar_t *s ) _IRR_OVERRIDE_ { }
// I guess this is an OS specific font // I guess this is an OS specific font
virtual EGUI_FONT_TYPE getType() const { return EGFT_OS; } virtual EGUI_FONT_TYPE getType() const _IRR_OVERRIDE_ { return EGFT_OS; }
private: private:
CIrrDeviceConsole* Device; CIrrDeviceConsole* Device;
core::stringw tempText; core::stringw tempText;

View File

@ -1,213 +1,213 @@
// Copyright (C) 2002-2007 Nikolaus Gebhardt // Copyright (C) 2002-2007 Nikolaus Gebhardt
// Copyright (C) 2007-2012 Christian Stehno // Copyright (C) 2007-2012 Christian Stehno
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_IRR_DEVICE_FB_H_INCLUDED__ #ifndef __C_IRR_DEVICE_FB_H_INCLUDED__
#define __C_IRR_DEVICE_FB_H_INCLUDED__ #define __C_IRR_DEVICE_FB_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_FB_DEVICE_ #ifdef _IRR_COMPILE_WITH_FB_DEVICE_
#include "CIrrDeviceStub.h" #include "CIrrDeviceStub.h"
#include "SIrrCreationParameters.h" #include "SIrrCreationParameters.h"
#include "IrrlichtDevice.h" #include "IrrlichtDevice.h"
#include "IImagePresenter.h" #include "IImagePresenter.h"
#include "ICursorControl.h" #include "ICursorControl.h"
#define KeySym s32 #define KeySym s32
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/kd.h> #include <linux/kd.h>
namespace irr namespace irr
{ {
class CIrrDeviceFB : public CIrrDeviceStub, public video::IImagePresenter class CIrrDeviceFB : public CIrrDeviceStub, public video::IImagePresenter
{ {
public: public:
//! constructor //! constructor
CIrrDeviceFB(const SIrrlichtCreationParameters& params); CIrrDeviceFB(const SIrrlichtCreationParameters& params);
//! destructor //! destructor
virtual ~CIrrDeviceFB(); virtual ~CIrrDeviceFB();
//! runs the device. Returns false if device wants to be deleted //! runs the device. Returns false if device wants to be deleted
virtual bool run(); virtual bool run();
//! Cause the device to temporarily pause execution and let other processes to run //! Cause the device to temporarily pause execution and let other processes to run
// This should bring down processor usage without major performance loss for Irrlicht // This should bring down processor usage without major performance loss for Irrlicht
virtual void yield(); virtual void yield();
//! Pause execution and let other processes to run for a specified amount of time. //! Pause execution and let other processes to run for a specified amount of time.
virtual void sleep(u32 timeMs, bool pauseTimer); virtual void sleep(u32 timeMs, bool pauseTimer);
//! sets the caption of the window //! sets the caption of the window
virtual void setWindowCaption(const wchar_t* text); virtual void setWindowCaption(const wchar_t* text);
//! returns if window is active. if not, nothing need to be drawn //! returns if window is active. if not, nothing need to be drawn
virtual bool isWindowActive() const; virtual bool isWindowActive() const;
//! returns if window has focus //! returns if window has focus
virtual bool isWindowFocused() const; virtual bool isWindowFocused() const;
//! returns if window is minimized //! returns if window is minimized
virtual bool isWindowMinimized() const; virtual bool isWindowMinimized() const;
//! Minimizes window //! Minimizes window
virtual void minimizeWindow(); virtual void minimizeWindow();
//! Maximizes window //! Maximizes window
virtual void maximizeWindow(); virtual void maximizeWindow();
//! Restores original window size //! Restores original window size
virtual void restoreWindow(); virtual void restoreWindow();
//! returns current window position (not supported for this device) //! returns current window position (not supported for this device)
virtual core::position2di getWindowPosition() virtual core::position2di getWindowPosition()
{ {
return core::position2di(-1, -1); return core::position2di(-1, -1);
} }
//! presents a surface in the client area //! presents a surface in the client area
virtual bool present(video::IImage* surface, void* windowId = 0, core::rect<s32>* src=0 ); virtual bool present(video::IImage* surface, void* windowId = 0, core::rect<s32>* src=0 );
//! notifies the device that it should close itself //! notifies the device that it should close itself
virtual void closeDevice(); virtual void closeDevice();
//! Sets if the window should be resizeable in windowed mode. //! Sets if the window should be resizeable in windowed mode.
virtual void setResizable(bool resize=false); virtual void setResizable(bool resize=false);
//! Returns the type of this device //! Returns the type of this device
virtual E_DEVICE_TYPE getType() const; virtual E_DEVICE_TYPE getType() const;
private: private:
//! create the driver //! create the driver
void createDriver(); void createDriver();
bool createWindow(const core::dimension2d<u32>& windowSize, u32 bits); bool createWindow(const core::dimension2d<u32>& windowSize, u32 bits);
//! Implementation of the cursor control //! Implementation of the cursor control
class CCursorControl : public gui::ICursorControl class CCursorControl : public gui::ICursorControl
{ {
public: public:
CCursorControl(CIrrDeviceFB* dev, bool null) CCursorControl(CIrrDeviceFB* dev, bool null)
: Device(dev), IsVisible(true), Null(null) : Device(dev), IsVisible(true), Null(null)
{ {
Device->grab(); Device->grab();
} }
~CCursorControl() ~CCursorControl()
{ {
Device->drop(); Device->drop();
} }
//! Changes the visible state of the mouse cursor. //! Changes the visible state of the mouse cursor.
virtual void setVisible(bool visible) virtual void setVisible(bool visible)
{ {
IsVisible = visible; IsVisible = visible;
} }
//! Returns if the cursor is currently visible. //! Returns if the cursor is currently visible.
virtual bool isVisible() const virtual bool isVisible() const
{ {
return IsVisible; return IsVisible;
} }
//! Sets the new position of the cursor. //! Sets the new position of the cursor.
virtual void setPosition(const core::position2d<f32> &pos) virtual void setPosition(const core::position2d<f32> &pos)
{ {
setPosition(pos.X, pos.Y); setPosition(pos.X, pos.Y);
} }
//! Sets the new position of the cursor. //! Sets the new position of the cursor.
virtual void setPosition(f32 x, f32 y) virtual void setPosition(f32 x, f32 y)
{ {
setPosition((s32)(x*Device->CreationParams.WindowSize.Width), (s32)(y*Device->CreationParams.WindowSize.Height)); setPosition((s32)(x*Device->CreationParams.WindowSize.Width), (s32)(y*Device->CreationParams.WindowSize.Height));
} }
//! Sets the new position of the cursor. //! Sets the new position of the cursor.
virtual void setPosition(const core::position2d<s32> &pos) virtual void setPosition(const core::position2d<s32> &pos)
{ {
setPosition(pos.X, pos.Y); setPosition(pos.X, pos.Y);
} }
//! Sets the new position of the cursor. //! Sets the new position of the cursor.
virtual void setPosition(s32 x, s32 y) virtual void setPosition(s32 x, s32 y)
{ {
} }
//! Returns the current position of the mouse cursor. //! Returns the current position of the mouse cursor.
virtual const core::position2d<s32>& getPosition() virtual const core::position2d<s32>& getPosition()
{ {
updateCursorPos(); updateCursorPos();
return CursorPos; return CursorPos;
} }
//! Returns the current position of the mouse cursor. //! Returns the current position of the mouse cursor.
virtual core::position2d<f32> getRelativePosition() virtual core::position2d<f32> getRelativePosition()
{ {
updateCursorPos(); updateCursorPos();
return core::position2d<f32>(CursorPos.X / (f32)Device->CreationParams.WindowSize.Width, return core::position2d<f32>(CursorPos.X / (f32)Device->CreationParams.WindowSize.Width,
CursorPos.Y / (f32)Device->CreationParams.WindowSize.Height); CursorPos.Y / (f32)Device->CreationParams.WindowSize.Height);
} }
virtual void setReferenceRect(core::rect<s32>* rect=0) virtual void setReferenceRect(core::rect<s32>* rect=0)
{ {
} }
private: private:
void updateCursorPos() void updateCursorPos()
{ {
} }
core::position2d<s32> CursorPos; core::position2d<s32> CursorPos;
CIrrDeviceFB* Device; CIrrDeviceFB* Device;
bool IsVisible; bool IsVisible;
bool Null; bool Null;
}; };
friend class CCursorControl; friend class CCursorControl;
int Framebuffer; int Framebuffer;
int EventDevice; int EventDevice;
int KeyboardDevice; int KeyboardDevice;
struct fb_fix_screeninfo fbfixscreeninfo; struct fb_fix_screeninfo fbfixscreeninfo;
struct fb_var_screeninfo fbscreeninfo; struct fb_var_screeninfo fbscreeninfo;
struct fb_var_screeninfo oldscreeninfo; struct fb_var_screeninfo oldscreeninfo;
long KeyboardMode; long KeyboardMode;
u8* SoftwareImage; u8* SoftwareImage;
u32 Pitch; u32 Pitch;
video::ECOLOR_FORMAT FBColorFormat; video::ECOLOR_FORMAT FBColorFormat;
bool Close; bool Close;
struct SKeyMap struct SKeyMap
{ {
SKeyMap() {} SKeyMap() {}
SKeyMap(s32 x11, s32 win32) SKeyMap(s32 x11, s32 win32)
: X11Key(x11), Win32Key(win32) : X11Key(x11), Win32Key(win32)
{ {
} }
KeySym X11Key; KeySym X11Key;
s32 Win32Key; s32 Win32Key;
bool operator<(const SKeyMap& o) const bool operator<(const SKeyMap& o) const
{ {
return X11Key<o.X11Key; return X11Key<o.X11Key;
} }
}; };
core::array<SKeyMap> KeyMap; core::array<SKeyMap> KeyMap;
}; };
} // end namespace irr } // end namespace irr
#endif // _IRR_USE_FB_DEVICE_ #endif // _IRR_USE_FB_DEVICE_
#endif // __C_IRR_DEVICE_FB_H_INCLUDED__ #endif // __C_IRR_DEVICE_FB_H_INCLUDED__

View File

@ -298,10 +298,10 @@ namespace irr
#ifdef _IRR_COMPILE_WITH_X11_ #ifdef _IRR_COMPILE_WITH_X11_
//! Set platform specific behavior flags. //! Set platform specific behavior flags.
virtual void setPlatformBehavior(gui::ECURSOR_PLATFORM_BEHAVIOR behavior) {PlatformBehavior = behavior; } virtual void setPlatformBehavior(gui::ECURSOR_PLATFORM_BEHAVIOR behavior) _IRR_OVERRIDE_ {PlatformBehavior = behavior; }
//! Return platform specific behavior. //! Return platform specific behavior.
virtual gui::ECURSOR_PLATFORM_BEHAVIOR getPlatformBehavior() const { return PlatformBehavior; } virtual gui::ECURSOR_PLATFORM_BEHAVIOR getPlatformBehavior() const _IRR_OVERRIDE_ { return PlatformBehavior; }
void update(); void update();
void clearCursors(); void clearCursors();

View File

@ -22,8 +22,6 @@ public:
CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position, video::SColorf color, f32 range); const core::vector3df& position, video::SColorf color, f32 range);
virtual ~CLightSceneNode() { }
//! pre render event //! pre render event
virtual void OnRegisterSceneNode(); virtual void OnRegisterSceneNode();
@ -49,7 +47,7 @@ public:
virtual const core::aabbox3d<f32>& getBoundingBox() const; virtual const core::aabbox3d<f32>& getBoundingBox() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_LIGHT; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_LIGHT; }
//! Writes attributes of the scene node. //! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;

View File

@ -52,13 +52,13 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_MESH; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_MESH; }
//! Sets a new mesh //! Sets a new mesh
virtual void setMesh(IMesh* mesh); virtual void setMesh(IMesh* mesh);
//! Returns the current mesh //! Returns the current mesh
virtual IMesh* getMesh(void) { return Mesh; } virtual IMesh* getMesh(void) _IRR_OVERRIDE_ { return Mesh; }
//! Creates shadow volume scene node as child of this node //! Creates shadow volume scene node as child of this node
//! and returns a pointer to it. //! and returns a pointer to it.

View File

@ -1,89 +1,89 @@
// Copyright (C) 2002-2012 Nikolaus Gebhardt // Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_MOUNT_READER_H_INCLUDED__ #ifndef __C_MOUNT_READER_H_INCLUDED__
#define __C_MOUNT_READER_H_INCLUDED__ #define __C_MOUNT_READER_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ #ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#include "IFileSystem.h" #include "IFileSystem.h"
#include "CFileList.h" #include "CFileList.h"
namespace irr namespace irr
{ {
namespace io namespace io
{ {
//! Archiveloader capable of loading MountPoint Archives //! Archiveloader capable of loading MountPoint Archives
class CArchiveLoaderMount : public IArchiveLoader class CArchiveLoaderMount : public IArchiveLoader
{ {
public: public:
//! Constructor //! Constructor
CArchiveLoaderMount(io::IFileSystem* fs); CArchiveLoaderMount(io::IFileSystem* fs);
//! returns true if the file maybe is able to be loaded by this class //! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".zip") //! based on the file extension (e.g. ".zip")
virtual bool isALoadableFileFormat(const io::path& filename) const; virtual bool isALoadableFileFormat(const io::path& filename) const;
//! Check if the file might be loaded by this class //! Check if the file might be loaded by this class
/** Check might look into the file. /** Check might look into the file.
\param file File handle to check. \param file File handle to check.
\return True if file seems to be loadable. */ \return True if file seems to be loadable. */
virtual bool isALoadableFileFormat(io::IReadFile* file) const; virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! Check to see if the loader can create archives of this type. //! Check to see if the loader can create archives of this type.
/** Check based on the archive type. /** Check based on the archive type.
\param fileType The archive type to check. \param fileType The archive type to check.
\return True if the archile loader supports this type, false if not */ \return True if the archile loader supports this type, false if not */
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const;
//! Creates an archive from the filename //! Creates an archive from the filename
/** \param file File handle to check. /** \param file File handle to check.
\return Pointer to newly created archive, or 0 upon error. */ \return Pointer to newly created archive, or 0 upon error. */
virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const;
//! creates/loads an archive from the file. //! creates/loads an archive from the file.
//! \return Pointer to the created archive. Returns 0 if loading failed. //! \return Pointer to the created archive. Returns 0 if loading failed.
virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; virtual IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const;
private: private:
io::IFileSystem* FileSystem; io::IFileSystem* FileSystem;
}; };
//! A File Archive which uses a mountpoint //! A File Archive which uses a mountpoint
class CMountPointReader : public virtual IFileArchive, virtual CFileList class CMountPointReader : public virtual IFileArchive, virtual CFileList
{ {
public: public:
//! Constructor //! Constructor
CMountPointReader(IFileSystem *parent, const io::path& basename, CMountPointReader(IFileSystem *parent, const io::path& basename,
bool ignoreCase, bool ignorePaths); bool ignoreCase, bool ignorePaths);
//! opens a file by index //! opens a file by index
virtual IReadFile* createAndOpenFile(u32 index); virtual IReadFile* createAndOpenFile(u32 index);
//! opens a file by file name //! opens a file by file name
virtual IReadFile* createAndOpenFile(const io::path& filename); virtual IReadFile* createAndOpenFile(const io::path& filename);
//! returns the list of files //! returns the list of files
virtual const IFileList* getFileList() const; virtual const IFileList* getFileList() const;
//! get the class Type //! get the class Type
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_FOLDER; } virtual E_FILE_ARCHIVE_TYPE getType() const _IRR_OVERRIDE_ { return EFAT_FOLDER; }
private: private:
core::array<io::path> RealFileNames; core::array<io::path> RealFileNames;
IFileSystem *Parent; IFileSystem *Parent;
void buildDirectory(); void buildDirectory();
}; };
} // io } // io
} // irr } // irr
#endif // __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ #endif // __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#endif // __C_MOUNT_READER_H_INCLUDED__ #endif // __C_MOUNT_READER_H_INCLUDED__

View File

@ -1,128 +1,125 @@
// Copyright (C) 2002-2012 Nikolaus Gebhardt // Copyright (C) 2002-2012 Nikolaus Gebhardt
// Copyright (C) 2009-2012 Christian Stehno // Copyright (C) 2009-2012 Christian Stehno
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_NPK_READER_H_INCLUDED__ #ifndef __C_NPK_READER_H_INCLUDED__
#define __C_NPK_READER_H_INCLUDED__ #define __C_NPK_READER_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ #ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
#include "IReferenceCounted.h" #include "IReferenceCounted.h"
#include "IReadFile.h" #include "IReadFile.h"
#include "irrArray.h" #include "irrArray.h"
#include "irrString.h" #include "irrString.h"
#include "IFileSystem.h" #include "IFileSystem.h"
#include "CFileList.h" #include "CFileList.h"
namespace irr namespace irr
{ {
namespace io namespace io
{ {
namespace namespace
{ {
//! File header containing location and size of the table of contents //! File header containing location and size of the table of contents
struct SNPKHeader struct SNPKHeader
{ {
// Don't change the order of these fields! They must match the order stored on disk. // Don't change the order of these fields! They must match the order stored on disk.
c8 Tag[4]; c8 Tag[4];
u32 Length; u32 Length;
u32 Offset; u32 Offset;
}; };
//! An entry in the NPK file's table of contents. //! An entry in the NPK file's table of contents.
struct SNPKFileEntry struct SNPKFileEntry
{ {
core::stringc Name; core::stringc Name;
u32 Offset; u32 Offset;
u32 Length; u32 Length;
}; };
} // end namespace } // end namespace
//! Archiveloader capable of loading Nebula Device 2 NPK Archives //! Archiveloader capable of loading Nebula Device 2 NPK Archives
class CArchiveLoaderNPK : public IArchiveLoader class CArchiveLoaderNPK : public IArchiveLoader
{ {
public: public:
//! Constructor //! Constructor
CArchiveLoaderNPK(io::IFileSystem* fs); CArchiveLoaderNPK(io::IFileSystem* fs);
//! returns true if the file maybe is able to be loaded by this class //! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".zip") //! based on the file extension (e.g. ".zip")
virtual bool isALoadableFileFormat(const io::path& filename) const; virtual bool isALoadableFileFormat(const io::path& filename) const;
//! Check if the file might be loaded by this class //! Check if the file might be loaded by this class
/** Check might look into the file. /** Check might look into the file.
\param file File handle to check. \param file File handle to check.
\return True if file seems to be loadable. */ \return True if file seems to be loadable. */
virtual bool isALoadableFileFormat(io::IReadFile* file) const; virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! Check to see if the loader can create archives of this type. //! Check to see if the loader can create archives of this type.
/** Check based on the archive type. /** Check based on the archive type.
\param fileType The archive type to check. \param fileType The archive type to check.
\return True if the archile loader supports this type, false if not */ \return True if the archile loader supports this type, false if not */
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const;
//! Creates an archive from the filename //! Creates an archive from the filename
/** \param file File handle to check. /** \param file File handle to check.
\return Pointer to newly created archive, or 0 upon error. */ \return Pointer to newly created archive, or 0 upon error. */
virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const;
//! creates/loads an archive from the file. //! creates/loads an archive from the file.
//! \return Pointer to the created archive. Returns 0 if loading failed. //! \return Pointer to the created archive. Returns 0 if loading failed.
virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const;
//! Returns the type of archive created by this loader private:
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_NPK; } io::IFileSystem* FileSystem;
};
private:
io::IFileSystem* FileSystem;
}; //! reads from NPK
class CNPKReader : public virtual IFileArchive, virtual CFileList
{
//! reads from NPK public:
class CNPKReader : public virtual IFileArchive, virtual CFileList
{ CNPKReader(IReadFile* file, bool ignoreCase, bool ignorePaths);
public: virtual ~CNPKReader();
CNPKReader(IReadFile* file, bool ignoreCase, bool ignorePaths); // file archive methods
virtual ~CNPKReader();
//! return the id of the file Archive
// file archive methods virtual const io::path& getArchiveName() const
{
//! return the id of the file Archive return File->getFileName();
virtual const io::path& getArchiveName() const }
{
return File->getFileName(); //! opens a file by file name
} virtual IReadFile* createAndOpenFile(const io::path& filename);
//! opens a file by file name //! opens a file by index
virtual IReadFile* createAndOpenFile(const io::path& filename); virtual IReadFile* createAndOpenFile(u32 index);
//! opens a file by index //! returns the list of files
virtual IReadFile* createAndOpenFile(u32 index); virtual const IFileList* getFileList() const;
//! returns the list of files //! get the class Type
virtual const IFileList* getFileList() const; virtual E_FILE_ARCHIVE_TYPE getType() const _IRR_OVERRIDE_ { return EFAT_NPK; }
//! get the class Type private:
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_NPK; }
//! scans for a local header, returns false if the header is invalid
private: bool scanLocalHeader();
void readString(core::stringc& name);
//! scans for a local header, returns false if the header is invalid
bool scanLocalHeader(); IReadFile* File;
void readString(core::stringc& name); };
IReadFile* File; } // end namespace io
}; } // end namespace irr
} // end namespace io #endif // __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
} // end namespace irr
#endif // __C_NPK_READER_H_INCLUDED__
#endif // __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
#endif // __C_NPK_READER_H_INCLUDED__

View File

@ -618,7 +618,7 @@ namespace video
virtual void enableClipPlane(u32 index, bool enable); virtual void enableClipPlane(u32 index, bool enable);
//! Returns the graphics card vendor name. //! Returns the graphics card vendor name.
virtual core::stringc getVendorInfo() {return "Not available on this driver.";} virtual core::stringc getVendorInfo() _IRR_OVERRIDE_ {return "Not available on this driver.";}
//! Set the minimum number of vertices for which a hw buffer will be created //! Set the minimum number of vertices for which a hw buffer will be created
/** \param count Number of vertices to set as minimum. */ /** \param count Number of vertices to set as minimum. */
@ -660,7 +660,7 @@ namespace video
virtual ITexture* createRenderTargetTexture(const core::dimension2d<u32>& size, virtual ITexture* createRenderTargetTexture(const core::dimension2d<u32>& size,
const c8* name=0); const c8* name=0);
virtual bool checkDriverReset() {return false;} virtual bool checkDriverReset() _IRR_OVERRIDE_ {return false;}
protected: protected:
//! deletes all textures //! deletes all textures
@ -728,14 +728,14 @@ namespace video
{ {
SDummyTexture(const io::path& name) : ITexture(name), size(0,0) {}; SDummyTexture(const io::path& name) : ITexture(name), size(0,0) {};
virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) { return 0; }; virtual void* lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0) _IRR_OVERRIDE_ { return 0; };
virtual void unlock(){} virtual void unlock()_IRR_OVERRIDE_ {}
virtual const core::dimension2d<u32>& getOriginalSize() const { return size; } virtual const core::dimension2d<u32>& getOriginalSize() const _IRR_OVERRIDE_ { return size; }
virtual const core::dimension2d<u32>& getSize() const { return size; } virtual const core::dimension2d<u32>& getSize() const _IRR_OVERRIDE_ { return size; }
virtual E_DRIVER_TYPE getDriverType() const { return video::EDT_NULL; } virtual E_DRIVER_TYPE getDriverType() const _IRR_OVERRIDE_ { return video::EDT_NULL; }
virtual ECOLOR_FORMAT getColorFormat() const { return video::ECF_A1R5G5B5; }; virtual ECOLOR_FORMAT getColorFormat() const _IRR_OVERRIDE_ { return video::ECF_A1R5G5B5; };
virtual u32 getPitch() const { return 0; } virtual u32 getPitch() const _IRR_OVERRIDE_ { return 0; }
virtual void regenerateMipMapLevels(void* mipmapData=0) {}; virtual void regenerateMipMapLevels(void* mipmapData=0) _IRR_OVERRIDE_ {};
core::dimension2d<u32> size; core::dimension2d<u32> size;
}; };
core::array<SSurface> Textures; core::array<SSurface> Textures;

View File

@ -52,7 +52,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_OCTREE; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_OCTREE; }
//! Sets a new mesh to display //! Sets a new mesh to display
virtual void setMesh(IMesh* mesh); virtual void setMesh(IMesh* mesh);

View File

@ -1,99 +1,99 @@
// Copyright (C) 2012-2012 Patryk Nadrowski // Copyright (C) 2012-2012 Patryk Nadrowski
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__ #ifndef __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__
#define __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__ #define __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#if defined(_IRR_COMPILE_WITH_OPENGL_) && defined(_IRR_COMPILE_WITH_CG_) #if defined(_IRR_COMPILE_WITH_OPENGL_) && defined(_IRR_COMPILE_WITH_CG_)
#ifdef _IRR_WINDOWS_API_ #ifdef _IRR_WINDOWS_API_
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <GL/gl.h> #include <GL/gl.h>
#include "glext.h" #include "glext.h"
#else #else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1 #define GL_GLEXT_LEGACY 1
#else #else
#define GL_GLEXT_PROTOTYPES 1 #define GL_GLEXT_PROTOTYPES 1
#endif #endif
#if defined(_IRR_OSX_PLATFORM_) #if defined(_IRR_OSX_PLATFORM_)
#include <OpenGL/gl.h> #include <OpenGL/gl.h>
#else #else
#include <GL/gl.h> #include <GL/gl.h>
#endif #endif
#if defined(_IRR_OPENGL_USE_EXTPOINTER_) #if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h" #include "glext.h"
#endif #endif
#endif #endif
#include "CCgMaterialRenderer.h" #include "CCgMaterialRenderer.h"
#include "Cg/cgGL.h" #include "Cg/cgGL.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma comment(lib, "cgGL.lib") #pragma comment(lib, "cgGL.lib")
#endif #endif
namespace irr namespace irr
{ {
namespace video namespace video
{ {
class COpenGLDriver; class COpenGLDriver;
class IShaderConstantSetCallBack; class IShaderConstantSetCallBack;
class COpenGLCgUniformSampler2D : public CCgUniform class COpenGLCgUniformSampler2D : public CCgUniform
{ {
public: public:
COpenGLCgUniformSampler2D(const CGparameter& parameter, bool global); COpenGLCgUniformSampler2D(const CGparameter& parameter, bool global);
void update(const void* data, const SMaterial& material) const; void update(const void* data, const SMaterial& material) const;
}; };
class COpenGLCgMaterialRenderer : public CCgMaterialRenderer class COpenGLCgMaterialRenderer : public CCgMaterialRenderer
{ {
public: public:
COpenGLCgMaterialRenderer(COpenGLDriver* driver, s32& materialType, COpenGLCgMaterialRenderer(COpenGLDriver* driver, s32& materialType,
const c8* vertexProgram = 0, const c8* vertexEntry = "main", const c8* vertexProgram = 0, const c8* vertexEntry = "main",
E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1,
const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", const c8* fragmentProgram = 0, const c8* fragmentEntry = "main",
E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1,
const c8* geometryProgram = 0, const c8* geometryEntry = "main", const c8* geometryProgram = 0, const c8* geometryEntry = "main",
E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 vertices = 0, IShaderConstantSetCallBack* callback = 0, u32 vertices = 0, IShaderConstantSetCallBack* callback = 0,
IMaterialRenderer* baseMaterial = 0, s32 userData = 0); IMaterialRenderer* baseMaterial = 0, s32 userData = 0);
virtual ~COpenGLCgMaterialRenderer(); virtual ~COpenGLCgMaterialRenderer();
virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services); virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services);
virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype); virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype);
virtual void OnUnsetMaterial(); virtual void OnUnsetMaterial();
virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates); virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates);
virtual IVideoDriver* getVideoDriver(); virtual IVideoDriver* getVideoDriver();
protected: protected:
void init(s32& materialType, void init(s32& materialType,
const c8* vertexProgram = 0, const c8* vertexEntry = "main", const c8* vertexProgram = 0, const c8* vertexEntry = "main",
E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1,
const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", const c8* fragmentProgram = 0, const c8* fragmentEntry = "main",
E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1,
const c8* geometryProgram = 0, const c8* geometryEntry = "main", const c8* geometryProgram = 0, const c8* geometryEntry = "main",
E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0,
scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
u32 vertices = 0); u32 vertices = 0);
COpenGLDriver* Driver; COpenGLDriver* Driver;
}; };
} }
} }
#endif #endif
#endif #endif

View File

@ -399,7 +399,7 @@ namespace video
virtual void enableMaterial2D(bool enable=true); virtual void enableMaterial2D(bool enable=true);
//! Returns the graphics card vendor name. //! Returns the graphics card vendor name.
virtual core::stringc getVendorInfo() {return VendorName;} virtual core::stringc getVendorInfo() _IRR_OVERRIDE_ {return VendorName;}
//! Returns the maximum texture size supported. //! Returns the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const; virtual core::dimension2du getMaxTextureSize() const;

View File

@ -35,7 +35,7 @@ public:
//! Returns the render capability of the material. //! Returns the render capability of the material.
virtual s32 getRenderCapability() const; virtual s32 getRenderCapability() const;
virtual void OnSetMaterial(const SMaterial& material) { } virtual void OnSetMaterial(const SMaterial& material) _IRR_OVERRIDE_ { }
virtual void OnSetMaterial(const video::SMaterial& material, virtual void OnSetMaterial(const video::SMaterial& material,
const video::SMaterial& lastMaterial, const video::SMaterial& lastMaterial,
bool resetAllRenderstates, video::IMaterialRendererServices* services); bool resetAllRenderstates, video::IMaterialRendererServices* services);

View File

@ -71,9 +71,6 @@ namespace io
//! \return Pointer to the created archive. Returns 0 if loading failed. //! \return Pointer to the created archive. Returns 0 if loading failed.
virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const;
//! Returns the type of archive created by this loader
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_PAK; }
private: private:
io::IFileSystem* FileSystem; io::IFileSystem* FileSystem;
}; };
@ -105,7 +102,7 @@ namespace io
virtual const IFileList* getFileList() const; virtual const IFileList* getFileList() const;
//! get the class Type //! get the class Type
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_PAK; } virtual E_FILE_ARCHIVE_TYPE getType() const _IRR_OVERRIDE_ { return EFAT_PAK; }
private: private:

View File

@ -45,87 +45,87 @@ public:
virtual void setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node ); virtual void setAnimatedMeshSceneNode( IAnimatedMeshSceneNode* node );
//! Set whether to use vertex normal for direction, or direction specified //! Set whether to use vertex normal for direction, or direction specified
virtual void setUseNormalDirection( bool useNormalDirection ) { UseNormalDirection = useNormalDirection; } virtual void setUseNormalDirection( bool useNormalDirection ) _IRR_OVERRIDE_ { UseNormalDirection = useNormalDirection; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set the amount that the normal is divided by for getting a particles direction //! Set the amount that the normal is divided by for getting a particles direction
virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) { NormalDirectionModifier = normalDirectionModifier; } virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) _IRR_OVERRIDE_ { NormalDirectionModifier = normalDirectionModifier; }
//! Sets whether to emit min<->max particles for every vertex per second, or to pick //! Sets whether to emit min<->max particles for every vertex per second, or to pick
//! min<->max vertices every second //! min<->max vertices every second
virtual void setEveryMeshVertex( bool everyMeshVertex ) { EveryMeshVertex = everyMeshVertex; } virtual void setEveryMeshVertex( bool everyMeshVertex ) _IRR_OVERRIDE_ { EveryMeshVertex = everyMeshVertex; }
//! Set minimum number of particles the emitter emits per second //! Set minimum number of particles the emitter emits per second
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set maximum number of particles the emitter emits per second //! Set maximum number of particles the emitter emits per second
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set minimum starting color for particles //! Set minimum starting color for particles
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set maximum starting color for particles //! Set maximum starting color for particles
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; }
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; }
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Maximal random derivation from the direction //! Maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Get Mesh we're emitting particles from //! Get Mesh we're emitting particles from
virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const { return Node; } virtual const IAnimatedMeshSceneNode* getAnimatedMeshSceneNode() const _IRR_OVERRIDE_ { return Node; }
//! Get whether to use vertex normal for direciton, or direction specified //! Get whether to use vertex normal for direciton, or direction specified
virtual bool isUsingNormalDirection() const { return UseNormalDirection; } virtual bool isUsingNormalDirection() const _IRR_OVERRIDE_ { return UseNormalDirection; }
//! Get direction the emitter emits particles //! Get direction the emitter emits particles
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Get the amount that the normal is divided by for getting a particles direction //! Get the amount that the normal is divided by for getting a particles direction
virtual f32 getNormalDirectionModifier() const { return NormalDirectionModifier; } virtual f32 getNormalDirectionModifier() const _IRR_OVERRIDE_ { return NormalDirectionModifier; }
//! Gets whether to emit min<->max particles for every vertex per second, or to pick //! Gets whether to emit min<->max particles for every vertex per second, or to pick
//! min<->max vertices every second //! min<->max vertices every second
virtual bool getEveryMeshVertex() const { return EveryMeshVertex; } virtual bool getEveryMeshVertex() const _IRR_OVERRIDE_ { return EveryMeshVertex; }
//! Get the minimum number of particles the emitter emits per second //! Get the minimum number of particles the emitter emits per second
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Get the maximum number of particles the emitter emits per second //! Get the maximum number of particles the emitter emits per second
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Get the minimum starting color for particles //! Get the minimum starting color for particles
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Get the maximum starting color for particles //! Get the maximum starting color for particles
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Get the maximum starting size for particles //! Get the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Get the minimum starting size for particles //! Get the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Maximal random derivation from the direction //! Maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
private: private:

View File

@ -26,40 +26,40 @@ public:
virtual void affect(u32 now, SParticle* particlearray, u32 count); virtual void affect(u32 now, SParticle* particlearray, u32 count);
//! Set the point that particles will attract to //! Set the point that particles will attract to
virtual void setPoint( const core::vector3df& point ) { Point = point; } virtual void setPoint( const core::vector3df& point ) _IRR_OVERRIDE_ { Point = point; }
//! Set the speed, in game units per second that the particles will attract to the specified point //! Set the speed, in game units per second that the particles will attract to the specified point
virtual void setSpeed( f32 speed ) { Speed = speed; } virtual void setSpeed( f32 speed ) _IRR_OVERRIDE_ { Speed = speed; }
//! Set whether or not the particles are attracting or detracting //! Set whether or not the particles are attracting or detracting
virtual void setAttract( bool attract ) { Attract = attract; } virtual void setAttract( bool attract ) _IRR_OVERRIDE_ { Attract = attract; }
//! Set whether or not this will affect particles in the X direction //! Set whether or not this will affect particles in the X direction
virtual void setAffectX( bool affect ) { AffectX = affect; } virtual void setAffectX( bool affect ) _IRR_OVERRIDE_ { AffectX = affect; }
//! Set whether or not this will affect particles in the Y direction //! Set whether or not this will affect particles in the Y direction
virtual void setAffectY( bool affect ) { AffectY = affect; } virtual void setAffectY( bool affect ) _IRR_OVERRIDE_ { AffectY = affect; }
//! Set whether or not this will affect particles in the Z direction //! Set whether or not this will affect particles in the Z direction
virtual void setAffectZ( bool affect ) { AffectZ = affect; } virtual void setAffectZ( bool affect ) _IRR_OVERRIDE_ { AffectZ = affect; }
//! Get the point that particles are attracted to //! Get the point that particles are attracted to
virtual const core::vector3df& getPoint() const { return Point; } virtual const core::vector3df& getPoint() const _IRR_OVERRIDE_ { return Point; }
//! Get the speed that points attract to the specified point //! Get the speed that points attract to the specified point
virtual f32 getSpeed() const { return Speed; } virtual f32 getSpeed() const _IRR_OVERRIDE_ { return Speed; }
//! Get whether or not the particles are attracting or detracting //! Get whether or not the particles are attracting or detracting
virtual bool getAttract() const { return Attract; } virtual bool getAttract() const _IRR_OVERRIDE_ { return Attract; }
//! Get whether or not the particles X position are affected //! Get whether or not the particles X position are affected
virtual bool getAffectX() const { return AffectX; } virtual bool getAffectX() const _IRR_OVERRIDE_ { return AffectX; }
//! Get whether or not the particles Y position are affected //! Get whether or not the particles Y position are affected
virtual bool getAffectY() const { return AffectY; } virtual bool getAffectY() const _IRR_OVERRIDE_ { return AffectY; }
//! Get whether or not the particles Z position are affected //! Get whether or not the particles Z position are affected
virtual bool getAffectZ() const { return AffectZ; } virtual bool getAffectZ() const _IRR_OVERRIDE_ { return AffectZ; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -39,70 +39,70 @@ public:
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray);
//! Set direction the emitter emits particles. //! Set direction the emitter emits particles.
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set minimum number of particles emitted per second. //! Set minimum number of particles emitted per second.
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set maximum number of particles emitted per second. //! Set maximum number of particles emitted per second.
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set minimum start color. //! Set minimum start color.
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set maximum start color. //! Set maximum start color.
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; }; virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; };
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; }; virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; };
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Maximal random derivation from the direction //! Maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Set box from which the particles are emitted. //! Set box from which the particles are emitted.
virtual void setBox( const core::aabbox3df& box ) { Box = box; } virtual void setBox( const core::aabbox3df& box ) _IRR_OVERRIDE_ { Box = box; }
//! Gets direction the emitter emits particles. //! Gets direction the emitter emits particles.
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Gets minimum number of particles emitted per second. //! Gets minimum number of particles emitted per second.
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Gets maximum number of particles emitted per second. //! Gets maximum number of particles emitted per second.
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Gets minimum start color. //! Gets minimum start color.
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Gets maximum start color. //! Gets maximum start color.
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Gets the maximum starting size for particles //! Gets the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Gets the minimum starting size for particles //! Gets the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Maximal random derivation from the direction //! Maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
//! Get box from which the particles are emitted. //! Get box from which the particles are emitted.
virtual const core::aabbox3df& getBox() const { return Box; } virtual const core::aabbox3df& getBox() const _IRR_OVERRIDE_ { return Box; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -39,94 +39,94 @@ public:
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray);
//! Set the center of the radius for the cylinder, at one end of the cylinder //! Set the center of the radius for the cylinder, at one end of the cylinder
virtual void setCenter( const core::vector3df& center ) { Center = center; } virtual void setCenter( const core::vector3df& center ) _IRR_OVERRIDE_ { Center = center; }
//! Set the normal of the cylinder //! Set the normal of the cylinder
virtual void setNormal( const core::vector3df& normal ) { Normal = normal; } virtual void setNormal( const core::vector3df& normal ) _IRR_OVERRIDE_ { Normal = normal; }
//! Set the radius of the cylinder //! Set the radius of the cylinder
virtual void setRadius( f32 radius ) { Radius = radius; } virtual void setRadius( f32 radius ) _IRR_OVERRIDE_ { Radius = radius; }
//! Set the length of the cylinder //! Set the length of the cylinder
virtual void setLength( f32 length ) { Length = length; } virtual void setLength( f32 length ) _IRR_OVERRIDE_ { Length = length; }
//! Set whether or not to draw points inside the cylinder //! Set whether or not to draw points inside the cylinder
virtual void setOutlineOnly( bool outlineOnly ) { OutlineOnly = outlineOnly; } virtual void setOutlineOnly( bool outlineOnly ) _IRR_OVERRIDE_ { OutlineOnly = outlineOnly; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; }
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; }
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Maximal random derivation from the direction //! Maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Get the center of the cylinder //! Get the center of the cylinder
virtual const core::vector3df& getCenter() const { return Center; } virtual const core::vector3df& getCenter() const _IRR_OVERRIDE_ { return Center; }
//! Get the normal of the cylinder //! Get the normal of the cylinder
virtual const core::vector3df& getNormal() const { return Normal; } virtual const core::vector3df& getNormal() const _IRR_OVERRIDE_ { return Normal; }
//! Get the radius of the cylinder //! Get the radius of the cylinder
virtual f32 getRadius() const { return Radius; } virtual f32 getRadius() const _IRR_OVERRIDE_ { return Radius; }
//! Get the center of the cylinder //! Get the center of the cylinder
virtual f32 getLength() const { return Length; } virtual f32 getLength() const _IRR_OVERRIDE_ { return Length; }
//! Get whether or not to draw points inside the cylinder //! Get whether or not to draw points inside the cylinder
virtual bool getOutlineOnly() const { return OutlineOnly; } virtual bool getOutlineOnly() const _IRR_OVERRIDE_ { return OutlineOnly; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Gets the maximum starting size for particles //! Gets the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Gets the minimum starting size for particles //! Gets the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Maximal random derivation from the direction //! Maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -25,17 +25,17 @@ public:
//! Sets the targetColor, i.e. the color the particles will interpolate //! Sets the targetColor, i.e. the color the particles will interpolate
//! to over time. //! to over time.
virtual void setTargetColor( const video::SColor& targetColor ) { TargetColor = targetColor; } virtual void setTargetColor( const video::SColor& targetColor ) _IRR_OVERRIDE_ { TargetColor = targetColor; }
//! Sets the amount of time it takes for each particle to fade out. //! Sets the amount of time it takes for each particle to fade out.
virtual void setFadeOutTime( u32 fadeOutTime ) { FadeOutTime = fadeOutTime ? static_cast<f32>(fadeOutTime) : 1.0f; } virtual void setFadeOutTime( u32 fadeOutTime ) _IRR_OVERRIDE_ { FadeOutTime = fadeOutTime ? static_cast<f32>(fadeOutTime) : 1.0f; }
//! Sets the targetColor, i.e. the color the particles will interpolate //! Sets the targetColor, i.e. the color the particles will interpolate
//! to over time. //! to over time.
virtual const video::SColor& getTargetColor() const { return TargetColor; } virtual const video::SColor& getTargetColor() const _IRR_OVERRIDE_ { return TargetColor; }
//! Sets the amount of time it takes for each particle to fade out. //! Sets the amount of time it takes for each particle to fade out.
virtual u32 getFadeOutTime() const { return static_cast<u32>(FadeOutTime); } virtual u32 getFadeOutTime() const _IRR_OVERRIDE_ { return static_cast<u32>(FadeOutTime); }
//! Writes attributes of the object. //! Writes attributes of the object.
//! Implement this to expose the attributes of your scene node animator for //! Implement this to expose the attributes of your scene node animator for

View File

@ -27,17 +27,17 @@ public:
//! Set the time in milliseconds when the gravity force is totally //! Set the time in milliseconds when the gravity force is totally
//! lost and the particle does not move any more. //! lost and the particle does not move any more.
virtual void setTimeForceLost( f32 timeForceLost ) { TimeForceLost = timeForceLost; } virtual void setTimeForceLost( f32 timeForceLost ) _IRR_OVERRIDE_ { TimeForceLost = timeForceLost; }
//! Set the direction and force of gravity. //! Set the direction and force of gravity.
virtual void setGravity( const core::vector3df& gravity ) { Gravity = gravity; } virtual void setGravity( const core::vector3df& gravity ) _IRR_OVERRIDE_ { Gravity = gravity; }
//! Set the time in milliseconds when the gravity force is totally //! Set the time in milliseconds when the gravity force is totally
//! lost and the particle does not move any more. //! lost and the particle does not move any more.
virtual f32 getTimeForceLost() const { return TimeForceLost; } virtual f32 getTimeForceLost() const _IRR_OVERRIDE_ { return TimeForceLost; }
//! Set the direction and force of gravity. //! Set the direction and force of gravity.
virtual const core::vector3df& getGravity() const { return Gravity; } virtual const core::vector3df& getGravity() const _IRR_OVERRIDE_ { return Gravity; }
//! Writes attributes of the object. //! Writes attributes of the object.
//! Implement this to expose the attributes of your scene node animator for //! Implement this to expose the attributes of your scene node animator for

View File

@ -46,87 +46,87 @@ public:
virtual void setMesh( IMesh* mesh ); virtual void setMesh( IMesh* mesh );
//! Set whether to use vertex normal for direction, or direction specified //! Set whether to use vertex normal for direction, or direction specified
virtual void setUseNormalDirection( bool useNormalDirection ) { UseNormalDirection = useNormalDirection; } virtual void setUseNormalDirection( bool useNormalDirection ) _IRR_OVERRIDE_ { UseNormalDirection = useNormalDirection; }
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set the amount that the normal is divided by for getting a particles direction //! Set the amount that the normal is divided by for getting a particles direction
virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) { NormalDirectionModifier = normalDirectionModifier; } virtual void setNormalDirectionModifier( f32 normalDirectionModifier ) _IRR_OVERRIDE_ { NormalDirectionModifier = normalDirectionModifier; }
//! Sets whether to emit min<->max particles for every vertex per second, or to pick //! Sets whether to emit min<->max particles for every vertex per second, or to pick
//! min<->max vertices every second //! min<->max vertices every second
virtual void setEveryMeshVertex( bool everyMeshVertex ) { EveryMeshVertex = everyMeshVertex; } virtual void setEveryMeshVertex( bool everyMeshVertex ) _IRR_OVERRIDE_ { EveryMeshVertex = everyMeshVertex; }
//! Set minimum number of particles the emitter emits per second //! Set minimum number of particles the emitter emits per second
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set maximum number of particles the emitter emits per second //! Set maximum number of particles the emitter emits per second
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set minimum starting color for particles //! Set minimum starting color for particles
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set maximum starting color for particles //! Set maximum starting color for particles
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; }
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; }
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Set maximal random derivation from the direction //! Set maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Get Mesh we're emitting particles from //! Get Mesh we're emitting particles from
virtual const IMesh* getMesh() const { return Mesh; } virtual const IMesh* getMesh() const _IRR_OVERRIDE_ { return Mesh; }
//! Get whether to use vertex normal for direciton, or direction specified //! Get whether to use vertex normal for direciton, or direction specified
virtual bool isUsingNormalDirection() const { return UseNormalDirection; } virtual bool isUsingNormalDirection() const _IRR_OVERRIDE_ { return UseNormalDirection; }
//! Get direction the emitter emits particles //! Get direction the emitter emits particles
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Get the amount that the normal is divided by for getting a particles direction //! Get the amount that the normal is divided by for getting a particles direction
virtual f32 getNormalDirectionModifier() const { return NormalDirectionModifier; } virtual f32 getNormalDirectionModifier() const _IRR_OVERRIDE_ { return NormalDirectionModifier; }
//! Gets whether to emit min<->max particles for every vertex per second, or to pick //! Gets whether to emit min<->max particles for every vertex per second, or to pick
//! min<->max vertices every second //! min<->max vertices every second
virtual bool getEveryMeshVertex() const { return EveryMeshVertex; } virtual bool getEveryMeshVertex() const _IRR_OVERRIDE_ { return EveryMeshVertex; }
//! Get the minimum number of particles the emitter emits per second //! Get the minimum number of particles the emitter emits per second
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Get the maximum number of particles the emitter emits per second //! Get the maximum number of particles the emitter emits per second
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Get the minimum starting color for particles //! Get the minimum starting color for particles
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Get the maximum starting color for particles //! Get the maximum starting color for particles
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Gets the maximum starting size for particles //! Gets the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Gets the minimum starting size for particles //! Gets the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Get maximal random derivation from the direction //! Get maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
private: private:

View File

@ -36,64 +36,64 @@ public:
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray);
//! Set direction the emitter emits particles. //! Set direction the emitter emits particles.
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set minimum number of particles emitted per second. //! Set minimum number of particles emitted per second.
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set maximum number of particles emitted per second. //! Set maximum number of particles emitted per second.
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set minimum start color. //! Set minimum start color.
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set maximum start color. //! Set maximum start color.
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; }
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; }
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Set maximal random derivation from the direction //! Set maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Gets direction the emitter emits particles. //! Gets direction the emitter emits particles.
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Gets minimum number of particles emitted per second. //! Gets minimum number of particles emitted per second.
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Gets maximum number of particles emitted per second. //! Gets maximum number of particles emitted per second.
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Gets minimum start color. //! Gets minimum start color.
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Gets maximum start color. //! Gets maximum start color.
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Gets the maximum starting size for particles //! Gets the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Gets the minimum starting size for particles //! Gets the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Get maximal random derivation from the direction //! Get maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -38,82 +38,82 @@ public:
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray);
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set minimum number of particles the emitter emits per second //! Set minimum number of particles the emitter emits per second
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set maximum number of particles the emitter emits per second //! Set maximum number of particles the emitter emits per second
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set minimum starting color for particles //! Set minimum starting color for particles
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set maximum starting color for particles //! Set maximum starting color for particles
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; }
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; }
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Set maximal random derivation from the direction //! Set maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Set the center of the ring //! Set the center of the ring
virtual void setCenter( const core::vector3df& center ) { Center = center; } virtual void setCenter( const core::vector3df& center ) _IRR_OVERRIDE_ { Center = center; }
//! Set the radius of the ring //! Set the radius of the ring
virtual void setRadius( f32 radius ) { Radius = radius; } virtual void setRadius( f32 radius ) _IRR_OVERRIDE_ { Radius = radius; }
//! Set the thickness of the ring //! Set the thickness of the ring
virtual void setRingThickness( f32 ringThickness ) { RingThickness = ringThickness; } virtual void setRingThickness( f32 ringThickness ) _IRR_OVERRIDE_ { RingThickness = ringThickness; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Gets the minimum number of particles the emitter emits per second //! Gets the minimum number of particles the emitter emits per second
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Gets the maximum number of particles the emitter emits per second //! Gets the maximum number of particles the emitter emits per second
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Gets the minimum starting color for particles //! Gets the minimum starting color for particles
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Gets the maximum starting color for particles //! Gets the maximum starting color for particles
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Gets the maximum starting size for particles //! Gets the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Gets the minimum starting size for particles //! Gets the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Get maximal random derivation from the direction //! Get maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
//! Get the center of the ring //! Get the center of the ring
virtual const core::vector3df& getCenter() const { return Center; } virtual const core::vector3df& getCenter() const _IRR_OVERRIDE_ { return Center; }
//! Get the radius of the ring //! Get the radius of the ring
virtual f32 getRadius() const { return Radius; } virtual f32 getRadius() const _IRR_OVERRIDE_ { return Radius; }
//! Get the thickness of the ring //! Get the thickness of the ring
virtual f32 getRingThickness() const { return RingThickness; } virtual f32 getRingThickness() const _IRR_OVERRIDE_ { return RingThickness; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -24,16 +24,16 @@ public:
virtual void affect(u32 now, SParticle* particlearray, u32 count); virtual void affect(u32 now, SParticle* particlearray, u32 count);
//! Set the point that particles will attract to //! Set the point that particles will attract to
virtual void setPivotPoint( const core::vector3df& point ) { PivotPoint = point; } virtual void setPivotPoint( const core::vector3df& point ) _IRR_OVERRIDE_ { PivotPoint = point; }
//! Set the speed in degrees per second //! Set the speed in degrees per second
virtual void setSpeed( const core::vector3df& speed ) { Speed = speed; } virtual void setSpeed( const core::vector3df& speed ) _IRR_OVERRIDE_ { Speed = speed; }
//! Get the point that particles are attracted to //! Get the point that particles are attracted to
virtual const core::vector3df& getPivotPoint() const { return PivotPoint; } virtual const core::vector3df& getPivotPoint() const _IRR_OVERRIDE_ { return PivotPoint; }
//! Get the speed in degrees per second //! Get the speed in degrees per second
virtual const core::vector3df& getSpeed() const { return Speed; } virtual const core::vector3df& getSpeed() const _IRR_OVERRIDE_ { return Speed; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -38,76 +38,76 @@ public:
virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray); virtual s32 emitt(u32 now, u32 timeSinceLastCall, SParticle*& outArray);
//! Set direction the emitter emits particles //! Set direction the emitter emits particles
virtual void setDirection( const core::vector3df& newDirection ) { Direction = newDirection; } virtual void setDirection( const core::vector3df& newDirection ) _IRR_OVERRIDE_ { Direction = newDirection; }
//! Set minimum number of particles per second. //! Set minimum number of particles per second.
virtual void setMinParticlesPerSecond( u32 minPPS ) { MinParticlesPerSecond = minPPS; } virtual void setMinParticlesPerSecond( u32 minPPS ) _IRR_OVERRIDE_ { MinParticlesPerSecond = minPPS; }
//! Set maximum number of particles per second. //! Set maximum number of particles per second.
virtual void setMaxParticlesPerSecond( u32 maxPPS ) { MaxParticlesPerSecond = maxPPS; } virtual void setMaxParticlesPerSecond( u32 maxPPS ) _IRR_OVERRIDE_ { MaxParticlesPerSecond = maxPPS; }
//! Set minimum start color //! Set minimum start color
virtual void setMinStartColor( const video::SColor& color ) { MinStartColor = color; } virtual void setMinStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MinStartColor = color; }
//! Set maximum start color //! Set maximum start color
virtual void setMaxStartColor( const video::SColor& color ) { MaxStartColor = color; } virtual void setMaxStartColor( const video::SColor& color ) _IRR_OVERRIDE_ { MaxStartColor = color; }
//! Set the maximum starting size for particles //! Set the maximum starting size for particles
virtual void setMaxStartSize( const core::dimension2df& size ) { MaxStartSize = size; } virtual void setMaxStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MaxStartSize = size; }
//! Set the minimum starting size for particles //! Set the minimum starting size for particles
virtual void setMinStartSize( const core::dimension2df& size ) { MinStartSize = size; } virtual void setMinStartSize( const core::dimension2df& size ) _IRR_OVERRIDE_ { MinStartSize = size; }
//! Set the minimum particle life-time in milliseconds //! Set the minimum particle life-time in milliseconds
virtual void setMinLifeTime( u32 lifeTimeMin ) { MinLifeTime = lifeTimeMin; } virtual void setMinLifeTime( u32 lifeTimeMin ) _IRR_OVERRIDE_ { MinLifeTime = lifeTimeMin; }
//! Set the maximum particle life-time in milliseconds //! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) { MaxLifeTime = lifeTimeMax; } virtual void setMaxLifeTime( u32 lifeTimeMax ) _IRR_OVERRIDE_ { MaxLifeTime = lifeTimeMax; }
//! Set maximal random derivation from the direction //! Set maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) { MaxAngleDegrees = maxAngleDegrees; } virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) _IRR_OVERRIDE_ { MaxAngleDegrees = maxAngleDegrees; }
//! Set the center of the sphere for particle emissions //! Set the center of the sphere for particle emissions
virtual void setCenter( const core::vector3df& center ) { Center = center; } virtual void setCenter( const core::vector3df& center ) _IRR_OVERRIDE_ { Center = center; }
//! Set the radius of the sphere for particle emissions //! Set the radius of the sphere for particle emissions
virtual void setRadius( f32 radius ) { Radius = radius; } virtual void setRadius( f32 radius ) _IRR_OVERRIDE_ { Radius = radius; }
//! Gets direction the emitter emits particles //! Gets direction the emitter emits particles
virtual const core::vector3df& getDirection() const { return Direction; } virtual const core::vector3df& getDirection() const _IRR_OVERRIDE_ { return Direction; }
//! Get minimum number of particles per second. //! Get minimum number of particles per second.
virtual u32 getMinParticlesPerSecond() const { return MinParticlesPerSecond; } virtual u32 getMinParticlesPerSecond() const _IRR_OVERRIDE_ { return MinParticlesPerSecond; }
//! Get maximum number of particles per second. //! Get maximum number of particles per second.
virtual u32 getMaxParticlesPerSecond() const { return MaxParticlesPerSecond; } virtual u32 getMaxParticlesPerSecond() const _IRR_OVERRIDE_ { return MaxParticlesPerSecond; }
//! Get minimum start color //! Get minimum start color
virtual const video::SColor& getMinStartColor() const { return MinStartColor; } virtual const video::SColor& getMinStartColor() const _IRR_OVERRIDE_ { return MinStartColor; }
//! Get maximum start color //! Get maximum start color
virtual const video::SColor& getMaxStartColor() const { return MaxStartColor; } virtual const video::SColor& getMaxStartColor() const _IRR_OVERRIDE_ { return MaxStartColor; }
//! Gets the maximum starting size for particles //! Gets the maximum starting size for particles
virtual const core::dimension2df& getMaxStartSize() const { return MaxStartSize; } virtual const core::dimension2df& getMaxStartSize() const _IRR_OVERRIDE_ { return MaxStartSize; }
//! Gets the minimum starting size for particles //! Gets the minimum starting size for particles
virtual const core::dimension2df& getMinStartSize() const { return MinStartSize; } virtual const core::dimension2df& getMinStartSize() const _IRR_OVERRIDE_ { return MinStartSize; }
//! Get the minimum particle life-time in milliseconds //! Get the minimum particle life-time in milliseconds
virtual u32 getMinLifeTime() const { return MinLifeTime; } virtual u32 getMinLifeTime() const _IRR_OVERRIDE_ { return MinLifeTime; }
//! Get the maximum particle life-time in milliseconds //! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const { return MaxLifeTime; } virtual u32 getMaxLifeTime() const _IRR_OVERRIDE_ { return MaxLifeTime; }
//! Get maximal random derivation from the direction //! Get maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const { return MaxAngleDegrees; } virtual s32 getMaxAngleDegrees() const _IRR_OVERRIDE_ { return MaxAngleDegrees; }
//! Get the center of the sphere for particle emissions //! Get the center of the sphere for particle emissions
virtual const core::vector3df& getCenter() const { return Center; } virtual const core::vector3df& getCenter() const _IRR_OVERRIDE_ { return Center; }
//! Get the radius of the sphere for particle emissions //! Get the radius of the sphere for particle emissions
virtual f32 getRadius() const { return Radius; } virtual f32 getRadius() const _IRR_OVERRIDE_ { return Radius; }
//! Writes attributes of the object. //! Writes attributes of the object.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;

View File

@ -205,7 +205,7 @@ public:
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_PARTICLE_SYSTEM; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_PARTICLE_SYSTEM; }
private: private:

View File

@ -40,12 +40,12 @@ public:
virtual video::SMaterial& getMaterial(u32 i); virtual video::SMaterial& getMaterial(u32 i);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_Q3SHADER_SCENE_NODE; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_Q3SHADER_SCENE_NODE; }
virtual void setMesh(IMesh* mesh){} virtual void setMesh(IMesh* mesh)_IRR_OVERRIDE_ {}
virtual IMesh* getMesh() { return Mesh; } virtual IMesh* getMesh() _IRR_OVERRIDE_ { return Mesh; }
virtual void setReadOnlyMaterials(bool readonly) {} virtual void setReadOnlyMaterials(bool readonly) _IRR_OVERRIDE_ {}
virtual bool isReadOnlyMaterials() const { return true; } virtual bool isReadOnlyMaterials() const _IRR_OVERRIDE_ { return true; }
//! Creates shadow volume scene node as child of this node //! Creates shadow volume scene node as child of this node
//! and returns a pointer to it. //! and returns a pointer to it.

View File

@ -1,67 +1,67 @@
// Copyright (C) 2010-2012 Gaz Davidson // Copyright (C) 2010-2012 Gaz Davidson
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_SMF_MESH_LOADER_H_INCLUDED__ #ifndef __C_SMF_MESH_LOADER_H_INCLUDED__
#define __C_SMF_MESH_LOADER_H_INCLUDED__ #define __C_SMF_MESH_LOADER_H_INCLUDED__
#include "IMeshLoader.h" #include "IMeshLoader.h"
#include "SMesh.h" #include "SMesh.h"
namespace irr namespace irr
{ {
namespace video namespace video
{ {
class IVideoDriver; class IVideoDriver;
} }
namespace scene namespace scene
{ {
//! Class which can load //! Class which can load
class CSMFMeshFileLoader : public virtual IMeshLoader class CSMFMeshFileLoader : public virtual IMeshLoader
{ {
public: public:
CSMFMeshFileLoader(video::IVideoDriver* driver); CSMFMeshFileLoader(video::IVideoDriver* driver);
//! Returns true if the file might be loaded by this class. //! Returns true if the file might be loaded by this class.
virtual bool isALoadableFileExtension(const io::path& filename) const; virtual bool isALoadableFileExtension(const io::path& filename) const;
//! Creates/loads an animated mesh from the file. //! Creates/loads an animated mesh from the file.
virtual IAnimatedMesh* createMesh(io::IReadFile* file); virtual IAnimatedMesh* createMesh(io::IReadFile* file);
private: private:
void loadLimb(io::IReadFile* file, scene::SMesh* mesh, const core::matrix4 &parentTransformation); void loadLimb(io::IReadFile* file, scene::SMesh* mesh, const core::matrix4 &parentTransformation);
video::IVideoDriver* Driver; video::IVideoDriver* Driver;
}; };
} // end namespace scene } // end namespace scene
namespace io namespace io
{ {
class BinaryFile class BinaryFile
{ {
public: public:
//! reads most types from the given file, moving the file pointer along //! reads most types from the given file, moving the file pointer along
template <class T> template <class T>
static void read(io::IReadFile* file, T &out, bool bigEndian=false); static void read(io::IReadFile* file, T &out, bool bigEndian=false);
//! reads a 3d vector from the file, moving the file pointer along //! reads a 3d vector from the file, moving the file pointer along
static void read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian=false); static void read(io::IReadFile* file, core::vector3df &outVector2d, bool bigEndian=false);
//! reads a 2d vector from the file, moving the file pointer along //! reads a 2d vector from the file, moving the file pointer along
static void read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian=false); static void read(io::IReadFile* file, core::vector2df &outVector2d, bool bigEndian=false);
//! reads a null terminated string from the file, moving the file pointer along //! reads a null terminated string from the file, moving the file pointer along
static void read(io::IReadFile* file, core::stringc &outString, bool bigEndian=false); static void read(io::IReadFile* file, core::stringc &outString, bool bigEndian=false);
}; };
} }
} // end namespace irr } // end namespace irr
#endif // __C_SMF_MESH_LOADER_H_INCLUDED__ #endif // __C_SMF_MESH_LOADER_H_INCLUDED__

View File

@ -1,83 +1,83 @@
// Copyright (C) 2010-2012 Nikolaus Gebhardt // Copyright (C) 2010-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_SCENE_LOADER_IRR_H_INCLUDED__ #ifndef __C_SCENE_LOADER_IRR_H_INCLUDED__
#define __C_SCENE_LOADER_IRR_H_INCLUDED__ #define __C_SCENE_LOADER_IRR_H_INCLUDED__
#include "ISceneLoader.h" #include "ISceneLoader.h"
#include "IXMLReader.h" #include "IXMLReader.h"
namespace irr namespace irr
{ {
namespace io namespace io
{ {
class IFileSystem; class IFileSystem;
} }
namespace scene namespace scene
{ {
class ISceneManager; class ISceneManager;
//! Class which can load a scene into the scene manager. //! Class which can load a scene into the scene manager.
class CSceneLoaderIrr : public virtual ISceneLoader class CSceneLoaderIrr : public virtual ISceneLoader
{ {
public: public:
//! Constructor //! Constructor
CSceneLoaderIrr(ISceneManager *smgr, io::IFileSystem* fs); CSceneLoaderIrr(ISceneManager *smgr, io::IFileSystem* fs);
//! Destructor //! Destructor
virtual ~CSceneLoaderIrr(); virtual ~CSceneLoaderIrr();
//! Returns true if the class might be able to load this file. //! Returns true if the class might be able to load this file.
virtual bool isALoadableFileExtension(const io::path& filename) const; virtual bool isALoadableFileExtension(const io::path& filename) const;
//! Returns true if the class might be able to load this file. //! Returns true if the class might be able to load this file.
virtual bool isALoadableFileFormat(io::IReadFile *file) const; virtual bool isALoadableFileFormat(io::IReadFile *file) const;
//! Loads the scene into the scene manager. //! Loads the scene into the scene manager.
virtual bool loadScene(io::IReadFile* file, virtual bool loadScene(io::IReadFile* file,
ISceneUserDataSerializer* userDataSerializer=0, ISceneUserDataSerializer* userDataSerializer=0,
ISceneNode* rootNode=0); ISceneNode* rootNode=0);
private: private:
//! Recursively reads nodes from the xml file //! Recursively reads nodes from the xml file
void readSceneNode(io::IXMLReader* reader, ISceneNode* parent, void readSceneNode(io::IXMLReader* reader, ISceneNode* parent,
ISceneUserDataSerializer* userDataSerializer); ISceneUserDataSerializer* userDataSerializer);
//! read a node's materials //! read a node's materials
void readMaterials(io::IXMLReader* reader, ISceneNode* node); void readMaterials(io::IXMLReader* reader, ISceneNode* node);
//! read a node's animators //! read a node's animators
void readAnimators(io::IXMLReader* reader, ISceneNode* node); void readAnimators(io::IXMLReader* reader, ISceneNode* node);
//! read any other data into the user serializer //! read any other data into the user serializer
void readUserData(io::IXMLReader* reader, ISceneNode* node, void readUserData(io::IXMLReader* reader, ISceneNode* node,
ISceneUserDataSerializer* userDataSerializer); ISceneUserDataSerializer* userDataSerializer);
ISceneManager *SceneManager; ISceneManager *SceneManager;
io::IFileSystem *FileSystem; io::IFileSystem *FileSystem;
//! constants for reading and writing XML. //! constants for reading and writing XML.
//! Not made static due to portability problems. //! Not made static due to portability problems.
// TODO: move to own header // TODO: move to own header
const core::stringw IRR_XML_FORMAT_SCENE; const core::stringw IRR_XML_FORMAT_SCENE;
const core::stringw IRR_XML_FORMAT_NODE; const core::stringw IRR_XML_FORMAT_NODE;
const core::stringw IRR_XML_FORMAT_NODE_ATTR_TYPE; const core::stringw IRR_XML_FORMAT_NODE_ATTR_TYPE;
const core::stringw IRR_XML_FORMAT_ATTRIBUTES; const core::stringw IRR_XML_FORMAT_ATTRIBUTES;
const core::stringw IRR_XML_FORMAT_MATERIALS; const core::stringw IRR_XML_FORMAT_MATERIALS;
const core::stringw IRR_XML_FORMAT_ANIMATORS; const core::stringw IRR_XML_FORMAT_ANIMATORS;
const core::stringw IRR_XML_FORMAT_USERDATA; const core::stringw IRR_XML_FORMAT_USERDATA;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
#endif #endif

View File

@ -188,7 +188,7 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
: ISceneNode(0, 0), Driver(driver), FileSystem(fs), GUIEnvironment(gui), : ISceneNode(0, 0), Driver(driver), FileSystem(fs), GUIEnvironment(gui),
CursorControl(cursorControl), CollisionManager(0), CursorControl(cursorControl), CollisionManager(0),
ActiveCamera(0), ShadowColor(150,0,0,0), AmbientLight(0,0,0,0), Parameters(0), ActiveCamera(0), ShadowColor(150,0,0,0), AmbientLight(0,0,0,0), Parameters(0),
MeshCache(cache), CurrentRendertime(ESNRP_NONE), LightManager(0), MeshCache(cache), CurrentRenderPass(ESNRP_NONE), LightManager(0),
IRR_XML_FORMAT_SCENE(L"irr_scene"), IRR_XML_FORMAT_NODE(L"node"), IRR_XML_FORMAT_NODE_ATTR_TYPE(L"type") IRR_XML_FORMAT_SCENE(L"irr_scene"), IRR_XML_FORMAT_NODE(L"node"), IRR_XML_FORMAT_NODE_ATTR_TYPE(L"type")
{ {
#ifdef _DEBUG #ifdef _DEBUG
@ -1391,11 +1391,11 @@ void CSceneManager::drawAll()
//render camera scenes //render camera scenes
{ {
CurrentRendertime = ESNRP_CAMERA; CurrentRenderPass = ESNRP_CAMERA;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
if (LightManager) if (LightManager)
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
for (i=0; i<CameraList.size(); ++i) for (i=0; i<CameraList.size(); ++i)
CameraList[i]->render(); CameraList[i]->render();
@ -1403,17 +1403,17 @@ void CSceneManager::drawAll()
CameraList.set_used(0); CameraList.set_used(0);
if (LightManager) if (LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime); LightManager->OnRenderPassPostRender(CurrentRenderPass);
} }
//render lights scenes //render lights scenes
{ {
CurrentRendertime = ESNRP_LIGHT; CurrentRenderPass = ESNRP_LIGHT;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
if (LightManager) if (LightManager)
{ {
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
} }
else else
{ {
@ -1447,17 +1447,17 @@ void CSceneManager::drawAll()
LightList[i]->render(); LightList[i]->render();
if (LightManager) if (LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime); LightManager->OnRenderPassPostRender(CurrentRenderPass);
} }
// render skyboxes // render skyboxes
{ {
CurrentRendertime = ESNRP_SKY_BOX; CurrentRenderPass = ESNRP_SKY_BOX;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
if (LightManager) if (LightManager)
{ {
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
for (i=0; i<SkyBoxList.size(); ++i) for (i=0; i<SkyBoxList.size(); ++i)
{ {
ISceneNode* node = SkyBoxList[i]; ISceneNode* node = SkyBoxList[i];
@ -1475,20 +1475,20 @@ void CSceneManager::drawAll()
SkyBoxList.set_used(0); SkyBoxList.set_used(0);
if (LightManager) if (LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime); LightManager->OnRenderPassPostRender(CurrentRenderPass);
} }
// render default objects // render default objects
{ {
CurrentRendertime = ESNRP_SOLID; CurrentRenderPass = ESNRP_SOLID;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
SolidNodeList.sort(); // sort by textures SolidNodeList.sort(); // sort by textures
if (LightManager) if (LightManager)
{ {
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
for (i=0; i<SolidNodeList.size(); ++i) for (i=0; i<SolidNodeList.size(); ++i)
{ {
ISceneNode* node = SolidNodeList[i].Node; ISceneNode* node = SolidNodeList[i].Node;
@ -1507,17 +1507,17 @@ void CSceneManager::drawAll()
SolidNodeList.set_used(0); SolidNodeList.set_used(0);
if (LightManager) if (LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime); LightManager->OnRenderPassPostRender(CurrentRenderPass);
} }
// render shadows // render shadows
{ {
CurrentRendertime = ESNRP_SHADOW; CurrentRenderPass = ESNRP_SHADOW;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
if (LightManager) if (LightManager)
{ {
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
for (i=0; i<ShadowNodeList.size(); ++i) for (i=0; i<ShadowNodeList.size(); ++i)
{ {
ISceneNode* node = ShadowNodeList[i]; ISceneNode* node = ShadowNodeList[i];
@ -1539,18 +1539,18 @@ void CSceneManager::drawAll()
ShadowNodeList.set_used(0); ShadowNodeList.set_used(0);
if (LightManager) if (LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime); LightManager->OnRenderPassPostRender(CurrentRenderPass);
} }
// render transparent objects. // render transparent objects.
{ {
CurrentRendertime = ESNRP_TRANSPARENT; CurrentRenderPass = ESNRP_TRANSPARENT;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
TransparentNodeList.sort(); // sort by distance from camera TransparentNodeList.sort(); // sort by distance from camera
if (LightManager) if (LightManager)
{ {
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
for (i=0; i<TransparentNodeList.size(); ++i) for (i=0; i<TransparentNodeList.size(); ++i)
{ {
@ -1570,19 +1570,19 @@ void CSceneManager::drawAll()
TransparentNodeList.set_used(0); TransparentNodeList.set_used(0);
if (LightManager) if (LightManager)
LightManager->OnRenderPassPostRender(CurrentRendertime); LightManager->OnRenderPassPostRender(CurrentRenderPass);
} }
// render transparent effect objects. // render transparent effect objects.
{ {
CurrentRendertime = ESNRP_TRANSPARENT_EFFECT; CurrentRenderPass = ESNRP_TRANSPARENT_EFFECT;
Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRendertime) != 0); Driver->getOverrideMaterial().Enabled = ((Driver->getOverrideMaterial().EnablePasses & CurrentRenderPass) != 0);
TransparentEffectNodeList.sort(); // sort by distance from camera TransparentEffectNodeList.sort(); // sort by distance from camera
if (LightManager) if (LightManager)
{ {
LightManager->OnRenderPassPreRender(CurrentRendertime); LightManager->OnRenderPassPreRender(CurrentRenderPass);
for (i=0; i<TransparentEffectNodeList.size(); ++i) for (i=0; i<TransparentEffectNodeList.size(); ++i)
{ {
@ -1608,7 +1608,7 @@ void CSceneManager::drawAll()
LightList.set_used(0); LightList.set_used(0);
clearDeletionList(); clearDeletionList();
CurrentRendertime = ESNRP_NONE; CurrentRenderPass = ESNRP_NONE;
} }
void CSceneManager::setLightManager(ILightManager* lightManager) void CSceneManager::setLightManager(ILightManager* lightManager)
@ -2010,7 +2010,7 @@ io::IAttributes* CSceneManager::getParameters()
//! Returns current render pass. //! Returns current render pass.
E_SCENE_NODE_RENDER_PASS CSceneManager::getSceneNodeRenderPass() const E_SCENE_NODE_RENDER_PASS CSceneManager::getSceneNodeRenderPass() const
{ {
return CurrentRendertime; return CurrentRenderPass;
} }

View File

@ -433,7 +433,7 @@ namespace scene
virtual ISceneManager* createNewSceneManager(bool cloneContent); virtual ISceneManager* createNewSceneManager(bool cloneContent);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_SCENE_MANAGER; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_SCENE_MANAGER; }
//! Returns the default scene node factory which can create all built in scene nodes //! Returns the default scene node factory which can create all built in scene nodes
virtual ISceneNodeFactory* getDefaultSceneNodeFactory(); virtual ISceneNodeFactory* getDefaultSceneNodeFactory();
@ -510,13 +510,13 @@ namespace scene
virtual void setLightManager(ILightManager* lightManager); virtual void setLightManager(ILightManager* lightManager);
//! Get current render time. //! Get current render time.
virtual E_SCENE_NODE_RENDER_PASS getCurrentRendertime() const { return CurrentRendertime; } virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const _IRR_OVERRIDE_ { return CurrentRenderPass; }
//! Set current render time. //! Set current render time.
virtual void setCurrentRendertime(E_SCENE_NODE_RENDER_PASS currentRendertime) { CurrentRendertime = currentRendertime; } virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass) _IRR_OVERRIDE_ { CurrentRenderPass = nextPass; }
//! Get an instance of a geometry creator. //! Get an instance of a geometry creator.
virtual const IGeometryCreator* getGeometryCreator(void) const { return GeometryCreator; } virtual const IGeometryCreator* getGeometryCreator(void) const _IRR_OVERRIDE_ { return GeometryCreator; }
//! returns if node is culled //! returns if node is culled
virtual bool isCulled(const ISceneNode* node) const; virtual bool isCulled(const ISceneNode* node) const;
@ -636,7 +636,7 @@ namespace scene
//! Mesh cache //! Mesh cache
IMeshCache* MeshCache; IMeshCache* MeshCache;
E_SCENE_NODE_RENDER_PASS CurrentRendertime; E_SCENE_NODE_RENDER_PASS CurrentRenderPass;
//! An optional callbacks manager to allow the user app finer control //! An optional callbacks manager to allow the user app finer control
//! over the scene lighting and rendering. //! over the scene lighting and rendering.

View File

@ -85,7 +85,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_COLLISION_RESPONSE; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const _IRR_OVERRIDE_ { return ESNAT_COLLISION_RESPONSE; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop
@ -94,23 +94,23 @@ namespace scene
virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0);
//! Set the single node that this animator will act on. //! Set the single node that this animator will act on.
virtual void setTargetNode(ISceneNode * node) { setNode(node); } virtual void setTargetNode(ISceneNode * node) _IRR_OVERRIDE_ { setNode(node); }
//! Gets the single node that this animator is acting on. //! Gets the single node that this animator is acting on.
virtual ISceneNode* getTargetNode(void) const { return Object; } virtual ISceneNode* getTargetNode(void) const _IRR_OVERRIDE_ { return Object; }
//! Returns true if a collision occurred during the last animateNode() //! Returns true if a collision occurred during the last animateNode()
virtual bool collisionOccurred() const { return CollisionOccurred; } virtual bool collisionOccurred() const _IRR_OVERRIDE_ { return CollisionOccurred; }
//! Returns the last point of collision. //! Returns the last point of collision.
virtual const core::vector3df & getCollisionPoint() const { return CollisionPoint; } virtual const core::vector3df & getCollisionPoint() const _IRR_OVERRIDE_ { return CollisionPoint; }
//! Returns the last triangle that caused a collision. //! Returns the last triangle that caused a collision.
virtual const core::triangle3df & getCollisionTriangle() const { return CollisionTriangle; } virtual const core::triangle3df & getCollisionTriangle() const _IRR_OVERRIDE_ { return CollisionTriangle; }
virtual const core::vector3df & getCollisionResultPosition(void) const { return CollisionResultPosition; } virtual const core::vector3df & getCollisionResultPosition(void) const _IRR_OVERRIDE_ { return CollisionResultPosition; }
virtual ISceneNode* getCollisionNode(void) const { return CollisionNode; } virtual ISceneNode* getCollisionNode(void) const _IRR_OVERRIDE_ { return CollisionNode; }
//! Sets a callback interface which will be called if a collision occurs. //! Sets a callback interface which will be called if a collision occurs.

View File

@ -31,7 +31,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_CIRCLE; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const _IRR_OVERRIDE_ { return ESNAT_FLY_CIRCLE; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop

View File

@ -31,7 +31,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_STRAIGHT; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const _IRR_OVERRIDE_ { return ESNAT_FLY_STRAIGHT; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop

View File

@ -34,7 +34,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FOLLOW_SPLINE; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const _IRR_OVERRIDE_ { return ESNAT_FOLLOW_SPLINE; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop

View File

@ -28,7 +28,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_ROTATION; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const _IRR_OVERRIDE_ { return ESNAT_ROTATION; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop

View File

@ -33,7 +33,7 @@ namespace scene
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_TEXTURE; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const _IRR_OVERRIDE_ { return ESNAT_TEXTURE; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop

View File

@ -43,7 +43,7 @@ namespace scene
virtual const core::aabbox3d<f32>& getBoundingBox() const; virtual const core::aabbox3d<f32>& getBoundingBox() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_SHADOW_VOLUME; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_SHADOW_VOLUME; }
private: private:

View File

@ -42,7 +42,7 @@ namespace scene
virtual u32 getMaterialCount() const; virtual u32 getMaterialCount() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_SKY_BOX; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_SKY_BOX; }
//! Creates a clone of this scene node and its children. //! Creates a clone of this scene node and its children.
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);

View File

@ -26,7 +26,7 @@ class CSkyDomeSceneNode : public ISceneNode
virtual const core::aabbox3d<f32>& getBoundingBox() const; virtual const core::aabbox3d<f32>& getBoundingBox() const;
virtual video::SMaterial& getMaterial(u32 i); virtual video::SMaterial& getMaterial(u32 i);
virtual u32 getMaterialCount() const; virtual u32 getMaterialCount() const;
virtual ESCENE_NODE_TYPE getType() const { return ESNT_SKY_DOME; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_SKY_DOME; }
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);

View File

@ -71,7 +71,7 @@ public:
CSoftware2MaterialRenderer_UNSUPPORTED ( video::CBurningVideoDriver* driver ) CSoftware2MaterialRenderer_UNSUPPORTED ( video::CBurningVideoDriver* driver )
: CSoftware2MaterialRenderer ( driver ) {} : CSoftware2MaterialRenderer ( driver ) {}
virtual s32 getRenderCapability() const { return 1; } virtual s32 getRenderCapability() const _IRR_OVERRIDE_ { return 1; }
}; };

View File

@ -163,12 +163,11 @@ namespace video
//! Returns the maximum texture size supported. //! Returns the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const; virtual core::dimension2du getMaxTextureSize() const;
virtual IDepthBuffer * getDepthBuffer () { return DepthBuffer; } IDepthBuffer * getDepthBuffer () { return DepthBuffer; }
virtual IStencilBuffer * getStencilBuffer () { return StencilBuffer; } IStencilBuffer * getStencilBuffer () { return StencilBuffer; }
protected: protected:
//! sets a render target //! sets a render target
void setRenderTarget(video::CImage* image); void setRenderTarget(video::CImage* image);

View File

@ -44,7 +44,7 @@ namespace scene
virtual u32 getMaterialCount() const; virtual u32 getMaterialCount() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_SPHERE; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_SPHERE; }
//! Writes attributes of the scene node. //! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
@ -56,18 +56,18 @@ namespace scene
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
//! The mesh cannot be changed //! The mesh cannot be changed
virtual void setMesh(IMesh* mesh) {} virtual void setMesh(IMesh* mesh) _IRR_OVERRIDE_ {}
//! Returns the current mesh //! Returns the current mesh
virtual IMesh* getMesh() { return Mesh; } virtual IMesh* getMesh() _IRR_OVERRIDE_ { return Mesh; }
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style. //! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes /* In this way it is possible to change the materials a mesh causing all mesh scene nodes
referencing this mesh to change too. */ referencing this mesh to change too. */
virtual void setReadOnlyMaterials(bool readonly) {} virtual void setReadOnlyMaterials(bool readonly) _IRR_OVERRIDE_ {}
//! Returns if the scene node should not copy the materials of the mesh but use them in a read only style //! Returns if the scene node should not copy the materials of the mesh but use them in a read only style
virtual bool isReadOnlyMaterials() const { return false; } virtual bool isReadOnlyMaterials() const _IRR_OVERRIDE_ { return false; }
//! Creates shadow volume scene node as child of this node //! Creates shadow volume scene node as child of this node
//! and returns a pointer to it. //! and returns a pointer to it.

View File

@ -117,7 +117,7 @@ namespace io
virtual const IFileList* getFileList() const; virtual const IFileList* getFileList() const;
//! get the class Type //! get the class Type
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_TAR; } virtual E_FILE_ARCHIVE_TYPE getType() const _IRR_OVERRIDE_ { return EFAT_TAR; }
private: private:

View File

@ -127,13 +127,13 @@ namespace scene
virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const; virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const;
//! Return the number of indices currently used to draw the scene node. //! Return the number of indices currently used to draw the scene node.
virtual u32 getIndexCount() const { return IndicesToRender; } virtual u32 getIndexCount() const _IRR_OVERRIDE_ { return IndicesToRender; }
//! Returns the mesh //! Returns the mesh
virtual IMesh* getMesh(); virtual IMesh* getMesh();
//! Returns a pointer to the buffer used by the terrain (most users will not need this) //! Returns a pointer to the buffer used by the terrain (most users will not need this)
virtual IMeshBuffer* getRenderBuffer() { return RenderBuffer; } virtual IMeshBuffer* getRenderBuffer() _IRR_OVERRIDE_ { return RenderBuffer; }
//! Gets the meshbuffer data based on a specified Level of Detail. //! Gets the meshbuffer data based on a specified Level of Detail.
//! \param mb: A reference to an IDynamicMeshBuffer object //! \param mb: A reference to an IDynamicMeshBuffer object
@ -189,7 +189,7 @@ namespace scene
//! the geomipmap data changes. //! the geomipmap data changes.
//! param bVal: Boolean value representing whether or not to update selector dynamically. //! param bVal: Boolean value representing whether or not to update selector dynamically.
//! NOTE: Temporarily disabled while working out issues with DynamicSelectorUpdate //! NOTE: Temporarily disabled while working out issues with DynamicSelectorUpdate
virtual void setDynamicSelectorUpdate(bool bVal ) { DynamicSelectorUpdate = false; } virtual void setDynamicSelectorUpdate(bool bVal ) _IRR_OVERRIDE_ { DynamicSelectorUpdate = false; }
//! Override the default generation of distance thresholds for determining the LOD a patch //! Override the default generation of distance thresholds for determining the LOD a patch
//! is rendered at. If any LOD is overridden, then the scene node will no longer apply //! is rendered at. If any LOD is overridden, then the scene node will no longer apply
@ -202,7 +202,7 @@ namespace scene
virtual void scaleTexture(f32 scale = 1.0f, f32 scale2 = 0.0f); virtual void scaleTexture(f32 scale = 1.0f, f32 scale2 = 0.0f);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const {return ESNT_TERRAIN;} virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ {return ESNT_TERRAIN;}
//! Writes attributes of the scene node. //! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, virtual void serializeAttributes(io::IAttributes* out,

View File

@ -46,7 +46,7 @@ namespace scene
virtual void setTextColor(video::SColor color); virtual void setTextColor(video::SColor color);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_TEXT; }
private: private:
@ -99,7 +99,7 @@ namespace scene
virtual u32 getMaterialCount() const; virtual u32 getMaterialCount() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_TEXT; }
//! Set the color of all vertices of the billboard //! Set the color of all vertices of the billboard
//! \param overallColor: the color to set //! \param overallColor: the color to set

View File

@ -53,7 +53,7 @@ public:
virtual s32 getTriangleCount() const; virtual s32 getTriangleCount() const;
//! Return the scene node associated with a given triangle. //! Return the scene node associated with a given triangle.
virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const { return SceneNode; } virtual ISceneNode* getSceneNodeForTriangle(u32 triangleIndex) const _IRR_OVERRIDE_ { return SceneNode; }
// Get the number of TriangleSelectors that are part of this one // Get the number of TriangleSelectors that are part of this one
virtual u32 getSelectorCount() const; virtual u32 getSelectorCount() const;

View File

@ -44,7 +44,7 @@ namespace scene
virtual u32 getMaterialCount() const; virtual u32 getMaterialCount() const;
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_VOLUME_LIGHT; }
//! Writes attributes of the scene node. //! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
@ -58,14 +58,14 @@ namespace scene
virtual void setSubDivideU(const u32 inU); virtual void setSubDivideU(const u32 inU);
virtual void setSubDivideV(const u32 inV); virtual void setSubDivideV(const u32 inV);
virtual u32 getSubDivideU() const { return SubdivideU; } virtual u32 getSubDivideU() const _IRR_OVERRIDE_ { return SubdivideU; }
virtual u32 getSubDivideV() const { return SubdivideV; } virtual u32 getSubDivideV() const _IRR_OVERRIDE_ { return SubdivideV; }
virtual void setFootColor(const video::SColor inColor); virtual void setFootColor(const video::SColor inColor);
virtual void setTailColor(const video::SColor inColor); virtual void setTailColor(const video::SColor inColor);
virtual video::SColor getFootColor() const { return FootColor; } virtual video::SColor getFootColor() const _IRR_OVERRIDE_ { return FootColor; }
virtual video::SColor getTailColor() const { return TailColor; } virtual video::SColor getTailColor() const _IRR_OVERRIDE_ { return TailColor; }
private: private:
void constructLight(); void constructLight();

View File

@ -1,177 +1,177 @@
// Copyright (C) 2002-2012 Thomas Alten // Copyright (C) 2002-2012 Thomas Alten
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_WAD_READER_H_INCLUDED__ #ifndef __C_WAD_READER_H_INCLUDED__
#define __C_WAD_READER_H_INCLUDED__ #define __C_WAD_READER_H_INCLUDED__
#include "IrrCompileConfig.h" #include "IrrCompileConfig.h"
#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ #ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
#include "IReferenceCounted.h" #include "IReferenceCounted.h"
#include "IReadFile.h" #include "IReadFile.h"
#include "irrArray.h" #include "irrArray.h"
#include "irrString.h" #include "irrString.h"
#include "IFileSystem.h" #include "IFileSystem.h"
#include "CFileList.h" #include "CFileList.h"
namespace irr namespace irr
{ {
namespace io namespace io
{ {
enum eWADFileTypes enum eWADFileTypes
{ {
WAD_FORMAT_UNKNOWN = 0, WAD_FORMAT_UNKNOWN = 0,
WAD_FORMAT_QUAKE2 = 1, WAD_FORMAT_QUAKE2 = 1,
WAD_FORMAT_HALFLIFE = 2, WAD_FORMAT_HALFLIFE = 2,
WAD_CMP_NONE = 0, WAD_CMP_NONE = 0,
WAD_CMP_LZSS = 1, WAD_CMP_LZSS = 1,
WAD_TYP_NONE = 0, WAD_TYP_NONE = 0,
WAD_TYP_LABEL = 1, WAD_TYP_LABEL = 1,
WAD_TYP_LUMPY = 64, // 64 + grab command number WAD_TYP_LUMPY = 64, // 64 + grab command number
WAD_TYP_PALETTE = 64, WAD_TYP_PALETTE = 64,
WAD_TYP_QTEX = 65, WAD_TYP_QTEX = 65,
WAD_TYP_QPIC = 66, WAD_TYP_QPIC = 66,
WAD_TYP_SOUND = 67, WAD_TYP_SOUND = 67,
WAD_TYP_MIPTEX = 68, WAD_TYP_MIPTEX = 68,
WAD_TYP_MIPTEX_HALFLIFE = 67, WAD_TYP_MIPTEX_HALFLIFE = 67,
WAD_TYP_FONT = 70, WAD_TYP_FONT = 70,
}; };
// byte-align structures // byte-align structures
#include "irrpack.h" #include "irrpack.h"
struct SWADFileHeader struct SWADFileHeader
{ {
c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife
u32 numlumps; u32 numlumps;
u32 infotableofs; u32 infotableofs;
} PACK_STRUCT; } PACK_STRUCT;
struct SWADFileEntryOriginal struct SWADFileEntryOriginal
{ {
u32 filepos; u32 filepos;
u32 disksize; u32 disksize;
u32 size; // uncompressed u32 size; // uncompressed
u8 type; u8 type;
u8 compression; u8 compression;
u8 pad[2]; u8 pad[2];
u8 name[16]; // must be null terminated u8 name[16]; // must be null terminated
} PACK_STRUCT; } PACK_STRUCT;
// Default alignment // Default alignment
#include "irrunpack.h" #include "irrunpack.h"
struct SWADFileEntry struct SWADFileEntry
{ {
io::path simpleFileName; io::path simpleFileName;
bool operator < (const SWADFileEntry& other) const bool operator < (const SWADFileEntry& other) const
{ {
return simpleFileName < other.simpleFileName; return simpleFileName < other.simpleFileName;
} }
io::path wadFileName; io::path wadFileName;
SWADFileEntryOriginal header; SWADFileEntryOriginal header;
}; };
//! Archiveloader capable of loading WAD Archives //! Archiveloader capable of loading WAD Archives
class CArchiveLoaderWAD : public IArchiveLoader class CArchiveLoaderWAD : public IArchiveLoader
{ {
public: public:
//! Constructor //! Constructor
CArchiveLoaderWAD(io::IFileSystem* fs); CArchiveLoaderWAD(io::IFileSystem* fs);
//! returns true if the file maybe is able to be loaded by this class //! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".zip") //! based on the file extension (e.g. ".zip")
virtual bool isALoadableFileFormat(const io::path& filename) const; virtual bool isALoadableFileFormat(const io::path& filename) const;
//! Check if the file might be loaded by this class //! Check if the file might be loaded by this class
/** Check might look into the file. /** Check might look into the file.
\param file File handle to check. \param file File handle to check.
\return True if file seems to be loadable. */ \return True if file seems to be loadable. */
virtual bool isALoadableFileFormat(io::IReadFile* file) const; virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! Check to see if the loader can create archives of this type. //! Check to see if the loader can create archives of this type.
/** Check based on the archive type. /** Check based on the archive type.
\param fileType The archive type to check. \param fileType The archive type to check.
\return True if the archile loader supports this type, false if not */ \return True if the archile loader supports this type, false if not */
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const; virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const;
//! Creates an archive from the filename //! Creates an archive from the filename
/** \param file File handle to check. /** \param file File handle to check.
\return Pointer to newly created archive, or 0 upon error. */ \return Pointer to newly created archive, or 0 upon error. */
virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const; virtual IFileArchive* createArchive(const io::path& filename, bool ignoreCase, bool ignorePaths) const;
//! creates/loads an archive from the file. //! creates/loads an archive from the file.
//! \return Pointer to the created archive. Returns 0 if loading failed. //! \return Pointer to the created archive. Returns 0 if loading failed.
virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const; virtual io::IFileArchive* createArchive(io::IReadFile* file, bool ignoreCase, bool ignorePaths) const;
private: private:
io::IFileSystem* FileSystem; io::IFileSystem* FileSystem;
}; };
//! reads from WAD //! reads from WAD
class CWADReader : public IFileArchive, virtual CFileList class CWADReader : public IFileArchive, virtual CFileList
{ {
public: public:
CWADReader(IReadFile* file, bool ignoreCase, bool ignorePaths); CWADReader(IReadFile* file, bool ignoreCase, bool ignorePaths);
virtual ~CWADReader(); virtual ~CWADReader();
// file archive methods // file archive methods
//! return the id of the file Archive //! return the id of the file Archive
virtual const io::path& getArchiveName() const; virtual const io::path& getArchiveName() const;
//! opens a file by file name //! opens a file by file name
virtual IReadFile* createAndOpenFile(const io::path& filename); virtual IReadFile* createAndOpenFile(const io::path& filename);
//! opens a file by index //! opens a file by index
virtual IReadFile* createAndOpenFile(u32 index); virtual IReadFile* createAndOpenFile(u32 index);
//! returns the list of files //! returns the list of files
virtual const IFileList* getFileList() const; virtual const IFileList* getFileList() const;
//! get the class Type //! get the class Type
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_WAD; } virtual E_FILE_ARCHIVE_TYPE getType() const _IRR_OVERRIDE_ { return EFAT_WAD; }
private: private:
io::path Type; io::path Type;
//! scans for a local header, returns false if there is no more local file header. //! scans for a local header, returns false if there is no more local file header.
bool scanLocalHeader(); bool scanLocalHeader();
//! splits filename from zip file into useful filenames and paths //! splits filename from zip file into useful filenames and paths
void extractFilename(SWADFileEntry* entry); void extractFilename(SWADFileEntry* entry);
io::path Base; io::path Base;
io::path MountPoint; io::path MountPoint;
IReadFile* File; IReadFile* File;
eWADFileTypes WadType; eWADFileTypes WadType;
SWADFileHeader Header; SWADFileHeader Header;
//core::array<SWADFileEntry> FileInfo; //core::array<SWADFileEntry> FileInfo;
io::IFileSystem* FileSystem; io::IFileSystem* FileSystem;
}; };
} // end namespace io } // end namespace io
} // end namespace irr } // end namespace irr
#endif #endif
#endif // #ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ #endif // #ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_

View File

@ -36,7 +36,7 @@ namespace scene
virtual void setMesh(IMesh* mesh); virtual void setMesh(IMesh* mesh);
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_WATER_SURFACE; } virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_WATER_SURFACE; }
//! Writes attributes of the scene node. //! Writes attributes of the scene node.
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;