Class for calculating different granular fields.
agx::Real getVoxelVolume()
virtual ~GranularFieldPostProcessor()
agxData::BufferRef m_particleInfo
bool addField(agxModel::GranularField *gf)
Adds a new field.
void setRotation(const agx::Quat &quat)
Set rotation of the field volume in world coordinates.
agxModel::GranularField * getField(const agx::String &name)
Get a field added to the GranularFieldPostProcessor.
agx::Vec3 getHalfExtents()
const agxModel::GranularFieldRefVector & getFields()
bool calculateFields()
Sorts particles into voxels and calculate the fields that are added to this class.
void setPosition(const agx::Vec3 &pos)
Set position of the field volume in world coordinates.
bool removeField(const agx::String &name)
Remove field with this name.
agxData::BufferRef m_particleVoxelIndices
void createDebugVisualization(agxSDK::Simulation *simulation)
Set position of the field volume in world coordinates.
agxData::BufferRef m_particleVoxelWeights
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 ...
agx::Vec3u getVoxelCount()
agx::Physics::GranularBodySystem * getGranularBodySystem()