89 void applyGrowthMap();
93 void generateVertexNeighborList(const
agx::
Vec2i& surfaceVertex,
agx::StackArray<
agx::
Vec2i, 8>& neighborList );
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;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXTERRAIN_STORE_RESTORE_INTERFACE
#define AGXTERRAIN_EXPORT
void setAvalancheDecayPrecent(agx::Real avalancheDecayPrecent)
void setForbiddenVertices(const TerrainIndexSet &forbiddenVertices)
const TerrainIndexSet & getModifiedVertices() const
const TerrainIndexSet & getAvalanchedVertices() const
void setIndicesToAvalanche(const TerrainIndexSet &indicesToAvalanche)
agx::Real getAvalancheMaxHeightGrowth() const
AvalancheController(Terrain *terrain)
Construct given terrain instance.
void setAvalancheMaxHeightGrowth(agx::Real maxHeightGrowth)
agx::Real getAvalancheDecayPrecent() const
void addIndicesToAvalanche(const TerrainIndexSet &indicesToAvalanche)
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Inheritance with partial specialization due to bug with ref_ptr containers.
Base class providing referencing counted objects.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
AGXTERRAIN_EXPORT void clear()
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
LinearProbingHashTable< KeyT, DataT, HashT, AllocatorT > HashTable