17 #ifndef AGXMODEL_TERRAIN_DATA_INTERFACE_H 18 #define AGXMODEL_TERRAIN_DATA_INTERFACE_H 40 #define MAX_NUMBER_MATERIALS 256 55 size_t getLocalVertexIndexWithLargestInfluence()
const;
151 virtual void setMaterialMapping(
const std::string& filePath );
159 void setMaterialMapping(
const size_t x,
const size_t y,
const size_t materialIndex );
166 void setMaxYoungsChangePerTimestep(
agx::Real maxScaleOfYoungsOneTimestep );
172 void setShovelGroundCuttingForce(
agx::Real force );
177 agx::Real getShovelGroundCuttingForce()
const;
182 SizeTConstMaterialRefPairTable::const_iterator getMaterialIndexBeginIterator()
const;
187 SizeTConstMaterialRefPairTable::const_iterator getMaterialIndexEndIterator()
const;
213 virtual agx::Real getCompression(
size_t x,
size_t y )
const;
220 virtual void setCompression(
size_t x,
size_t y ,
const agx::Real val );
234 void setMaxCompressionMultiplier(
agx::Real maxCompressionMultiplier );
239 agx::Real getMaxCompressionMultiplier()
const;
245 void setDepthForMaxCompression(
agx::Real depthForMaxCompression );
250 agx::Real getDepthForMaxCompression()
const;
259 void setInverseFrictionMultiplier(
agx::Real inverseFrictionMultiplier );
264 agx::Real getInverseFrictionMultiplier( )
const;
271 const agx::Material* getParticleMaterial(
const size_t x,
const size_t y )
const;
277 const agx::Material* getParticleMaterial(
const size_t materialIndex )
const;
284 agx::Real getDeformability(
const size_t x,
const size_t y)
const;
291 agx::Real getTanOfTheAngleOfRepose(
const size_t x,
const size_t y)
const;
298 size_t getMaterialIndex(
const size_t x,
const size_t y)
const;
305 const agx::Material* getMaterial(
const size_t x,
const size_t y)
const;
311 const agx::Material* getMaterial(
const size_t materialIndex)
const;
316 size_t getResolutionX()
const;
321 size_t getResolutionY()
const;
326 size_t getNumberOfVertices()
const;
331 bool isValid()
const;
336 size_t getVectorIndex(
size_t x,
size_t y )
const;
341 void getCoordinates(
size_t i,
size_t& x,
size_t& y )
const;
346 void getCoordinates(
size_t i,
int& x,
int& y )
const;
370 void updateAvalanceHeatMap(
const size_t vectorIndex,
const size_t value );
371 void updateAvalanceHeatMap(
const size_t x,
const size_t y,
const size_t value );
376 void tickDownAvalancheHeatMap();
378 size_t getAvalancheHeatMapSize();
380 size_t getAvalancheHeatMapValue(
const size_t index );
395 void allocateDynamicHeightFieldParticles(
Terrain* terrain);
397 void disableDynamicHeightFieldParticles(
size_t numberOfUsedParticles );
403 void regretParticleFromBack(
size_t indexFromBack );
413 void updateCompression(
size_t x,
size_t y,
agx::Real deltaDiggingHeightShrink,
agx::Real compressionFromOverlap );
442 void removeExistingParticleParticleContactMaterials(
agxSDK::Simulation* simulation );
459 bool getMaterialsAreDirty()
const;
464 void clearImpactVolumeData( );
524 #endif //AGXMODEL_TERRAIN_DATA_INTERFACE_H
AGXTERRAIN_EXPORT void clear()
agx::Vector< agx::ref_ptr< const agx::Material > > ConstMaterialRefVector
agx::HashTable< size_t, ConstMaterialRefPair > SizeTConstMaterialRefPairTable
agx::Vector< ImpactVolumeDataRef > ImpactVolumeDataRefVector
agx::Real m_shovelGroundCuttingForce
ImpactVolumeDataRefVector m_impactVolumeDataStorage
Base class for all friction models with interface and some utility/necessary methods implemented...
This namespace consists of a set of classes for handling geometric intersection tests including boole...
agx::RealVector m_materialIndexToDeformability
agx::RealVector m_externalMaterialSurfaceViscosity
size_t m_numberOfUsedImpactVolumes
agx::Real m_inverseFrictionMultiplier
agx::RealVector m_materialIndexToTanOfAngleOfRepose
agx::RealVector m_compression
agx::Vector< size_t > SizeTVector
size_t m_numberOfUsedParticles
agx::Vector< ImpactVolumeData *> ImpactVolumeDataPtrVector
agx::ref_ptr< TerrainDataInterface > TerrainDataInterfaceRef
Base class providing referencing counted objects.
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
SizeTVector m_materialIndexMap
agx::ref_ptr< ImpactVolumeData > ImpactVolumeDataRef
SizeTConstMaterialRefPairTable m_indexToMaterial
SizeTVector m_avalancheHeatMap
std::pair< agx::ref_ptr< const agx::Material >, agx::ref_ptr< const agx::Material > > ConstMaterialRefPair
agx::Vector< const agx::ContactMaterial *> ConstContactMaterialVector
Smart pointer for handling referenced counted objects.
agxCollide::ContactPoint * contactPoint
ConstMaterialRefVector m_externalMaterialsInteractingWithParticles
The rigid body class, combining a geometric model and a frame of reference.
Main material class which acts as a holder of a Surface Material and a Bulk material.
agx::Real m_depthForMaxCompression
agx::RigidBodyRefVector m_dynamicHeightFieldParticles
This class implements an interface for how the terrain accesses the data it needs to access data item...
First Normal equation is calculated in the DIRECT solver, then in a second pass the normal and the fr...
agx::FrictionModel::SolveType m_particleFrictionSolveType
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
agx::Real m_maxYoungsChangePerTimestepPOW2
agx::Real m_maxCompressionMultiplier
Inheritance with partial specialization due to bug with ref_ptr containers.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
A HeightField is a collision shape that can be created from a grid structure, like an image...