17 #ifndef AGXQT_PARTICLEPOSTPROCESSCOLORER_H 18 #define AGXQT_PARTICLEPOSTPROCESSCOLORER_H 21 #include <osg/ref_ptr> 63 typedef std::function<agx::Real(agx::ParticleSystem*, agx::Physics::ParticlePtr)>
GetParticleRealFunc;
97 return ParticleColorMode{ ParticleColorer::COLORMODE_NONE_NAME, []{
return nullptr; },
"" };
121 void setParticleColorModeFromName(
const agx::String& name);
123 bool particleColorModeExists(
const agx::String& name);
129 ParticleColorModeVector getAvailableParticleColorModes();
135 void setEnableModifyScalarFromAlpha(
bool enable);
137 void setLimitInBound(
bool limitInBound);
139 bool getLimitInBound()
const;
144 void initParticleModes();
148 void initColorRange();
150 bool shouldLimitColorToBound()
const;
175 AGX_FORCE_INLINE void ParticleColorerManager::setLimitInBound(
bool limitInBound) { m_limitInBound = limitInBound; }
177 AGX_FORCE_INLINE bool ParticleColorerManager::getLimitInBound()
const {
return m_limitInBound; }
179 AGX_FORCE_INLINE void ParticleColorerManager::setEnableModifyScalarFromAlpha(
bool enable) { m_modifyAlphaFromScalar = enable; }
255 bool m_shouldResetPostions;
bool m_modifyAlphaFromScalar
ColorerConstructor m_constructor
virtual ~ParticleColorer()
Implements the particle post processor colorer for contact force.
virtual ~ParticlePostPorcessColorerLambda()
virtual ~ParticlePostPorcessColorerHeight()
Implements the particle post processor colorer for contact force.
std::function< agx::Real(agx::ParticleSystem *, agx::Physics::ParticlePtr)> GetParticleRealFunc
A class holding 4 dimensional vectors and providing basic arithmetic.
Implements the particle post processor colorer for velocities.
Contains classes/utility functions for connecting AGX to QT with OSG.
#define AGX_DECLARE_POINTER_TYPES(type)
ParticleColorerRef m_activeParticleColorer
virtual ~ParticlePostPorcessColorerDisplacement()
bool operator==(const ParticleColorMode &rhs)
Representation of a name string.
virtual ~ParticlePostPorcessColorerContactForce()
virtual ~ParticlePostPorcessColorerRadius()
ParticleColorMode AGXQT_EXPORT createNoneParticleColorMode()
Base class providing referencing counted objects.
virtual ~ParticleColorerManager()
Implements the particle post processor colorer for contact force.
A basic particle system that contains all the storages and buffers required for basic operation and a...
const agx::AnalysisBox * m_analysisBox
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
std::function< ParticleColorer *()> ColorerConstructor
ParticleColorMode.
Implements the particle post processor colorer for velocities.
agx::HashTable< agx::Index, agx::Vec3 > m_particleIdToPosition
static const char *const COLORMODE_NONE_NAME
Class that can be used to extract data from elements in a simulation within a specified bound...
Implements the particle post processor colorer for velocities.
ParticleColorModeTable m_particleColorModeTable
virtual ~ParticlePostPorcessColorerVelocity()
Implements the particle post processor colorer for velocities.
virtual ~ParticlePostPorcessKineticEnergy()
agx::HashTable< agx::Name, ParticleColorMode > ParticleColorModeTable
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
agx::Vector< ParticleColorMode > ParticleColorModeVector
Inheritance with partial specialization due to bug with ref_ptr containers.