 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
34 const size_t resolutionX,
35 const size_t resolutionY,
41 virtual agx::Vec3 getElementSize()
const override;
43 virtual size_t getMemoryUsage()
const override;
45 virtual bool empty()
override;
47 virtual void clearGrid()
override;
49 virtual void setFloatValue(
const GridCoord& ijk,
float value)
override;
51 virtual float getFloatValue(
const GridCoord& ijk)
const override;
53 virtual bool isActiveVoxel(
const GridCoord& )
const override;
55 virtual size_t getNumActiveVoxels()
const override;
57 virtual agx::Real getTotal()
const override;
59 virtual std::tuple<float, float> getTotalAndLargest()
const override;
63 virtual void sizeHint(
size_t )
override;
65 virtual bool hasIterateSupport()
const override;
67 virtual void iterateVoxels(
GridFunction func)
const override;
73 bool =
true)
const override;
77 virtual void setValuesBelowHeightField(
80 int lowestAllowedVoxelIndex,
88 virtual bool findMeshVoxelIntersections(
106 std::function<
float(
const agx::Vec3i&)> getCompression,
107 std::function<
bool(
const agx::Vec2i&)> canRemoveIndex,
111 bool useParticleFreeDeformers)
override;
115 std::function<
float(
const agx::Vec3i& )> getCompression,
116 std::function<
bool(
const agx::Vec2i& )> canRemoveIndex,
124 virtual void findVoxelSurfaceFromIndex(
const agx::Vec3i& index,
129 int getSurfaceHeightIndex(
const agx::Vec2i terrainIndex);
131 std::pair<int, float> getVoxelZAndOccupancyFromLocalHeight(
agx::Real height,
agx::Real voxelSize);
133 void setGridColumnOccupancy(
const agx::Vec2i terrainIndex,
int voxelZ,
float occupancy);
135 void setOccupancyInSurfaceVoxel(
const agx::Vec2i terrainIndex,
float occupancy);
140 int getDepth()
const;
158 void allocateMassArray();
165 float occupancy = 0.0;
170 GridData m_solidMassArray;
172 size_t m_resolutionX;
173 size_t m_resolutionY;
Mesh is a common base class for triangle meshes, such as Mesh or HeightField.
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
Extended pure virtual interface for Grid storage classes.
A HeightField is a collision shape that can be created from a grid structure, like an image.
Axis aligned bounding box implementation.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Vector containing 'raw' data.
static agx::Vec3i getVoxelIndexFromGridPosition(agx::Vec3 gridPosition, agx::Real voxelSize)
Class representing the mathematical concept of a plane, also called a half- space.
agx::Vec3i getVoxelIndexFromGridPosition(agx::Vec3 position) const
agx::Vec3 getGridPositionFromVoxelIndex(const agx::Vec3i &voxelIndex) const
The geometry representation used by the collision detection engine.
Pure virtual interface class for the data storage grid classes we have.
std::tuple< const agxCollide::Mesh *, agx::AffineMatrix4x4, agxCollide::BoundingAABB > MeshIntersectionTestData
#define AGXTERRAIN_EXPORT
A convex class for geometric intersection tests.
Class implementing the BasicGrid interface.
std::tuple< const agxCollide::Shape *, agx::AffineMatrix4x4, agxCollide::BoundingAABB > ShapeIntersectionTestData
std::function< void(GridCoord, float)> GridFunction
static agx::Vec3 getGridPositionFromVoxelIndex(agx::Vec3i voxelIndex, agx::Real voxelSize)