62 void setAvalancheDecayPrecent(
agx::Real avalancheDecayPrecent);
64 agx::Real getAvalancheDecayPrecent()
const;
66 void setAvalancheMaxHeightGrowth(
agx::Real maxHeightGrowth);
68 agx::Real getAvalancheMaxHeightGrowth()
const;
87 SurfaceInfoTable m_surfaceInfoTable;
89 void applyGrowthMap();
91 agx::
Real findReposeHeightDifference(const agx::Vec2i& v1, const agx::Vec2i& v2);
93 void generateVertexNeighborList(const agx::Vec2i& surfaceVertex, agx::StackArray<agx::Vec2i, 8>& neighborList );
95 agx::
Real calculateOccupancyTransfer(const agx::Vec2i& surfaceVertex, agx::
Real heightDifference);
97 agx::
Real calculateMaximumOccupancyTransfer();
100 class AvalancheIterationMap
117 return m_avalancheIterationVector[toIndex(k)];
123 size_t vectorIndex = toIndex(k);
124 if (!m_avalancheIterationVector[vectorIndex].contains(index))
126 m_avalancheIterationVector[vectorIndex].push_back(index,index);
132 size_t vectorIndex = toIndex(k);
133 if (vectorIndex > m_avalancheIterationVector.size() - 1)
136 return m_avalancheIterationVector[vectorIndex].contains(index);
151 size_t vectorIndex = toIndex(k);
152 if (vectorIndex > m_avalancheIterationVector.size() - 1)
154 m_avalancheIterationVector.resize(vectorIndex + 1);
171 m_avalancheIterationVector.clear();
176 return m_avalancheIterationVector.size();
186 void avalanche(
const agx::Vec2i vertexXY, AvalancheIterationMap& avalancheMap);
201 return m_modifiedTerrainVertices;
206 return m_avalanchedTerrainVertices;
AGXTERRAIN_EXPORT void clear()
#define AGXTERRAIN_STORE_RESTORE_INTERFACE
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
const TerrainIndexSet & getModifiedVertices() const
#define AGX_DECLARE_POINTER_TYPES(type)
Base class providing referencing counted objects.
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
#define AGXTERRAIN_EXPORT
const TerrainIndexSet & getAvalanchedVertices() const
Inheritance with partial specialization due to bug with ref_ptr containers.
LinearProbingHashTable< KeyT, DataT, HashT, AllocatorT > HashTable
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()