17 #ifndef AGXQT_FILTER_H
18 #define AGXQT_FILTER_H
20 #include <agx/config/AGX_USE_KEYSHOT.h>
31 class ParticleRenderFilter;
#define AGX_DECLARE_POINTER_TYPES(type)
This is a class that filters particles from certain criteria.
LambdaParticleRenderFilter(const agx::Name &name, const ParticleFilterFunction &function)
ParticleFilterFunction m_filterFunction
std::function< bool(agx::ParticleSystem *, agx::Physics::ParticlePtr)> ParticleFilterFunction
virtual void postRender(agx::ParticleSystem *system) override
Execute after render state.
virtual ~LambdaParticleRenderFilter()
virtual void preRender(agx::ParticleSystem *system) override
Execute on particles before rendering.
ParticleFilterMode getActiveParticleRenderFilterMode() const
Returns the ParticleFilterMode struct for the active filter in the manager.
void postRender(agx::ParticleSystem *system)
Execute after render state.
void initStandardFilters()
void resetParticleFilterState(agx::ParticleSystem *system) const
Resets the filtered state in the particle system.
agx::Real getFilterThresholdScalar() const
Returns the filter threshold of the ParticleRenderFilter.
ParticleRenderFilterModeVector getAvailableParticleRenderModes() const
Returns the ParticleFilterMode structs added to the manager.
void setActiveParticleRenderFilter(ParticleFilterMode mode)
Switches active particle render filter based on a ParticleFilter mode.
void setFilterThresholdScalar(agx::Real threshold)
Sets the filter threshold of the ParticleRenderFilter.
ParticleRenderFilter * m_activeParticleFilter
agx::Real m_scalarThreshold
agx::HashTable< agx::Name, ParticleFilterMode > ParticleColorModeTable
ParticleRenderFilterManager()
ParticleColorModeTable m_availableParticleFilters
void preRender(agx::ParticleSystem *system)
Execute on particles before rendering.
~ParticleRenderFilterManager()
void setActiveParticleRenderFilterFromString(const agx::String &name)
Switches active particle render filter based on name identifier.
bool particleRenderFilterExists(const agx::String &name)
Returns true/false if an ParticleRenderFilter with given name identifier exists in the manager.
This is a base abstract class for filtering particles.
agx::Name getName() const
Returns the name type identifier for the ParticleFilter.
virtual void postRender(agx::ParticleSystem *system)=0
Execute after render state.
void setScalarRenderThreshold(agx::Real scalarThreshold)
Sets the filter threshold of the ParticleRenderFilter.
agx::Real m_scalarThreshold
void filterParticle(agx::Physics::ParticlePtr ptr, bool shouldFilter)
virtual void preRender(agx::ParticleSystem *system)=0
Execute on particles before rendering.
virtual ~ParticleRenderFilter()
ParticleRenderFilter(const agx::Name &name)
static const char *const PARTICLEFILTER_NONE_NAME
This is a class that filters particles from certain criteria.
virtual ~ParticleVelocityRenderFilter()
virtual void postRender(agx::ParticleSystem *system) override
Execute after render state.
virtual void preRender(agx::ParticleSystem *system) override
Execute on particles before rendering.
ParticleVelocityRenderFilter()
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.
Contains classes/utility functions for connecting AGX to QT with OSG.
ParticleFilterMode AGXQT_EXPORT createNoneParticleFilterMode()
std::function< ParticleRenderFilter *()> ParticleFilterConstructor
Struct containing information and constructors for a specific particle filter, that removes rendering...
agx::Vector< ParticleFilterMode > ParticleRenderFilterModeVector
ParticleFilterConstructor m_constructor
bool operator==(const ParticleFilterMode &rhs)