|
AGX Dynamics
2.35.0.1
|
#include <TerrainDataAtlas.h>
Inheritance diagram for agxTerrain::TerrainDataAtlas:Classes | |
| struct | MassTypeHash |
Public Types | |
| enum | MassType { SOLID , PARTICLE , FLUID } |
Public Member Functions | |
| TerrainDataAtlas (agx::Real voxelSize, size_t resolutionX, size_t resolutionY, agx::Int depth) | |
| Basic Constructor. More... | |
| float | addMass (const Grid::GridCoord &coord, MassType massType, float value) |
| Adds occupancy mass of specific mass type in a voxel with specified 3D-coordinate in voxel index space. More... | |
| void | clearMassGrid (MassType massType) |
| void | clearVelocityGrid () |
| float | getCompactedSolidMass (const Grid::GridCoord &coord) const |
| Get the occupancy mass in a voxel modified by the compaction grid with specified 3D-coordinate in voxel index space. More... | |
| float | getCompaction (const Grid::GridCoord &coord) const |
| Gets the compression data from a voxel in the grid. More... | |
| BasicGrid * | getCompactionGridData () const |
| BasicGrid * | getGridMassData (MassType massType) const |
| agx::Vec3iVector | getIndicesWithMass (MassType massType) const |
| Returns the active indices in voxel index space which contains occupancy mass of a specific mass type. More... | |
| float | getMass (const Grid::GridCoord &coord, MassType massType) const |
| Get the occupancy mass of specific mass type in a voxel with specified 3D-coordinate in voxel index space. More... | |
| agx::Real | getMassInTerrain (MassType massType) const |
| float | getMaximumAllowedSolidMassInVoxel (const Grid::GridCoord &coord) const |
| Returns the maximum allowed solid mass in the voxel. More... | |
| Grid * | getSolidGridMassData () const |
| size_t | getTotalActiveVoxels () const |
| size_t | getTotalGridMemoryUsage () const |
| float | getTotalMassInVoxel (const Grid::GridCoord &coord) const |
| agx::Vec3f | getVelocity (const Grid::GridCoord &coord) const |
| VoxelToVelocityTable & | getVelocityTable () |
| bool | isActiveVoxel (const Grid::GridCoord &coord, MassType massType) const |
| Checks if a voxel is active in data grid of a specific mass type. More... | |
| void | setCompaction (const Grid::GridCoord &coord, float value) |
| Sets compression data in a voxel in the grid. More... | |
| void | setMass (const Grid::GridCoord &coord, MassType massType, float value) |
| Sets the occupancy mass of specific mass type in a voxel with specified 3D-coordinate in voxel index space. More... | |
| void | setVelocity (const Grid::GridCoord &coord, const agx::Vec3f &value) |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Protected Member Functions | |
| virtual | ~TerrainDataAtlas () |
| Reference counted object - protected destructor. More... | |
| void | fillGridVector () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Attributes | |
| BasicGridRef | m_compactionGrid |
| BasicGridRef | m_fluidMassGrid |
| agx::StackArray< BasicGrid *, 3 > | m_gridVector |
| BasicGridRef | m_particleMassGrid |
| Grid * | m_rawSolidMassGrid |
| BasicGridRef | m_solidMassGrid |
| VoxelToVelocityTable | m_voxelToVelocityTable |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Definition at line 33 of file TerrainDataAtlas.h.
| Enumerator | |
|---|---|
| SOLID | |
| PARTICLE | |
| FLUID | |
Definition at line 38 of file TerrainDataAtlas.h.
| agxTerrain::TerrainDataAtlas::TerrainDataAtlas | ( | agx::Real | voxelSize, |
| size_t | resolutionX, | ||
| size_t | resolutionY, | ||
| agx::Int | depth | ||
| ) |
Basic Constructor.
| voxelSize | - The uniform voxel dimension used in the internal transformation of the terrain data grids. |
| resolutionX | - The resolution of the voxel grid in X. |
| resolutionY | - The resolution of the voxel grid in Y. |
|
protectedvirtual |
Reference counted object - protected destructor.
| float agxTerrain::TerrainDataAtlas::addMass | ( | const Grid::GridCoord & | coord, |
| MassType | massType, | ||
| float | value | ||
| ) |
Adds occupancy mass of specific mass type in a voxel with specified 3D-coordinate in voxel index space.
Setting a mass to the voxel with activate it in the specified mass grid.
| coord | - The 3D coordiante of the voxel in the voxel index space. |
| massType | - The type of mass data that should be inserted into the voxel. |
| value | - The occupancy value of the specific type that should be added to the voxel. |
| void agxTerrain::TerrainDataAtlas::clearMassGrid | ( | MassType | massType | ) |
| void agxTerrain::TerrainDataAtlas::clearVelocityGrid | ( | ) |
|
protected |
| float agxTerrain::TerrainDataAtlas::getCompactedSolidMass | ( | const Grid::GridCoord & | coord | ) | const |
Get the occupancy mass in a voxel modified by the compaction grid with specified 3D-coordinate in voxel index space.
The returned mass is modified by the following formula: return = occupancyMass / compaction. This is mainly used when trying to sum compacted soild mass with particle and fluid mass in the same voxel. Particle and fluid occupancy is always defined in nominal compression.
| coord | - The 3D index coordinate in voxel space. |
| float agxTerrain::TerrainDataAtlas::getCompaction | ( | const Grid::GridCoord & | coord | ) | const |
Gets the compression data from a voxel in the grid.
The compression determines how much solid occupancy can exist in a voxel. by the following relation: MAX_SOILD_VOLUME = compression * NOMINAL_MAX_VOLUME
| coord | - The 3D voxel coordinate of the voxel in the voxel index space. |
| BasicGrid* agxTerrain::TerrainDataAtlas::getCompactionGridData | ( | ) | const |
| agx::Vec3iVector agxTerrain::TerrainDataAtlas::getIndicesWithMass | ( | MassType | massType | ) | const |
Returns the active indices in voxel index space which contains occupancy mass of a specific mass type.
| massType | - the specific mass type |
| float agxTerrain::TerrainDataAtlas::getMass | ( | const Grid::GridCoord & | coord, |
| MassType | massType | ||
| ) | const |
Get the occupancy mass of specific mass type in a voxel with specified 3D-coordinate in voxel index space.
| coord | - The 3D index coordinate in voxel space. |
| massType | - The type of mass data that should be extracted from the voxel. |
| float agxTerrain::TerrainDataAtlas::getMaximumAllowedSolidMassInVoxel | ( | const Grid::GridCoord & | coord | ) | const |
Returns the maximum allowed solid mass in the voxel.
This is a function of the current compression in the voxel.
| coord | - The 3D voxel coordinate of the voxel in the voxel index space. |
| Grid* agxTerrain::TerrainDataAtlas::getSolidGridMassData | ( | ) | const |
| size_t agxTerrain::TerrainDataAtlas::getTotalActiveVoxels | ( | ) | const |
| size_t agxTerrain::TerrainDataAtlas::getTotalGridMemoryUsage | ( | ) | const |
| float agxTerrain::TerrainDataAtlas::getTotalMassInVoxel | ( | const Grid::GridCoord & | coord | ) | const |
| agx::Vec3f agxTerrain::TerrainDataAtlas::getVelocity | ( | const Grid::GridCoord & | coord | ) | const |
| VoxelToVelocityTable& agxTerrain::TerrainDataAtlas::getVelocityTable | ( | ) |
| bool agxTerrain::TerrainDataAtlas::isActiveVoxel | ( | const Grid::GridCoord & | coord, |
| MassType | massType | ||
| ) | const |
Checks if a voxel is active in data grid of a specific mass type.
| coord | - The 3D coordiante of the voxel in the voxel index space. |
| massType | - The specified mass type. |
| void agxTerrain::TerrainDataAtlas::setCompaction | ( | const Grid::GridCoord & | coord, |
| float | value | ||
| ) |
Sets compression data in a voxel in the grid.
The compression determines how much solid occupancy can exist in a voxel. by the following relation: MAX_SOILD_VOLUME = compression * NOMINAL_MAX_VOLUME
| coord | - The 3D voxel coordinate of the voxel in voxel index space. |
| value | - The compression value to set to the voxel. |
| void agxTerrain::TerrainDataAtlas::setMass | ( | const Grid::GridCoord & | coord, |
| MassType | massType, | ||
| float | value | ||
| ) |
Sets the occupancy mass of specific mass type in a voxel with specified 3D-coordinate in voxel index space.
Setting a mass to the voxel with activate it in the specified mass grid.
| coord | - The 3D coordinate of the voxel in the voxel index space. |
| massType | - The type of mass data that should be inserted into the voxel. |
| value | - the occupancy value, which can range from [0.0 - 1.0] of the specified mass type that should inserted. |
| void agxTerrain::TerrainDataAtlas::setVelocity | ( | const Grid::GridCoord & | coord, |
| const agx::Vec3f & | value | ||
| ) |
|
protected |
Definition at line 171 of file TerrainDataAtlas.h.
|
protected |
Definition at line 169 of file TerrainDataAtlas.h.
|
protected |
Definition at line 175 of file TerrainDataAtlas.h.
|
protected |
Definition at line 170 of file TerrainDataAtlas.h.
|
protected |
Definition at line 177 of file TerrainDataAtlas.h.
|
protected |
Definition at line 168 of file TerrainDataAtlas.h.
|
protected |
Definition at line 173 of file TerrainDataAtlas.h.