AGXDynamics  2.31.1.0
agxQt::ParticleColorerManager Class Reference

#include <ParticlePostProcessColorer.h>

+ Inheritance diagram for agxQt::ParticleColorerManager:

Public Types

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

Public Member Functions

 ParticleColorerManager ()
 
void addCustomColorMode (const agx::String &name, ParticleColorer::GetParticleRealFunc getRealFunc, const agx::String &unitString)
 
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
 
void colorParticles (agx::ParticleSystem *system)
 
ParticleColorMode getActiveParticleColorMode () const
 
ParticleColorModeVector getAvailableParticleColorModes ()
 
agxOSG::ScalarColorMap * getColorMap () const
 
bool getLimitInBound () const
 
agx::Real getMaxScalar () const
 
agx::Real getMinScalar () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool particleColorModeExists (const agx::String &name)
 
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 setAnalysisBox (const agx::AnalysisBox *analysisBox)
 
void setEnableModifyScalarFromAlpha (bool enable)
 
void setLimitInBound (bool limitInBound)
 
void setMaxScalar (agx::Real maxScalar)
 
void setMinScalar (agx::Real minScalar)
 
void setParticleColorModeFromName (const agx::String &name)
 
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...
 

Static Public Member Functions

template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~ParticleColorerManager ()
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
void initColorRange ()
 
void initParticleModes ()
 
void setParticleColorMode (ParticleColorMode mode)
 
bool shouldLimitColorToBound () const
 

Static Protected Member Functions

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...
 

Protected Attributes

ParticleColorerRef m_activeParticleColorer
 
const agx::AnalysisBox * m_analysisBox
 
bool m_limitInBound
 
agx::Real m_maxScalar
 
agx::Real m_minScalar
 
bool m_modifyAlphaFromScalar
 
Mutex m_mutex
 
ObserverContainer m_observers
 
ParticleColorModeTable m_particleColorModeTable
 
AtomicValue m_refCount
 

Detailed Description

Definition at line 104 of file ParticlePostProcessColorer.h.

Member Typedef Documentation

◆ ParticleColorModeTable

Constructor & Destructor Documentation

◆ ParticleColorerManager()

agxQt::ParticleColorerManager::ParticleColorerManager ( )

◆ ~ParticleColorerManager()

virtual agxQt::ParticleColorerManager::~ParticleColorerManager ( )
inlineprotectedvirtual

Definition at line 146 of file ParticlePostProcessColorer.h.

Member Function Documentation

◆ addCustomColorMode()

void agxQt::ParticleColorerManager::addCustomColorMode ( const agx::String &  name,
ParticleColorer::GetParticleRealFunc  getRealFunc,
const agx::String &  unitString 
)

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
inherited

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ colorParticles()

void agxQt::ParticleColorerManager::colorParticles ( agx::ParticleSystem *  system)

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ getActiveParticleColorMode()

ParticleColorMode agxQt::ParticleColorerManager::getActiveParticleColorMode ( ) const

◆ getAvailableParticleColorModes()

ParticleColorModeVector agxQt::ParticleColorerManager::getAvailableParticleColorModes ( )

◆ getColorMap()

agxOSG::ScalarColorMap* agxQt::ParticleColorerManager::getColorMap ( ) const

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getLimitInBound()

bool agxQt::ParticleColorerManager::getLimitInBound ( ) const

Definition at line 177 of file ParticlePostProcessColorer.h.

◆ getMaxScalar()

agx::Real agxQt::ParticleColorerManager::getMaxScalar ( ) const

Definition at line 165 of file ParticlePostProcessColorer.h.

◆ getMinScalar()

agx::Real agxQt::ParticleColorerManager::getMinScalar ( ) const

Definition at line 167 of file ParticlePostProcessColorer.h.

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ initColorRange()

void agxQt::ParticleColorerManager::initColorRange ( )
protected

◆ initParticleModes()

void agxQt::ParticleColorerManager::initParticleModes ( )
protected

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ particleColorModeExists()

bool agxQt::ParticleColorerManager::particleColorModeExists ( const agx::String &  name)

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

◆ setAnalysisBox()

void agxQt::ParticleColorerManager::setAnalysisBox ( const agx::AnalysisBox *  analysisBox)

Definition at line 173 of file ParticlePostProcessColorer.h.

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setEnableModifyScalarFromAlpha()

void agxQt::ParticleColorerManager::setEnableModifyScalarFromAlpha ( bool  enable)

Definition at line 179 of file ParticlePostProcessColorer.h.

◆ setLimitInBound()

void agxQt::ParticleColorerManager::setLimitInBound ( bool  limitInBound)

Definition at line 175 of file ParticlePostProcessColorer.h.

◆ setMaxScalar()

void agxQt::ParticleColorerManager::setMaxScalar ( agx::Real  maxScalar)

Definition at line 169 of file ParticlePostProcessColorer.h.

◆ setMinScalar()

void agxQt::ParticleColorerManager::setMinScalar ( agx::Real  minScalar)

Definition at line 171 of file ParticlePostProcessColorer.h.

◆ setParticleColorMode()

void agxQt::ParticleColorerManager::setParticleColorMode ( ParticleColorMode  mode)
protected

◆ setParticleColorModeFromName()

void agxQt::ParticleColorerManager::setParticleColorModeFromName ( const agx::String &  name)

◆ shouldLimitColorToBound()

bool agxQt::ParticleColorerManager::shouldLimitColorToBound ( ) const
protected

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

Member Data Documentation

◆ m_activeParticleColorer

ParticleColorerRef agxQt::ParticleColorerManager::m_activeParticleColorer
protected

Definition at line 162 of file ParticlePostProcessColorer.h.

◆ m_analysisBox

const agx::AnalysisBox* agxQt::ParticleColorerManager::m_analysisBox
protected

Definition at line 158 of file ParticlePostProcessColorer.h.

◆ m_limitInBound

bool agxQt::ParticleColorerManager::m_limitInBound
protected

Definition at line 159 of file ParticlePostProcessColorer.h.

◆ m_maxScalar

agx::Real agxQt::ParticleColorerManager::m_maxScalar
protected

Definition at line 156 of file ParticlePostProcessColorer.h.

◆ m_minScalar

agx::Real agxQt::ParticleColorerManager::m_minScalar
protected

Definition at line 157 of file ParticlePostProcessColorer.h.

◆ m_modifyAlphaFromScalar

bool agxQt::ParticleColorerManager::m_modifyAlphaFromScalar
protected

Definition at line 160 of file ParticlePostProcessColorer.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_observers

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

◆ m_particleColorModeTable

ParticleColorModeTable agxQt::ParticleColorerManager::m_particleColorModeTable
protected

Definition at line 161 of file ParticlePostProcessColorer.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.


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