|
AGXDynamics
2.31.1.0
|
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. More... | |
| bool | addField (agxModel::GranularField *gf) |
| Adds a new field. More... | |
| 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 |
| bool | calculateFields () |
| Sorts particles into voxels and calculate the fields that are added to this class. More... | |
| void | createDebugVisualization (agxSDK::Simulation *simulation) |
| Set position of the field volume in world coordinates. More... | |
| agxModel::GranularField * | getField (const agx::String &name) |
| Get a field added to the GranularFieldPostProcessor. More... | |
| const agxModel::GranularFieldRefVector & | getFields () |
| agx::Frame * | getFrame () |
| agx::Physics::GranularBodySystem * | getGranularBodySystem () |
| agx::Vec3 | getHalfExtents () |
| int | getReferenceCount () const |
| agx::Vec3u | getVoxelCount () |
| agx::Vec3 | getVoxelSize () |
| agx::Real | getVoxelVolume () |
| template<typename T > | |
| bool | is () const |
| Subclass test. 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... | |
| bool | removeField (const agx::String &name) |
| Remove field with this name. More... | |
| void | setPosition (const agx::Vec3 &pos) |
| Set position of the field volume in world coordinates. More... | |
| void | setRotation (const agx::Quat &quat) |
| Set rotation of the field volume in world coordinates. 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... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes | |
| agxData::BufferRef | m_particleInfo |
| agxData::BufferRef | m_particleVoxelIndices |
| agxData::BufferRef | m_particleVoxelWeights |
Protected Member Functions | |
| virtual | ~GranularFieldPostProcessor () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Static Protected Member Functions | |
| 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... | |
Protected Attributes | |
| 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 |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| 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 |
|
protectedinherited |
|
staticprotectedinherited |
| 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 | ( | ) |
|
inherited |
| agx::Vec3u agxModel::GranularFieldPostProcessor::getVoxelCount | ( | ) |
| agx::Vec3 agxModel::GranularFieldPostProcessor::getVoxelSize | ( | ) |
| agx::Real agxModel::GranularFieldPostProcessor::getVoxelVolume | ( | ) |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
| bool agxModel::GranularFieldPostProcessor::removeField | ( | const agx::String & | name | ) |
Remove field with this name.
| name | - Remove granularField with this name |
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
Set position of the field volume in world coordinates.
| pos | - position in world coordinates |
Set rotation of the field volume in world coordinates.
| quat | - rotation in world coordinates |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
| 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.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.