35 const size_t resolutionX,
36 const size_t resolutionY,
42 virtual agx::Vec3 getElementSize()
const override;
44 virtual size_t getMemoryUsage()
const override;
46 virtual bool empty()
override;
48 virtual void clearGrid()
override;
50 virtual void setFloatValue(
const GridCoord& ijk,
float value)
override;
52 virtual float getFloatValue(
const GridCoord& ijk)
const override;
54 virtual bool isActiveVoxel(
const GridCoord& )
const override;
56 virtual size_t getNumActiveVoxels()
const override;
58 virtual agx::Real getTotal()
const override;
60 virtual std::tuple<float, float> getTotalAndLargest()
const override;
64 virtual void sizeHint(
size_t )
override;
66 virtual bool hasIterateSupport()
const override;
68 virtual void iterateVoxels(
GridFunction func)
const override;
74 bool =
true)
const override;
78 virtual void setValuesBelowHeightField(
81 int lowestAllowedVoxelIndex,
89 virtual bool findMeshVoxelIntersections(
107 std::function<
float(
const agx::Vec3i&)> getCompression,
108 std::function<
bool(
const agx::Vec2i&)> canRemoveIndex,
112 bool useParticleFreeDeformers)
override;
116 std::function<
float(
const agx::Vec3i& )> getCompression,
117 std::function<
bool(
const agx::Vec2i& )> canRemoveIndex,
125 virtual void findVoxelSurfaceFromIndex(
const agx::Vec3i& index,
130 int getSurfaceHeightIndex(
const agx::Vec2i terrainIndex);
132 std::pair<int, float> getVoxelZAndOccupancyFromLocalHeight(
agx::Real height,
agx::Real voxelSize);
134 void setGridColumnOccupancy(
const agx::Vec2i terrainIndex,
int voxelZ,
float occupancy);
136 void setOccupancyInSurfaceVoxel(
const agx::Vec2i terrainIndex,
float occupancy);
141 int getDepth()
const;
155 void allocateMassArray();
161 size_t m_resolutionX;
162 size_t m_resolutionY;
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
std::tuple< const agxCollide::Mesh *, agx::AffineMatrix4x4, agxCollide::BoundingAABB > MeshIntersectionTestData
Pure virtual interface class for the data storage grid classes we have.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes...
A convex class for geometric intersection tests.
Class representing the mathematical concept of a plane, also called a half- space.
Extended pure virtual interface for Grid storage classes.
The geometry representation used by the collision detection engine.
Vector containing 'raw' data.
std::tuple< const agxCollide::Shape *, agx::AffineMatrix4x4, agxCollide::BoundingAABB > ShapeIntersectionTestData
#define AGXTERRAIN_EXPORT
Class implementing the BasicGrid interface.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
std::function< void(GridCoord, float)> GridFunction
Axis aligned bounding box implementation.
A HeightField is a collision shape that can be created from a grid structure, like an image...