10#ifndef NIRT_I_TERRAIN_SCENE_NODE_H
11#define NIRT_I_TERRAIN_SCENE_NODE_H
13#include <nirtcpp/core/engine/ETerrainElements.hpp>
14#include <nirtcpp/core/engine/ISceneNode.hpp>
15#include <nirtcpp/core/engine/IDynamicMeshBuffer.hpp>
16#include <nirtcpp/core/engine/irrArray.hpp>
57 :
ISceneNode (parent, mgr, id, position, rotation, scale) {}
159 s32 smoothFactor=0) =0;
173 bool signedData=
false,
bool floatVals=
false,
s32 width=0,
175 s32 smoothFactor=0) =0;
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Interface providing read access to a file.
Definition IReadFile.hpp:19
Definition IDynamicMeshBuffer.hpp:19
Class for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
Class which holds the geometry of an object.
Definition IMesh.hpp:72
The Scene Manager manages scene nodes, mesh resources, cameras and all the other stuff.
Definition ISceneManager.hpp:160
Scene node interface.
Definition ISceneNode.hpp:43
A scene node for displaying terrain using the geo mip map algorithm.
Definition ITerrainSceneNode.hpp:50
virtual void scaleTexture(f32 scale=1.0f, f32 scale2=0.0f)=0
Scales the base texture, similar to makePlanarTextureMapping.
virtual void setCameraRotationDelta(f32 delta)=0
Sets the rotation camera threshold.
virtual void setCameraMovementDelta(f32 delta)=0
Sets the movement camera threshold.
virtual IMesh * getMesh()=0
Get pointer to the mesh.
virtual void setLODOfPatch(s32 patchX, s32 patchZ, s32 LOD=0)=0
Manually sets the LOD of a patch.
virtual s32 getCurrentLODOfPatches(core::array< s32 > &LODs) const =0
Populates an array with the CurrentLOD of each patch.
virtual void getMeshBufferForLOD(IDynamicMeshBuffer &mb, s32 LOD=0) const =0
Gets the meshbuffer data based on a specified level of detail.
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.
virtual u32 getIndexCount() const =0
Get the number of indices currently in the meshbuffer.
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.hpp:53
virtual f32 getHeight(f32 x, f32 y) const =0
Get height of a point of the terrain.
virtual const core::aabbox3d< f32 > & getBoundingBox(s32 patchX, s32 patchZ) const =0
Get the bounding box of a patch.
virtual IMeshBuffer * getRenderBuffer()=0
Get pointer to the buffer used by the terrain (most users will not need this)
virtual const core::aabbox3d< f32 > & getBoundingBox() const =0
Get the bounding box of the terrain.
virtual bool overrideLODDistance(s32 LOD, f64 newDistance)=0
Override the default generation of distance thresholds.
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.
virtual void setDynamicSelectorUpdate(bool bVal)=0
Sets whether or not the node should dynamically update its associated selector when the geomipmap dat...
virtual void setFixedBorderLOD(nirt::s32 borderLOD=0)=0
Force node to use a fixed LOD level at the borders of the terrain.
virtual const core::vector3df & getTerrainCenter() const =0
Get center of terrain.
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.
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
double f64
64 bit floating point variable.
Definition irrTypes.hpp:114
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110