AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
TerrainToolUtils.h File Reference

Go to the source code of this file.

Classes

struct  agxTerrain::PointData
 
struct  agxTerrain::ShovelPlane
 
struct  agxTerrain::ShovelSurfaceVectors
 
struct  agxTerrain::SurfacePointData
 
struct  agxTerrain::TangentPatch
 
struct  agxTerrain::ToolShapeData
 

Namespaces

namespace  agxTerrain
 The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
 

Typedefs

typedef std::pair< agxCollide::MeshRef, agx::AffineMatrix4x4 > agxTerrain::MeshTransformPair
 
typedef agx::Vector< MeshTransformPair > agxTerrain::MeshTransformPairVector
 
using agxTerrain::PointDataVector = agx::Vector< PointData >
 Struct that holds surface point data gathered through surface tracing of the shovel surfaces.
 
using agxTerrain::TangentPatchData = agx::Vector< TangentPatch >
 

Enumerations

enum class  agxTerrain::SURFACE_TRACE_MODE { agxTerrain::INSIDE =0 , agxTerrain::OUTSIDE =1 }
 

Functions

AGXTERRAIN_EXPORT TangentPatchData agxTerrain::computeInsideTangentPatches (agxTerrain::Shovel *shovel, size_t numPoints=200, size_t numPatches=20, bool debugRender=false)
 Compute the surface tangent patches over the whole surface in the angle interval from the cutting edge center to the top edge center.
 
AGXTERRAIN_EXPORT ShovelPlane agxTerrain::computeShovelBottomPlane (agxTerrain::Shovel *shovel, bool debugRender=false)
 Compute the dominant cutting bottom plane using the backside surface structure.
 
AGXTERRAIN_EXPORT ShovelPlane agxTerrain::computeShovelInsidePlane (agxTerrain::Shovel *shovel, bool debugRender=false)
 Compute the dominant inside plane using the inside surface structure.
 
AGXTERRAIN_EXPORT ShovelSurfaceVectors agxTerrain::computeShovelSurfaceVectors (agxTerrain::Shovel *shovel, SURFACE_TRACE_MODE mode=SURFACE_TRACE_MODE::OUTSIDE, size_t numCrossSectionSamples=8, size_t numPointsPerSample=200, agx::Real angleInterval=agx::PI, bool debugRender=false)
 Compute the dominant shovel surface vectors such as normal and tangents for a shovel surface over a specific angle interval, starting with the vector from the mesh center to the cutting edge center point, traveling along the shovel surface towards the top edge until end angle internval.
 
AGXTERRAIN_EXPORT ToolShapeData agxTerrain::createCustomBucketData (const std::vector< std::pair< agx::Vec3, agx::Real > > &sizes, bool createWalls=true)
 Utility function that creates a custom bucket from a list of box half-vectors and angles and associated edges and vectors.
 
AGXTERRAIN_EXPORT agxCollide::GeometryRefVector agxTerrain::createVoxelCollisionGeometries (agx::RigidBodyRef parentBody, agx::FrameRef parentFrame, agx::Real tessellationLevel=0.5)
 Utility function that creates voxel collision geometries from a parent rigid body and frame.
 
AGXTERRAIN_EXPORT std::tuple< bool, agx::Vec3 > agxTerrain::findLineMeshesIntersection (const agx::Vec3 &point1, const agx::Vec3 &point2, const MeshTransformPairVector &meshes)
 
AGXTERRAIN_EXPORT std::tuple< bool, agx::Vec3 > agxTerrain::findLineShovelIntersection (agxTerrain::Shovel *shovel, const agx::Vec3 &point1, const agx::Vec3 &point2, bool debugRender=false)
 
AGXTERRAIN_EXPORT bool agxTerrain::findPlaneMeshCenterPoint (const agx::Vec3 &planePoint, const agx::Vec3 &planeNormal, agx::Real rayLength, const MeshTransformPairVector &meshes, agx::Vec3 &result)
 
AGXTERRAIN_EXPORT Terrain * agxTerrain::getClosestOverlappingTerrain (const Shovel *shovel, const TerrainPtrVector &terrains, bool onlyValidDeformableTerrain=true)
 Find the overlapping terrain that best matches the shovel overlap.
 
AGXTERRAIN_EXPORT bool agxTerrain::isTriangleFirstInRay (const agx::Vec3 &bottom, const agx::Vec3 &top, const agxCollide::Mesh::Triangle &triangle, const MeshTransformPairVector &meshes)
 
AGXTERRAIN_EXPORT std::vector< PointData > agxTerrain::traceShovelActiveShapeOutline (agxTerrain::Shovel *shovel, size_t numSamplingPoints=200, bool debugRender=false)
 This function traces the inner outline of the specified Shovel's inner body ActiveZone to find the internal cross section geometry outline.
 
AGXTERRAIN_EXPORT SurfacePointData agxTerrain::traceShovelSurfaceOutline (agxTerrain::Shovel *shovel, SURFACE_TRACE_MODE mode=SURFACE_TRACE_MODE::OUTSIDE, size_t numCrossSectionSamples=4, size_t numPointsPerSample=200, agx::Real angleInterval=agx::PI, bool useCutTopAsMidPoint=false, bool debugRender=false)
 Trace the surface outline of a shovel with various cross sectional ray tracing samples over a specific angle interval, starting with the vector from the mesh center to the cutting edge center point, traveling along the shovel surface towards the top edge until end angle internval.