37 virtual agx::Vec3 getElementSize()
const override;
39 virtual size_t getMemoryUsage()
const override;
41 virtual bool empty()
override;
43 virtual void clearGrid()
override;
45 virtual void setFloatValue(
const GridCoord& ijk,
float value)
override;
47 virtual float getFloatValue(
const GridCoord& ijk)
const override;
49 virtual bool isActiveVoxel(
const GridCoord& )
const override;
51 virtual size_t getNumActiveVoxels()
const override;
53 virtual agx::Real getTotal()
const override;
55 virtual std::tuple<float, float> getTotalAndLargest()
const override;
59 virtual void sizeHint(
size_t )
override;
61 virtual bool hasIterateSupport()
const override;
63 virtual void iterateVoxels(
GridFunction )
const override;
68 bool =
true)
const override;
72 virtual void setValuesBelowHeightField(
75 int lowestAllowedVoxelIndex,
102 std::function<
float(
const agx::Vec3i&)> getCompression,
103 std::function<
bool(
const agx::Vec2i&)> canRemoveIndex,
107 bool useParticleFreeDeformers)
override;
113 std::function<
float(
const agx::Vec3i&)> getCompression,
114 std::function<
bool(
const agx::Vec2i&)> canRemoveIndex,
118 bool useParticleFreeDeformers)
override;
126 int getSurfaceHeightIndex(
const agx::Vec2i terrainIndex);
128 std::pair<int, float> getVoxelZAndOccupancyFromLocalHeight(
agx::Real height,
agx::Real voxelSize);
130 void setGridColumnOccupancy(
const agx::Vec2i terrainIndex,
int voxelZ,
float occupancy);
132 void setOccupancyInSurfaceVoxel(
const agx::Vec2i terrainIndex,
float occupancy);
137 int getDepth()
const;
151 void allocateMassArray();
157 size_t m_resolutionX;
158 size_t m_resolutionY;