#include <iVoxelTerrain.h>
|
| iVoxelTerrain (iVoxelTerrainGenerateDelegate generateVoxelsDelegate, iVoxelTerrainPlacePropsDelegate placePropsDelegate, uint32 lodCount=11, uint32 voxelBlockSetupDistance=4, const iaVector3I &maxDiscoveryBoundaries=iaVector3I(100000, 100000, 100000)) |
|
| ~iVoxelTerrain () |
|
void | setScene (iScenePtr scene) |
|
void | setLODTrigger (uint32 lodTriggerID) |
|
void | setPhysicsMaterialID (uint64 materialID) |
|
uint64 | getPhysicsMaterialID () const |
|
iMaterialPtr | getMaterial () const |
|
void | modify (const iAABoxI &box, uint8 density) |
|
void | modify (const iaSphereI &sphere, uint8 density) |
|
bool | castRay (const iaVector3I &from, const iaVector3I &to, iaVector3I &outside, iaVector3I &inside) |
|
uint8 | getVoxelDensity (iaVector3I pos) |
|
◆ iVoxelTerrain()
initializes voxel terrain
- Parameters
-
generateVoxelsDelegate | callback to generate voxel data |
lodCount | count of level of detail allowed range is 2-11 (right now the lowest LOD is not visible) |
voxelBlockSetupDistance | distance in blocks of the lowest level of detail to be generated and visible when in range |
maxDiscoveryBoundaries | optionally adding boundaries to the discovery area. Values are in voxel block coordinates of the lowest LOD |
◆ ~iVoxelTerrain()
igor::iVoxelTerrain::~iVoxelTerrain |
( |
| ) |
|
◆ castRay()
casts ray to voxels to detect intersection
- Parameters
-
| from | from where the ray is cast |
| to | to where the ray is cast to |
[out] | outside | if there is an intersection this is the last voxel right before |
[out] | inside | if there is an intersection this is the first voxel with density greater zero |
- Returns
- true if there was an intersection
◆ getMaterial()
◆ getPhysicsMaterialID()
uint64 igor::iVoxelTerrain::getPhysicsMaterialID |
( |
| ) |
const |
- Returns
- terrain material ID
◆ getVoxelDensity()
- Returns
- voxel density at given position
- Parameters
-
◆ modify() [1/2]
void igor::iVoxelTerrain::modify |
( |
const iAABoxI & |
box, |
|
|
uint8 |
density |
|
) |
| |
modifies voxel data by manipulating a box area
- Parameters
-
box | the defined box area to manipulate |
density | the density to set within the box area |
◆ modify() [2/2]
void igor::iVoxelTerrain::modify |
( |
const iaSphereI & |
sphere, |
|
|
uint8 |
density |
|
) |
| |
modifies voxel data by manipulating a sphere area
- Parameters
-
sphere | the defined area to manipulate |
density | the density to set within the box area |
◆ setLODTrigger()
void igor::iVoxelTerrain::setLODTrigger |
( |
uint32 |
lodTriggerID | ) |
|
sets lod trigger node to monitor
- Parameters
-
lodTriggerID | the lod trigger's id |
◆ setPhysicsMaterialID()
void igor::iVoxelTerrain::setPhysicsMaterialID |
( |
uint64 |
materialID | ) |
|
sets physics material ID
- Parameters
-
materialID | the material ID to use |
◆ setScene()
void igor::iVoxelTerrain::setScene |
( |
iScenePtr |
scene | ) |
|
sets the scene and initializes the terrain
- Parameters
-
scene | the scene to put the terrain in |
◆ iTaskVoxelTerrain
◆ _voxelBlockOverlap
const int32 igor::iVoxelTerrain::_voxelBlockOverlap = 2 |
|
static |
◆ _voxelBlockSize
const int32 igor::iVoxelTerrain::_voxelBlockSize = 32 |
|
static |
The documentation for this class was generated from the following files: