17 #ifndef AGXQT_PARTICLEPOSTPROCESSCOLORER_H
18 #define AGXQT_PARTICLEPOSTPROCESSCOLORER_H
21 #include <osg/ref_ptr>
40 class ParticleColorer;
135 void setEnableModifyScalarFromAlpha(
bool enable);
137 void setLimitInBound(
bool limitInBound);
139 bool getLimitInBound()
const;
#define AGX_DECLARE_POINTER_TYPES(type)
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
ParticleColorMode getActiveParticleColorMode() const
bool getLimitInBound() const
void addCustomColorMode(const agx::String &name, ParticleColorer::GetParticleRealFunc getRealFunc, const agx::String &unitString)
agx::HashTable< agx::Name, ParticleColorMode > ParticleColorModeTable
agx::Real getMinScalar() const
agx::Real getMaxScalar() const
void colorParticles(agx::ParticleSystem *system)
void setParticleColorModeFromName(const agx::String &name)
bool m_modifyAlphaFromScalar
void setAnalysisBox(const agx::AnalysisBox *analysisBox)
bool shouldLimitColorToBound() const
bool particleColorModeExists(const agx::String &name)
void setMaxScalar(agx::Real maxScalar)
const agx::AnalysisBox * m_analysisBox
ParticleColorModeTable m_particleColorModeTable
void setLimitInBound(bool limitInBound)
ParticleColorerRef m_activeParticleColorer
void setParticleColorMode(ParticleColorMode mode)
ParticleColorModeVector getAvailableParticleColorModes()
agxOSG::ScalarColorMap * getColorMap() const
void setMinScalar(agx::Real minScalar)
void setEnableModifyScalarFromAlpha(bool enable)
virtual ~ParticleColorerManager()
agxOSG::ScalarColorMapRef m_colorMap
static const char *const COLORMODE_NONE_NAME
virtual ~ParticleColorer()
agx::Name getName() const
ParticleColorer(const agx::Name &name)
void applyColorFromMap(agx::Vec4f &targetColorData, agx::Real scalar, bool modifyAlpha)
std::function< agx::Real(agx::ParticleSystem *, agx::Physics::ParticlePtr)> GetParticleRealFunc
agxOSG::ScalarColorMap * getColorMap() const
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha)=0
virtual void initColorRange(agx::Real minScalar, agx::Real maxScalar)
Implements the particle post processor colorer for contact force.
ParticlePostPorcessColorerContactForce()
virtual ~ParticlePostPorcessColorerContactForce()
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
Implements the particle post processor colorer for velocities.
bool m_shouldResetPostions
agx::HashTable< agx::Index, agx::Vec3 > m_particleIdToPosition
virtual ~ParticlePostPorcessColorerDisplacement()
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
ParticlePostPorcessColorerDisplacement()
Implements the particle post processor colorer for contact force.
ParticlePostPorcessColorerHeight(const agx::Name &name, const agx::Vec3 &heightAxis=agx::Vec3::Z_AXIS())
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
virtual ~ParticlePostPorcessColorerHeight()
Implements the particle post processor colorer for velocities.
ParticlePostPorcessColorerLambda(const agx::Name &name, ParticleColorer::GetParticleRealFunc getRealFunc)
GetParticleRealFunc m_getRealFunc
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
virtual ~ParticlePostPorcessColorerLambda()
Implements the particle post processor colorer for contact force.
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
virtual ~ParticlePostPorcessColorerRadius()
ParticlePostPorcessColorerRadius()
Implements the particle post processor colorer for velocities.
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
virtual ~ParticlePostPorcessColorerVelocity()
ParticlePostPorcessColorerVelocity()
Implements the particle post processor colorer for velocities.
virtual ~ParticlePostPorcessKineticEnergy()
virtual void colorParticles(agx::ParticleSystem *system, bool limitBound, const agx::Bound3 &bound, bool modifyAlpha) override
ParticlePostPorcessKineticEnergy()
Class that can be used to extract data from elements in a simulation within a specified bound.
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
A basic particle system that contains all the storages and buffers required for basic operation and a...
Pointer to a entity instance of type Physics.Particle.
Base class providing referencing counted objects.
A class holding 4 dimensional vectors and providing basic arithmetic.
Contains classes/utility functions for connecting AGX to QT with OSG.
agx::Vector< ParticleColorMode > ParticleColorModeVector
std::function< ParticleColorer *()> ColorerConstructor
ParticleColorMode.
ParticleColorMode AGXQT_EXPORT createNoneParticleColorMode()
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool operator==(const ParticleColorMode &rhs)
ColorerConstructor m_constructor