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>
260 typedef agx::Vector < agx::Vec3 >
Vec3List;
521 class KeyShotParticleDumper
523 KeyShotParticleDumper();
528 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.
agxOSG::ClipPlane * getClipPlane() const
Class that is used to manipulate the axes in the scene.
void setNumTicks(const agx::UInt numTicks)
void setPosition(agx::Vec3 position)
void setTickColor(const agxRender::Color &color)
void setLineWidth(agx::Real lineWidth)
agx::UInt getNumTicks() const
virtual ~MeasurementAxesController()
Destructor.
void setAxesSingleColor(const agxRender::Color &color)
std::array< bool, 3 > getShowAxesSettings() const
bool getEnableTicks() const
agx::Real getTickSize() const
agx::Real getLineWidth() const
agxRender::Color m_axesColor
void setTickTextSize(agx::Real tickTextSize)
@ ENABLE_AXES_SINGLE_COLOR
MeasurementAxesController()
Constructor.
agx::Quat getRotation() const
bool getEnableAxesSingleColor() const
bool getEnableTicksText() const
void setEnableAxesSingleColor(bool enable)
agx::UInt getTickTextStride() const
void setEnableTicks(bool enable)
agxRender::Color getTickColor() const
agx::Real getTickTextSize() const
void setShowXAxis(bool enable)
void setRotation(const agx::Quat &quat)
void setShowYAxis(bool enable)
void setEnable(bool enable)
agx::UInt m_tickTextStride
void setTickSize(const agx::Real tickSize)
agxRender::Color getAxesSingleColor() const
void setEnableGrid(bool enable)
void setSize(const agx::Real size)
agx::Real getSize() const
agx::Vec3 getPosition() const
agx::BitState< State, agx::Int32 > AxesState
void setTickTextStride(const agx::UInt stride)
void setShowZAxis(bool enable)
agxRender::Color m_tickColor
void setEnableTicksText(bool enable)
bool getEnableGrid() const
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)
agx::Real getLegendScaleFactor() const
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()
agxOSG::ParticleSystemDrawable * getParticleSystemDrawable()
ParticleSystemRenderUtility(agxQt::QtAgxWrapper *qtagxViewer, osg::Group *root, agxOSG::ParticleSystemDrawable *psdraw, agx::ParticleSystem *system)
agx::Real getMinColorScalar() const
void setEnableParticleRendering(bool enable)
agx::ParticleSystem * m_system
void setShowColorLegend(bool enable)
LegendSettings m_legendSettings
ParticleRenderFilterManagerRef m_particleRenderFilterManager
void preRenderParticles(agx::ParticleSystem *system)
LegendSettings & getLegendSettings()
osg::ref_ptr< agxOSG::ParticleSystemDrawable > m_psDrawable
void resetAlphaOnColors()
ParticleColorerManagerRef m_particleColorerManager
ParticleRenderFilterManager * getParticleRenderFilterManager()
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)
void resetParticleFilteredState()
void setAlphaOnParticles(agx::Real alpha)
void setLegendScaleFactor(agx::Real scaleFactor)
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...
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
agxOSG::ScalarColorMap * getColorMap()
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)
Utility color class with "common colors".
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::AffineMatrix4x4 &transform, const agx::Vec3 &boxhalfVec3)
osg::Geode * createCube(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
osg::Geode * createPlaneLines(const agx::Vec3 &position, const agx::Vec3 &normal, agx::Real size)
osg::Geode * createLine(const agx::Vec3 &p1, const agx::Vec3 &p2, agx::Real size, const agxRender::Color &color)
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
agx::Real legendScaleFactor