44 AvalancheController(Terrain* terrain);
51 AvalancheController();
63 void setAvalancheDecayFraction(
agx::Real avalancheDecayFraction);
65 agx::Real getAvalancheDecayFraction()
const;
67 void setAvalancheMaxHeightGrowth(
agx::Real maxHeightGrowth);
69 agx::Real getAvalancheMaxHeightGrowth()
const;
83 virtual ~AvalancheController();
90 SurfaceInfoTable m_surfaceInfoTable;
92 void applyGrowthMap();
103 class AvalancheIterationMap
120 return m_avalancheIterationVector[toIndex(k)];
126 size_t vectorIndex = toIndex(k);
127 if (!m_avalancheIterationVector[vectorIndex].contains(index))
129 m_avalancheIterationVector[vectorIndex].push_back(index,index);
135 size_t vectorIndex = toIndex(k);
136 if (vectorIndex > m_avalancheIterationVector.size() - 1)
139 return m_avalancheIterationVector[vectorIndex].contains(index);
154 size_t vectorIndex = toIndex(k);
155 if (vectorIndex > m_avalancheIterationVector.size() - 1)
157 m_avalancheIterationVector.resize(vectorIndex + 1);
174 m_avalancheIterationVector.clear();
179 return m_avalancheIterationVector.size();
189 void avalanche(
const agx::Vec2i vertexXY, AvalancheIterationMap& avalancheMap);
203 AGX_FORCE_INLINE const AvalancheController::TerrainIndexSet& AvalancheController::getModifiedVertices()
const
205 return m_modifiedTerrainVertices;
208 AGX_FORCE_INLINE const AvalancheController::TerrainIndexSet& AvalancheController::getAvalanchedVertices()
const
210 return m_avalanchedTerrainVertices;
215 return m_touchedTerrainIndices;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXTERRAIN_STORE_RESTORE_INTERFACE
#define AGXTERRAIN_EXPORT
Inheritance with partial specialization due to bug with ref_ptr containers.
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.
Templated stack array class.
Vector containing 'raw' data.
#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.
agx::HashSet< agx::Vec2i > TerrainIndexSet
The agx namespace contains the dynamics/math part of the AGX Dynamics API.