AGX Dynamics  2.37.2.0
agxQt::ParticleRenderFilterManager Class Reference

#include <ParticleFilters.h>

+ Inheritance diagram for agxQt::ParticleRenderFilterManager:

Public Types

typedef agx::HashTable< agx::Name, ParticleFilterMode > ParticleColorModeTable
 

Public Member Functions

 ParticleRenderFilterManager ()
 
ParticleFilterMode getActiveParticleRenderFilterMode () const
 Returns the ParticleFilterMode struct for the active filter in the manager. More...
 
ParticleRenderFilterModeVector getAvailableParticleRenderModes () const
 Returns the ParticleFilterMode structs added to the manager. More...
 
agx::Real getFilterThresholdScalar () const
 Returns the filter threshold of the ParticleRenderFilter. More...
 
bool particleRenderFilterExists (const agx::String &name)
 Returns true/false if an ParticleRenderFilter with given name identifier exists in the manager. More...
 
void postRender (agx::ParticleSystem *system)
 Execute after render state. More...
 
void preRender (agx::ParticleSystem *system)
 Execute on particles before rendering. More...
 
void resetParticleFilterState (agx::ParticleSystem *system) const
 Resets the filtered state in the particle system. More...
 
void setActiveParticleRenderFilter (ParticleFilterMode mode)
 Switches active particle render filter based on a ParticleFilter mode. More...
 
void setActiveParticleRenderFilterFromString (const agx::String &name)
 Switches active particle render filter based on name identifier. More...
 
void setFilterThresholdScalar (agx::Real threshold)
 Sets the filter threshold of the ParticleRenderFilter. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Protected Member Functions

 ~ParticleRenderFilterManager ()
 
void initStandardFilters ()
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

ParticleRenderFilter * m_activeParticleFilter
 
ParticleColorModeTable m_availableParticleFilters
 
agx::Real m_scalarThreshold
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Protected Member Functions inherited from agx::Referenced
static DeleteHandler * getDeleteHandler ()
 
static void setDeleteHandler (DeleteHandler *handler)
 Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More...
 

Detailed Description

Definition at line 53 of file ParticleFilters.h.

Member Typedef Documentation

◆ ParticleColorModeTable

Constructor & Destructor Documentation

◆ ParticleRenderFilterManager()

agxQt::ParticleRenderFilterManager::ParticleRenderFilterManager ( )

◆ ~ParticleRenderFilterManager()

agxQt::ParticleRenderFilterManager::~ParticleRenderFilterManager ( )
protected

Member Function Documentation

◆ getActiveParticleRenderFilterMode()

ParticleFilterMode agxQt::ParticleRenderFilterManager::getActiveParticleRenderFilterMode ( ) const

Returns the ParticleFilterMode struct for the active filter in the manager.

Returns
The mode identifier of the active particle filter.

◆ getAvailableParticleRenderModes()

ParticleRenderFilterModeVector agxQt::ParticleRenderFilterManager::getAvailableParticleRenderModes ( ) const

Returns the ParticleFilterMode structs added to the manager.

Returns
The modes currently existing in the filter manager

◆ getFilterThresholdScalar()

agx::Real agxQt::ParticleRenderFilterManager::getFilterThresholdScalar ( ) const

Returns the filter threshold of the ParticleRenderFilter.

What this means and how it is interpreted depends on the currently active filter. What it usually means is that if a certain particle value is beneth the threshold, the particle will be filitered out.

Returns
The filter threshold scalar that is used in the particle filter.

◆ initStandardFilters()

void agxQt::ParticleRenderFilterManager::initStandardFilters ( )
protected

◆ particleRenderFilterExists()

bool agxQt::ParticleRenderFilterManager::particleRenderFilterExists ( const agx::String &  name)

Returns true/false if an ParticleRenderFilter with given name identifier exists in the manager.

Parameters
nameThe name identifier for the ParticleRenderFilter
Returns
true/false if ParticleRenderFilter exists.

◆ postRender()

void agxQt::ParticleRenderFilterManager::postRender ( agx::ParticleSystem *  system)

Execute after render state.

◆ preRender()

void agxQt::ParticleRenderFilterManager::preRender ( agx::ParticleSystem *  system)

Execute on particles before rendering.

◆ resetParticleFilterState()

void agxQt::ParticleRenderFilterManager::resetParticleFilterState ( agx::ParticleSystem *  system) const

Resets the filtered state in the particle system.

Usually used after setting the "None" filter as active.

◆ setActiveParticleRenderFilter()

void agxQt::ParticleRenderFilterManager::setActiveParticleRenderFilter ( ParticleFilterMode  mode)

Switches active particle render filter based on a ParticleFilter mode.

This mode must already exist in the manager for the switch to happen.

Parameters
modeThe mode identifier of a particle filter already added in the manager.

◆ setActiveParticleRenderFilterFromString()

void agxQt::ParticleRenderFilterManager::setActiveParticleRenderFilterFromString ( const agx::String &  name)

Switches active particle render filter based on name identifier.

A particle filter with the specified name must exist in the manager for the switch to happen.

Parameters
nameThe name identifier of a particle filter already added in the manager.

◆ setFilterThresholdScalar()

void agxQt::ParticleRenderFilterManager::setFilterThresholdScalar ( agx::Real  threshold)

Sets the filter threshold of the ParticleRenderFilter.

What this means and how it is interpreted depends on the currently active filter. What it usually means is that if a certain particle value is beneth the threshold, the particle will be filitered out.

Parameters
thresholdThe filter threshold scalar to be used in the particle filter.

Member Data Documentation

◆ m_activeParticleFilter

ParticleRenderFilter* agxQt::ParticleRenderFilterManager::m_activeParticleFilter
protected

Definition at line 131 of file ParticleFilters.h.

◆ m_availableParticleFilters

ParticleColorModeTable agxQt::ParticleRenderFilterManager::m_availableParticleFilters
protected

Definition at line 130 of file ParticleFilters.h.

◆ m_scalarThreshold

agx::Real agxQt::ParticleRenderFilterManager::m_scalarThreshold
protected

Definition at line 132 of file ParticleFilters.h.


The documentation for this class was generated from the following file: