Class for calculating different granular fields.
agx::Real getVoxelVolume()
virtual ~GranularFieldPostProcessor()
agxData::BufferRef m_particleInfo
bool addField(agxModel::GranularField *gf)
Adds a new field.
const agxModel::GranularFieldRefVector & getFields()
void setRotation(const agx::Quat &quat)
Set rotation of the field volume in world coordinates.
agx::Vec3 getHalfExtents()
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.
agxModel::GranularField * getField(const agx::String &name)
Get a field added to the GranularFieldPostProcessor.
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
agx::Physics::GranularBodySystem * getGranularBodySystem()
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()