17 #ifndef AGXQT_QTOSGUTILS_H 18 #define AGXQT_QTOSGUTILS_H 20 #include <agx/config/AGX_USE_KEYSHOT.h> 37 #include <osgViewer/ViewerEventHandlers> 39 #include <osgViewer/Renderer> 40 #include <osgSim/ColorRange> 41 #include <osgSim/ScalarsToColors> 76 bool getEnable()
const;
78 void setEnable(
bool enable);
80 bool getEnableRendering()
const;
82 void setEnableRendering(
bool enable);
89 void incrementClipPlane();
92 void decrementClipPlane();
97 void updateClipPlaneFromIncrement(
agx::Real increment );
126 void setMaxPositionPoints(
agx::UInt posPoints );
130 void setEnable(
bool enable );
132 bool getEnable()
const;
140 void resetTrajectoires();
174 void setEnable(
bool enable);
176 bool getEnable()
const;
180 void setMinNetworkForce(
agx::Real minForce);
184 void setMaxNetworkForce(
agx::Real minForce);
197 AGX_FORCE_INLINE void ParticleContactGraphRenderer::setEnable(
bool enable) { m_graphDrawable->setEnable(enable); }
199 AGX_FORCE_INLINE bool ParticleContactGraphRenderer::getEnable()
const {
return m_graphDrawable->getEnable(); }
233 void setParticleColorModeFromName(
const agx::String& mode);
241 void setMaxColorScalar(
agx::Real maxVel);
243 void setMinColorScalar(
agx::Real minVel);
251 void setLimitColoringToAnalysisBound(
bool enable);
253 bool getLimitColoringToAnalysisBound()
const;
255 void setShowColorLegend(
bool enable,
int width,
int height);
257 void setShowColorLegend(
bool enable);
259 void updateColorLegend(
int width,
int height);
261 void refreshColorLegend();
263 bool getShowColorLegend()
const;
265 void setEnableParticleRendering(
bool enable);
267 bool getEnableParticleRendering()
const;
271 void preRenderBodies();
277 void addCustomColorers();
279 bool hasOpenColorLegend()
const;
281 void resetParticleFilteredState();
295 void resetAlphaOnColors();
297 void setAlphaOnParticles(
agx::Real alpha);
299 void removeColorLegend();
333 AGX_FORCE_INLINE void ParticleSystemRenderUtility::setLimitColoringToAnalysisBound(
bool enable) { m_particleColorerManager->setLimitInBound(enable); }
335 AGX_FORCE_INLINE bool ParticleSystemRenderUtility::getLimitColoringToAnalysisBound()
const {
return m_particleColorerManager->getLimitInBound(); }
339 if (m_particleColorerManager)
340 return m_particleColorerManager->getMinScalar();
347 if (m_particleColorerManager)
348 return m_particleColorerManager->getMaxScalar();
353 AGX_FORCE_INLINE bool ParticleSystemRenderUtility::getEnableParticleRendering()
const {
return m_enableParticleRendering; }
363 #if AGX_USE_KEYSHOT() 367 class KeyShotParticleDumper
369 KeyShotParticleDumper();
374 static void exportCurrentJournalFrameToBip(
int frame,
agx::UInt m_numTrajectoryPositions
agxOSG::ParticleContactGraphDrawable * m_graphDrawable
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
osg::Geode * createCubeLines(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
agx::ParticleSystem * m_system
Derive from this class to implement a listener for simulation step events.
This utility class is used for post processing of the particle system drawable representation, such as alpha rendering and velocity color.
agxQt::QtAgxWrapper * m_qtAgxWrapper
osg::ref_ptr< agxOSG::ParticleTrajectoriesDrawable > m_particleTrajectoryDrawable
agx::ParticleSystem * m_particleSystem
osg::ref_ptr< agxQt::GranularImpactsDrawable > m_impactsDrawable
Contains classes/utility functions for connecting AGX to QT with OSG.
#define AGX_DECLARE_POINTER_TYPES(type)
bool m_enableParticleRendering
This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane...
agx::ParticleSystem * m_particleSystem
osg::observer_ptr< osg::Group > m_root
Base class providing referencing counted objects.
osg::observer_ptr< osg::Group > m_root
A basic particle system that contains all the storages and buffers required for basic operation and a...
osg::Geode * createPlaneLines(const agx::Vec3 &position, const agx::Vec3 &normal, agx::Real size)
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
osg::ref_ptr< osg::Geode > m_trajectoryGeode
Class that can be used to extract data from elements in a simulation within a specified bound...
ParticleColorerManagerRef m_particleColorerManager
osg::ref_ptr< agxOSG::RigidBodyTrajectoryDrawable > m_RBTrajectorydrawable
ParticleRenderFilterManagerRef m_particleRenderFilterManager
Class that describes an abstract camera and it's properties.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Class that is used to manipulate the clip plane in the scene.
ParticleContactGraphRendererRef m_particleContactGraphRenderer
osg::ref_ptr< agxOSG::ParticleSystemDrawable > m_psDrawable
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
AGXCORE_EXPORT Component * root()
Class that wraps SimulationController with an interface that enables QT Gui signals to control the si...
osg::Geode * createCube(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
osg::ref_ptr< osg::Group > m_hudGroup
osg::observer_ptr< osg::Group > m_root
agxOSG::ClipPlane * m_clipPlane