|
AGX Dynamics 2.42.3.1
|
Class for calculating different granular fields. More...
#include <GranularFieldPostProcessor.h>
Inheritance diagram for agxModel::GranularFieldPostProcessor:Public Member Functions | |
| GranularFieldPostProcessor (agx::Physics::GranularBodySystem *gbs, const agx::Vec3u &voxelCount, const agx::Vec3 &halfExtents) | |
| GranularFieldPostProcessor that computes voxel discretized granular fields for a given granular body system inside a rectangular volume. | |
| bool | addField (agxModel::GranularField *gf) |
| Adds a new field. | |
| bool | calculateFields () |
| Sorts particles into voxels and calculate the fields that are added to this class. | |
| void | createDebugVisualization (agxSDK::Simulation *simulation) |
| Set position of the field volume in world coordinates. | |
| agxModel::GranularField * | getField (const agx::String &name) |
| Get a field added to the GranularFieldPostProcessor. | |
| const agxModel::GranularFieldRefVector & | getFields () |
| agx::Frame * | getFrame () |
| agx::Physics::GranularBodySystem * | getGranularBodySystem () |
| agx::Vec3 | getHalfExtents () |
| agx::Vec3u | getVoxelCount () |
| agx::Vec3 | getVoxelSize () |
| agx::Real | getVoxelVolume () |
| bool | removeField (const agx::String &name) |
| Remove field with this name. | |
| void | setPosition (const agx::Vec3 &pos) |
| Set position of the field volume in world coordinates. | |
| void | setRotation (const agx::Quat &quat) |
| Set rotation of the field volume in world coordinates. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Attributes | |
| agxData::BufferRef | m_particleInfo |
| agxData::BufferRef | m_particleVoxelIndices |
| agxData::BufferRef | m_particleVoxelWeights |
Protected Member Functions | |
| virtual | ~GranularFieldPostProcessor () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
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. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Class for calculating different granular fields.
The fields are discretized into voxels and every particle in the system is sorted into voxels together with a weight. The field value in every voxel is then the weighted sum of the particles in that voxel.
Definition at line 42 of file GranularFieldPostProcessor.h.
| agxModel::GranularFieldPostProcessor::GranularFieldPostProcessor | ( | agx::Physics::GranularBodySystem * | gbs, |
| const agx::Vec3u & | voxelCount, | ||
| const agx::Vec3 & | halfExtents | ||
| ) |
GranularFieldPostProcessor that computes voxel discretized granular fields for a given granular body system inside a rectangular volume.
| gbs | - Granular body system for the field |
| voxelCount | - How many voxel in each dimension to fit inside the volume |
| halfExtents | - Half size of volumes sides |
|
protectedvirtual |
| bool agxModel::GranularFieldPostProcessor::addField | ( | agxModel::GranularField * | gf | ) |
Adds a new field.
This allocates memory in the field class given the shape of the field defined in this class
| gf | - GranularField that should be calculated by the GranularFieldPostProcessor |
| bool agxModel::GranularFieldPostProcessor::calculateFields | ( | ) |
Sorts particles into voxels and calculate the fields that are added to this class.
| void agxModel::GranularFieldPostProcessor::createDebugVisualization | ( | agxSDK::Simulation * | simulation | ) |
Set position of the field volume in world coordinates.
| simulation | - simulation |
| agxModel::GranularField * agxModel::GranularFieldPostProcessor::getField | ( | const agx::String & | name | ) |
Get a field added to the GranularFieldPostProcessor.
| name | - Name of the field to get |
| const agxModel::GranularFieldRefVector & agxModel::GranularFieldPostProcessor::getFields | ( | ) |
| agx::Frame * agxModel::GranularFieldPostProcessor::getFrame | ( | ) |
| agx::Physics::GranularBodySystem * agxModel::GranularFieldPostProcessor::getGranularBodySystem | ( | ) |
| agx::Vec3 agxModel::GranularFieldPostProcessor::getHalfExtents | ( | ) |
| agx::Vec3u agxModel::GranularFieldPostProcessor::getVoxelCount | ( | ) |
| agx::Vec3 agxModel::GranularFieldPostProcessor::getVoxelSize | ( | ) |
| agx::Real agxModel::GranularFieldPostProcessor::getVoxelVolume | ( | ) |
| bool agxModel::GranularFieldPostProcessor::removeField | ( | const agx::String & | name | ) |
Remove field with this name.
| name | - Remove granularField with this name |
| void agxModel::GranularFieldPostProcessor::setPosition | ( | const agx::Vec3 & | pos | ) |
Set position of the field volume in world coordinates.
| pos | - position in world coordinates |
| void agxModel::GranularFieldPostProcessor::setRotation | ( | const agx::Quat & | quat | ) |
Set rotation of the field volume in world coordinates.
| quat | - rotation in world coordinates |
| agxData::BufferRef agxModel::GranularFieldPostProcessor::m_particleInfo |
Definition at line 145 of file GranularFieldPostProcessor.h.
| agxData::BufferRef agxModel::GranularFieldPostProcessor::m_particleVoxelIndices |
Definition at line 146 of file GranularFieldPostProcessor.h.
| agxData::BufferRef agxModel::GranularFieldPostProcessor::m_particleVoxelWeights |
Definition at line 147 of file GranularFieldPostProcessor.h.