19 #include <agx/config/AGX_USE_AGXTERRAIN.h>
42 class TerrainToolCollection;
149 void initializeGeometry();
158 bool calculateFailurePlaneIntersection(
const Terrain* terrain,
165 void createSoilWedgeConvex(
const SoilWedge& soilWedge);
167 void createSoilWedgePlanes(
SoilWedge& soilWedge);
169 bool isSoilWedgeSubmerged(
const Terrain* terrain,
const SoilWedge& soilWedge );
173 bool doTerrainToolIntersectionTest(
const Terrain* terrain,
183 bool handleMissedIntersection(
const Terrain* terrain,
191 bool isIntersectionAboveTerrainMesh(
const Terrain* terrain,
196 void updateSoilWedgeInclinations(
const Terrain* terrain,
203 const agx::Vec3& flatForwardVector)
const;
209 bool m_convexCreationFailed;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXTERRAIN_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
The geometry representation used by the collision detection engine.
bool soilWedgeCreationFailed() const
agx::Line getWedgeCuttingEdge() const
agx::Real getToolInclination() const
agx::Real getTotalSoilWedgeVolume(const agx::Vec3 &upVector) const
agx::Bound3i getVoxelOverlapBound() const
agx::Real getTerrainInclination() const
agx::Plane getSplittingPlane() const
virtual void onPost(Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector)=0
agx::Real getFailureAngleToTerrainPlane(const agx::Vec3 &upVector) const
void onEnableChange(bool enable)
bool isAnySoilWedgeEnabled() const
agx::UInt m_soilWedgesSize
WedgePlaneVector getSoilWedgePlanes() const
agx::Vector< SoilWedge > m_soilWedges
virtual void onPreCollide(Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector)=0
agx::Line getWedgeFailureEdge() const
agx::String getActiveZoneTypeName() const
agx::Vec3 projectVectorToTerrainPlane(const agx::Vec3 &vec, const agx::Vec3 &upVector) const
const agxCollide::Geometry * getGeometry() const
agx::Bound3i m_voxelOverlapBound
agxCollide::Geometry * getGeometry()
agx::Bool overlapsVoxel(const agx::Vec3i &index) const
const agx::Vector< agxCollide::ConvexRef > & getWedgeShapes() const
agx::Frame * m_parentFrame
virtual void onPre(Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector)=0
agx::Plane m_splittingPlane
void createSoilWedges(const Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector, const agx::Vec3 &flatForwardVector)
virtual ActiveZone::Type getType() const =0
agx::Real getFailureAngle() const
agx::Vector< agxCollide::ConvexRef > m_soilWedgeMeshses
ActiveZone(agx::Frame *parentFrame)
bool isSoilWedgeEnabled(agx::UInt index) const
agx::Line getWedgeTopEdge() const
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
A BoundT represents a range defined by a minimum and a maximum value.
The object defining a frame of reference and providing transformations operations.
Class representing the mathematical concept of a plane, also called a half- space.
Base class providing referencing counted objects.
Vector containing 'raw' data.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
std::pair< agxCollide::MeshRef, agx::AffineMatrix4x4 > MeshTransformPair
agx::Vector< MeshTransformPair > MeshTransformPairVector