Irrlicht 3D Engine: ITerrainSceneNode.h Source File

| Irrlicht 3D Engine |

ITerrainSceneNode.h
Go to the documentation of this file.

    00001 // Copyright (C) 2002-2012 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 // The code for the TerrainSceneNode is based on the terrain renderer by
    00006 // Soconne and the GeoMipMapSceneNode developed by Spintz. They made their
    00007 // code available for Irrlicht and allowed it to be distributed under this
    00008 // licence. I only modified some parts. A lot of thanks go to them.
    00009
    00010 #ifndef __I_TERRAIN_SCENE_NODE_H__
    00011 #define __I_TERRAIN_SCENE_NODE_H__
    00012
    00013 #include "ETerrainElements.h"
    00014 #include "ISceneNode.h"
    00015 #include "IDynamicMeshBuffer.h"
    00016 #include "irrArray.h"
    00017
    00018 namespace irr
    00019 {
    00020 namespace io
    00021 {
    00022     class IReadFile;
    00023 } // end namespace io
    00024 namespace scene
    00025 {
    00026     class IMesh;
    00027
    00029
    00049     class ITerrainSceneNode : public ISceneNode
    00050     {
    00051     public:
    00053         ITerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
    00054             const core::vector3df& position = core::vector3df(0.0f, 0.0f, 0.0f),
    00055             const core::vector3df& rotation = core::vector3df(0.0f, 0.0f, 0.0f),
    00056             const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f) )
    00057             : ISceneNode (parent, mgr, id, position, rotation, scale) {}
    00058
    00060
    00061         virtual const core::aabbox3d<f32>& getBoundingBox() const =0;
    00062
    00064
    00065         virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const =0;
    00066
    00068
    00069         virtual u32 getIndexCount() const =0;
    00070
    00072
    00073         virtual IMesh* getMesh() =0;
    00074
    00076         virtual IMeshBuffer* getRenderBuffer() =0;
    00077
    00078
    00080
    00082         virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const =0;
    00083
    00085
    00093         virtual s32 getIndicesForPatch(core::array<u32>& indices,
    00094             s32 patchX, s32 patchZ, s32 LOD=0) =0;
    00095
    00097
    00100         virtual s32 getCurrentLODOfPatches(core::array<s32>& LODs) const =0;
    00101
    00103
    00106         virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0) =0;
    00107
    00109         virtual const core::vector3df& getTerrainCenter() const =0;
    00110
    00112         virtual f32 getHeight(f32 x, f32 y) const =0;
    00113
    00115
    00117         virtual void setCameraMovementDelta(f32 delta) =0;
    00118
    00120
    00122         virtual void setCameraRotationDelta(f32 delta) =0;
    00123
    00125
    00126         virtual void setDynamicSelectorUpdate(bool bVal) =0;
    00127
    00129
    00135         virtual bool overrideLODDistance(s32 LOD, f64 newDistance) =0;
    00136
    00138
    00147         virtual void scaleTexture(f32 scale = 1.0f, f32 scale2=0.0f) =0;
    00148
    00150
    00155         virtual bool loadHeightMap(io::IReadFile* file,
    00156             video::SColor vertexColor=video::SColor(255,255,255,255),
    00157             s32 smoothFactor=0) =0;
    00158
    00160
    00170         virtual bool loadHeightMapRAW(io::IReadFile* file, s32 bitsPerPixel=16,
    00171             bool signedData=false, bool floatVals=false, s32 width=0,
    00172             video::SColor vertexColor=video::SColor(255,255,255,255),
    00173             s32 smoothFactor=0) =0;
    00174
    00175     };
    00176
    00177 } // end namespace scene
    00178 } // end namespace irr
    00179
    00180
    00181 #endif // __I_TERRAIN_SCENE_NODE_H__
    00182