Loading...
Searching...
No Matches
ITerrainSceneNode.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
// The code for the TerrainSceneNode is based on the terrain renderer by
// Soconne and the GeoMipMapSceneNode developed by Spintz. They made their
// code available for Irrlicht and allowed it to be distributed under this
// licence. I only modified some parts. A lot of thanks go to them.
#ifndef __I_TERRAIN_SCENE_NODE_H__
#define __I_TERRAIN_SCENE_NODE_H__
#include "ETerrainElements.h"
#include "ISceneNode.h"
#include "IDynamicMeshBuffer.h"
#include "irrArray.h"
namespace irr
{
namespace io
{
class IReadFile;
} // end namespace io
namespace scene
{
class IMesh;
class ITerrainSceneNode : public ISceneNode
{
public:
ITerrainSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3df& rotation = core::vector3df(0.0f, 0.0f, 0.0f),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f) )
: ISceneNode (parent, mgr, id, position, rotation, scale) {}
virtual const core::aabbox3d<f32>& getBoundingBox() const =0;
virtual const core::aabbox3d<f32>& getBoundingBox(s32 patchX, s32 patchZ) const =0;
virtual u32 getIndexCount() const =0;
virtual IMesh* getMesh() =0;
virtual IMeshBuffer* getRenderBuffer() =0;
virtual void getMeshBufferForLOD(IDynamicMeshBuffer& mb, s32 LOD=0) const =0;
virtual s32 getIndicesForPatch(core::array<u32>& indices,
s32 patchX, s32 patchZ, s32 LOD=0) =0;
virtual s32 getCurrentLODOfPatches(core::array<s32>& LODs) const =0;
virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0) =0;
virtual const core::vector3df& getTerrainCenter() const =0;
virtual f32 getHeight(f32 x, f32 y) const =0;
virtual void setCameraMovementDelta(f32 delta) =0;
virtual void setCameraRotationDelta(f32 delta) =0;
virtual void setDynamicSelectorUpdate(bool bVal) =0;
virtual bool overrideLODDistance(s32 LOD, f64 newDistance) =0;
virtual void scaleTexture(f32 scale = 1.0f, f32 scale2=0.0f) =0;
virtual bool loadHeightMap(io::IReadFile* file,
video::SColor vertexColor=video::SColor(255,255,255,255),
s32 smoothFactor=0) =0;
virtual bool loadHeightMapRAW(io::IReadFile* file, s32 bitsPerPixel=16,
bool signedData=false, bool floatVals=false, s32 width=0,
video::SColor vertexColor=video::SColor(255,255,255,255),
s32 smoothFactor=0) =0;
};
} // end namespace scene
} // end namespace irr
#endif // __I_TERRAIN_SCENE_NODE_H__
ETerrainElements.h
IDynamicMeshBuffer.h
ISceneNode.h
irr::core::aabbox3d
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.h:22
irr::core::array
Self reallocating template array (like stl vector) with additional features.
Definition irrArray.h:23
irr::io::IReadFile
Interface providing read acess to a file.
Definition IReadFile.h:18
irr::scene::IDynamicMeshBuffer
Definition IDynamicMeshBuffer.h:19
irr::scene::IMeshBuffer
Struct for holding a mesh with a single material.
Definition IMeshBuffer.h:40
irr::scene::IMesh
Class which holds the geometry of an object.
Definition IMesh.h:24
irr::scene::ISceneManager
The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.
Definition ISceneManager.h:151
irr::scene::ISceneNode::ISceneNode
ISceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id=-1, const core::vector3df &position=core::vector3df(0, 0, 0), const core::vector3df &rotation=core::vector3df(0, 0, 0), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
Constructor.
Definition ISceneNode.h:45
irr::scene::ITerrainSceneNode::getBoundingBox
virtual const core::aabbox3d< f32 > & getBoundingBox() const =0
Get the bounding box of the terrain.
irr::scene::ITerrainSceneNode::getCurrentLODOfPatches
virtual s32 getCurrentLODOfPatches(core::array< s32 > &LODs) const =0
Populates an array with the CurrentLOD of each patch.
irr::scene::ITerrainSceneNode::getIndexCount
virtual u32 getIndexCount() const =0
Get the number of indices currently in the meshbuffer.
irr::scene::ITerrainSceneNode::ITerrainSceneNode
ITerrainSceneNode(ISceneNode *parent, ISceneManager *mgr, s32 id, const core::vector3df &position=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &rotation=core::vector3df(0.0f, 0.0f, 0.0f), const core::vector3df &scale=core::vector3df(1.0f, 1.0f, 1.0f))
Constructor.
Definition ITerrainSceneNode.h:53
irr::scene::ITerrainSceneNode::getMesh
virtual IMesh * getMesh()=0
Get pointer to the mesh.
irr::scene::ITerrainSceneNode::setLODOfPatch
virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0)=0
Manually sets the LOD of a patch.
irr::scene::ITerrainSceneNode::loadHeightMapRAW
virtual bool loadHeightMapRAW(io::IReadFile *file, s32 bitsPerPixel=16, bool signedData=false, bool floatVals=false, s32 width=0, video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 smoothFactor=0)=0
Initializes the terrain data. Loads the vertices from the heightMapFile.
irr::scene::ITerrainSceneNode::getBoundingBox
virtual const core::aabbox3d< f32 > & getBoundingBox(s32 patchX, s32 patchZ) const =0
Get the bounding box of a patch.
irr::scene::ITerrainSceneNode::getHeight
virtual f32 getHeight(f32 x, f32 y) const =0
Get height of a point of the terrain.
irr::scene::ITerrainSceneNode::setDynamicSelectorUpdate
virtual void setDynamicSelectorUpdate(bool bVal)=0
Sets whether or not the node should dynamically update its associated selector when the geomipmap dat...
irr::scene::ITerrainSceneNode::scaleTexture
virtual void scaleTexture(f32 scale=1.0f, f32 scale2=0.0f)=0
Scales the base texture, similar to makePlanarTextureMapping.
irr::scene::ITerrainSceneNode::getTerrainCenter
virtual const core::vector3df & getTerrainCenter() const =0
Get center of terrain.
irr::scene::ITerrainSceneNode::setCameraRotationDelta
virtual void setCameraRotationDelta(f32 delta)=0
Sets the rotation camera threshold.
irr::scene::ITerrainSceneNode::getMeshBufferForLOD
virtual void getMeshBufferForLOD(IDynamicMeshBuffer &mb, s32 LOD=0) const =0
Gets the meshbuffer data based on a specified level of detail.
irr::scene::ITerrainSceneNode::loadHeightMap
virtual bool loadHeightMap(io::IReadFile *file, video::SColor vertexColor=video::SColor(255, 255, 255, 255), s32 smoothFactor=0)=0
Initializes the terrain data. Loads the vertices from the heightMapFile.
irr::scene::ITerrainSceneNode::getIndicesForPatch
virtual s32 getIndicesForPatch(core::array< u32 > &indices, s32 patchX, s32 patchZ, s32 LOD=0)=0
Gets the indices for a specified patch at a specified Level of Detail.
irr::scene::ITerrainSceneNode::getRenderBuffer
virtual IMeshBuffer * getRenderBuffer()=0
Get pointer to the buffer used by the terrain (most users will not need this).
irr::scene::ITerrainSceneNode::setCameraMovementDelta
virtual void setCameraMovementDelta(f32 delta)=0
Sets the movement camera threshold.
irr::scene::ITerrainSceneNode::overrideLODDistance
virtual bool overrideLODDistance(s32 LOD, f64 newDistance)=0
Override the default generation of distance thresholds.
irr::video::SColor
Class representing a 32 bit ARGB color.
Definition SColor.h:202
irrArray.h
irr::core::vector3df
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
irr::io
This namespace provides interfaces for input/output: Reading and writing files, accessing zip archive...
Definition EAttributes.h:11
irr::scene
All scene management can be found in this namespace: Mesh loading, special scene nodes like octrees a...
Definition CDynamicMeshBuffer.h:16
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::f32
float f32
32 bit floating point variable.
Definition irrTypes.h:104
irr::u32
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
irr::f64
double f64
64 bit floating point variable.
Definition irrTypes.h:108
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0