17 #ifndef AGXQT_QTOSGUTILS_H
18 #define AGXQT_QTOSGUTILS_H
20 #include <agx/config/AGX_USE_KEYSHOT.h>
23 #include <agxQt/ui_RenderController.h>
25 #include <osgViewer/ViewerEventHandlers>
27 #include <osgViewer/Renderer>
28 #include <osgSim/ColorRange>
29 #include <osgSim/ScalarsToColors>
362 #if AGX_USE_KEYSHOT()
366 class KeyShotParticleDumper
368 KeyShotParticleDumper();
373 static void exportCurrentJournalFrameToBip(
int frame,
#define AGX_DECLARE_POINTER_TYPES(type)
This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane.
agx::Real getMaxForce() const
void setMaxForce(agx::Real maxForce)
void setMinForce(agx::Real minForce)
agx::Real getMinForce() const
void setEnable(bool enable)
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
Class that describes an abstract camera and it's properties.
Class that is used to manipulate the clip plane in the scene.
void updateClipPlaneFromIncrement(agx::Real increment)
void decrementClipPlane()
Decrements the Near plane of the scene in the coupled agxViewer.
agxOSG::ClipPlane * m_clipPlane
void setIncrement(agx::Real increment)
void setEnableRendering(bool enable)
void setPosition(agx::Vec3 position)
void setRotation(const agx::Quat &quat)
agx::Real getIncrement() const
void incrementClipPlane()
Increments the Near plane of the scene in the coupled agxViewer.
agx::Quat getRotation() const
virtual ~ClipPlaneController()
Destructor.
bool getEnableRendering() const
const agx::Vec3 BASE_NORMAL
void setEnable(bool enable)
agx::Vec3 getPosition() const
ClipPlaneController(agxOSG::ClipPlane *clipPlane)
Constructor.
agx::Real getMinNetworkForce() const
agx::ParticleSystem * m_particleSystem
void setMinNetworkForce(agx::Real minForce)
agxOSG::ParticleContactGraphDrawable * m_graphDrawable
agx::Real getMaxNetworkForce() const
virtual ~ParticleContactGraphRenderer()
ParticleContactGraphRenderer(osg::Group *root, agx::ParticleSystem *ps)
void setMaxNetworkForce(agx::Real minForce)
osg::observer_ptr< osg::Group > m_root
void setEnable(bool enable)
This utility class is used for post processing of the particle system drawable representation,...
void setEnableRenderingOnTemplateBodies(const agx::RigidBodyRefVector &bodies, bool enable)
void updateColorLegend(int width, int height)
virtual void post(const agx::TimeStamp &t)
Called after a step is taken in the simulation Implement this method in the derived class to get call...
void setShowColorLegend(bool enable, int width, int height)
agx::Real getMaxColorScalar() const
virtual void pre(const agx::TimeStamp &t)
Called before a step is taken in the simulation Implement this method in the derived class to get cal...
bool m_enableParticleRendering
ParticleColorMode getActiveParticleColorMode() const
osg::ref_ptr< agxQt::GranularImpactsDrawable > m_impactsDrawable
bool getEnableParticleRendering() const
void setEnableRenderOnNSSBodies(const agx::RigidBodyRefVector &bodies, bool enable)
ParticleColorModeVector getAvailableColorModes() const
void setParticleColorModeFromName(const agx::String &mode)
osg::observer_ptr< osg::Group > m_root
bool hasOpenColorLegend() const
virtual ~ParticleSystemRenderUtility()
ParticleSystemRenderUtility(agxQt::QtAgxWrapper *qtagxViewer, osg::Group *root, agxOSG::ParticleSystemDrawable *psdraw, agx::ParticleSystem *system)
agx::Real getMinColorScalar() const
void setEnableParticleRendering(bool enable)
agxOSG::ParticleSystemDrawable * getParticleSystemDrawable()
agx::ParticleSystem * m_system
void setShowColorLegend(bool enable)
ParticleRenderFilterManagerRef m_particleRenderFilterManager
void preRenderParticles(agx::ParticleSystem *system)
osg::ref_ptr< agxOSG::ParticleSystemDrawable > m_psDrawable
void resetAlphaOnColors()
ParticleColorerManagerRef m_particleColorerManager
void setParticleShaderMode(agxOSG::ParticleSystemDrawable::ParticleShaderMode mode)
void setAnalysisBox(const agx::AnalysisBox *box)
bool getShowColorLegend() const
void refreshColorLegend()
void setAlphaValue(agx::Real alpha)
void setLimitColoringToAnalysisBound(bool enable)
agx::Real getAlphaValue() const
osg::ref_ptr< osg::Group > m_hudGroup
void setMinColorScalar(agx::Real minVel)
GranularImpactsDrawable * getGranularImpactsDrawable()
ParticleContactGraphRendererRef m_particleContactGraphRenderer
bool getLimitColoringToAnalysisBound() const
void setMaxColorScalar(agx::Real maxVel)
ParticleRenderFilterManager * getParticleRenderFilterManager()
void resetParticleFilteredState()
void setAlphaOnParticles(agx::Real alpha)
ParticleContactGraphRendererRef getParticleContactGraphRenderer()
agxQt::QtAgxWrapper * m_qtAgxWrapper
agxOSG::ParticleSystemDrawable::ParticleShaderMode getParticleShaderMode() const
Class that wraps SimulationController with an interface that enables QT Gui signals to control the si...
agxOSG::ScalarColorMap * getColorMap()
agx::UInt m_numTrajectoryPositions
agx::UInt getMaxPositionPoints()
virtual ~TrajectoryRenderer()
void setMaxPositionPoints(agx::UInt posPoints)
osg::ref_ptr< agxOSG::ParticleTrajectoriesDrawable > m_particleTrajectoryDrawable
TrajectoryRenderer(agxSDK::Simulation *simulation, osg::Group *root, agx::ParticleSystem *ps)
agx::ParticleSystem * m_particleSystem
osg::ref_ptr< osg::Geode > m_trajectoryGeode
void setEnable(bool enable)
osg::ref_ptr< agxOSG::RigidBodyTrajectoryDrawable > m_RBTrajectorydrawable
void setSampling(agx::Real enable)
osg::observer_ptr< osg::Group > m_root
agx::Real getSampling() const
void setColorMap(agxOSG::ScalarColorMap *colorMap)
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Derive from this class to implement a listener for simulation step events.
Class that can be used to extract data from elements in a simulation within a specified bound.
A basic particle system that contains all the storages and buffers required for basic operation and a...
Base class providing referencing counted objects.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
Contains classes/utility functions for connecting AGX to QT with OSG.
osg::Geode * createCubeLines(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
osg::Geode * createPlaneLines(const agx::Vec3 &position, const agx::Vec3 &normal, agx::Real size)
osg::Geode * createCube(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
AGXCORE_EXPORT Component * root()