AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
agxTerrain::VoxelGridUtils Namespace Reference

Functions

agx::Vec3 getGridPositionFromVoxelIndex (agx::Vec3i voxelIndex, agx::Real voxelSize)
 
agx::Vec3i getVoxelIndexFromGridPosition (agx::Vec3 gridPosition, agx::Real voxelSize)
 
void renderVoxel (const agx::Vec3i voxel, const agxRender::Color &color, agx::Real voxelSize, const agx::AffineMatrix4x4 &gridTransform, agx::Real size)
 
void renderVoxels (const agx::Vec3iVector &voxels, const agxRender::Color &color, agx::Real voxelSize, const agx::AffineMatrix4x4 &gridTransform, agx::Real size)
 
agx::Bound3 transformBound (const agx::Bound3 &bound, const agx::AffineMatrix4x4 &gridInvTransform, agx::Real extend=agx::Real(0))
 Transforms a world bound to grid given grid transform and additional/extended size.
 

Function Documentation

◆ getGridPositionFromVoxelIndex()

agx::Vec3 agxTerrain::VoxelGridUtils::getGridPositionFromVoxelIndex ( agx::Vec3i  voxelIndex,
agx::Real  voxelSize 
)
inline

Definition at line 53 of file VoxelGridUtils.h.

References agx::Vec3T< T >::x(), agx::Vec3T< T >::y(), and agx::Vec3T< T >::z().

Referenced by renderVoxel().

◆ getVoxelIndexFromGridPosition()

agx::Vec3i agxTerrain::VoxelGridUtils::getVoxelIndexFromGridPosition ( agx::Vec3  gridPosition,
agx::Real  voxelSize 
)
inline

Definition at line 40 of file VoxelGridUtils.h.

References agx::Vec3T< T >::x(), agx::Vec3T< T >::y(), and agx::Vec3T< T >::z().

◆ renderVoxel()

void agxTerrain::VoxelGridUtils::renderVoxel ( const agx::Vec3i  voxel,
const agxRender::Color color,
agx::Real  voxelSize,
const agx::AffineMatrix4x4 gridTransform,
agx::Real  size 
)
inline

◆ renderVoxels()

void agxTerrain::VoxelGridUtils::renderVoxels ( const agx::Vec3iVector voxels,
const agxRender::Color color,
agx::Real  voxelSize,
const agx::AffineMatrix4x4 gridTransform,
agx::Real  size 
)
inline

Definition at line 127 of file VoxelGridUtils.h.

References renderVoxel().

◆ transformBound()

agx::Bound3 agxTerrain::VoxelGridUtils::transformBound ( const agx::Bound3 bound,
const agx::AffineMatrix4x4 gridInvTransform,
agx::Real  extend = agx::Real( 0 ) 
)
inline

Transforms a world bound to grid given grid transform and additional/extended size.

Parameters
bound- bound in world.
gridInvTransform- transform of the grid local space.
Returns
the transformed bound in the grid coordinate system.

Definition at line 66 of file VoxelGridUtils.h.

References agx::BoundT< T >::max(), and agx::BoundT< T >::min().