 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
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>
517 #if AGX_USE_KEYSHOT()
521 class KeyShotParticleDumper
523 KeyShotParticleDumper();
528 static void exportCurrentJournalFrameToBip(
int frame,
void setShowXAxis(bool enable)
void decrementClipPlane()
Decrements the Near plane of the scene in the coupled agxViewer.
void setEnable(bool enable)
void setMinNetworkForce(agx::Real minForce)
void setSampling(agx::Real enable)
void setSize(const agx::Real size)
void setLimitColoringToAnalysisBound(bool enable)
agxQt::QtAgxWrapper * m_qtAgxWrapper
osg::Geode * createCubeLines(const agx::AffineMatrix4x4 &transform, const agx::Vec3 &boxhalfVec3)
agx::ParticleSystem * m_particleSystem
void setShowYAxis(bool enable)
bool getEnableGrid() const
void setTickTextSize(agx::Real tickTextSize)
void setColorMap(agxOSG::ScalarColorMap *colorMap)
agxOSG::ParticleSystemDrawable::ParticleShaderMode getParticleShaderMode() const
void setParticleColorModeFromName(const agx::String &mode)
Contains classes/utility functions for connecting AGX to QT with OSG.
Class that wraps SimulationController with an interface that enables QT Gui signals to control the si...
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
Derive from this class to implement a listener for simulation step events.
osg::ref_ptr< agxQt::GranularImpactsDrawable > m_impactsDrawable
GranularImpactsDrawable * getGranularImpactsDrawable()
osg::ref_ptr< agxOSG::RigidBodyTrajectoryDrawable > m_RBTrajectorydrawable
ParticleColorModeVector getAvailableColorModes() const
ClipPlaneController(agxOSG::ClipPlane *clipPlane)
Constructor.
void setAxesSingleColor(const agxRender::Color &color)
agx::Real getLegendScaleFactor() const
agx::Real getLineWidth() const
ParticleSystemRenderUtility(agxQt::QtAgxWrapper *qtagxViewer, osg::Group *root, agxOSG::ParticleSystemDrawable *psdraw, agx::ParticleSystem *system)
void setShowColorLegend(bool enable, int width, int height)
void updateClipPlaneFromIncrement(agx::Real increment)
agx::Real getMinNetworkForce() const
bool getShowColorLegend() const
void setEnableAxesSingleColor(bool enable)
agxRender::Color m_axesColor
agx::Real getIncrement() const
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
void setAlphaOnParticles(agx::Real alpha)
ParticleColorMode getActiveParticleColorMode() const
void setAnalysisBox(const agx::AnalysisBox *box)
bool getEnableTicks() const
ParticleColorerManagerRef m_particleColorerManager
bool m_enableParticleRendering
LegendSettings m_legendSettings
ParticleContactGraphRendererRef getParticleContactGraphRenderer()
void setLegendScaleFactor(agx::Real scaleFactor)
void setTickColor(const agxRender::Color &color)
void refreshColorLegend()
agx::Real getMaxColorScalar() const
osg::ref_ptr< agxOSG::ParticleTrajectoriesDrawable > m_particleTrajectoryDrawable
virtual ~ParticleSystemRenderUtility()
void setRotation(const agx::Quat &quat)
ParticleRenderFilterManager * getParticleRenderFilterManager()
bool getLimitColoringToAnalysisBound() const
ParticleContactGraphRendererRef m_particleContactGraphRenderer
osg::observer_ptr< osg::Group > m_root
Class that can be used to extract data from elements in a simulation within a specified bound.
agx::Real getTickSize() const
void incrementClipPlane()
Increments the Near plane of the scene in the coupled agxViewer.
void setMaxColorScalar(agx::Real maxVel)
Class that is used to manipulate the clip plane in the scene.
void setMaxForce(agx::Real maxForce)
void setMinColorScalar(agx::Real minVel)
osg::Geode * createPlaneLines(const agx::Vec3 &position, const agx::Vec3 &normal, agx::Real size)
agxOSG::ClipPlane * m_clipPlane
void setEnableRendering(bool enable)
This utility class is used for post processing of the particle system drawable representation,...
void setParticleShaderMode(agxOSG::ParticleSystemDrawable::ParticleShaderMode mode)
bool getEnableRendering() const
void setEnableTicksText(bool enable)
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...
virtual ~ParticleContactGraphRenderer()
void setEnable(bool enable)
agx::Real getMaxNetworkForce() const
void setMaxNetworkForce(agx::Real minForce)
agxRender::Color getTickColor() const
Utility color class with "common colors".
TrajectoryRenderer(agxSDK::Simulation *simulation, osg::Group *root, agx::ParticleSystem *ps)
void setTickTextStride(const agx::UInt stride)
A basic particle system that contains all the storages and buffers required for basic operation and a...
void resetParticleFilteredState()
void setMaxPositionPoints(agx::UInt posPoints)
agx::UInt m_tickTextStride
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
virtual ~ClipPlaneController()
Destructor.
const agx::Vec3 BASE_NORMAL
void setMinForce(agx::Real minForce)
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
void setEnable(bool enable)
agxRender::Color getAxesSingleColor() const
agx::Real getMinForce() const
void setAlphaValue(agx::Real alpha)
agx::Real legendScaleFactor
void setEnableGrid(bool enable)
void setEnableParticleRendering(bool enable)
bool getEnableAxesSingleColor() const
osg::observer_ptr< osg::Group > m_root
void setPosition(agx::Vec3 position)
void setRotation(const agx::Quat &quat)
virtual ~MeasurementAxesController()
Destructor.
agx::Real getSize() const
agx::Quat getRotation() const
agxOSG::ParticleSystemDrawable * getParticleSystemDrawable()
agx::Real getTickTextSize() const
virtual ~TrajectoryRenderer()
agx::ParticleSystem * m_system
agx::UInt m_numTrajectoryPositions
bool getEnableTicksText() const
void setEnable(bool enable)
bool hasOpenColorLegend() const
This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane.
agx::Vec3 getPosition() const
AGXCORE_EXPORT Component * root()
agx::Real getMaxForce() const
void updateColorLegend(int width, int height)
ParticleContactGraphRenderer(osg::Group *root, agx::ParticleSystem *ps)
osg::observer_ptr< osg::Group > m_root
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
agxOSG::ParticleContactGraphDrawable * m_graphDrawable
agx::UInt getNumTicks() const
void setShowZAxis(bool enable)
agx::Real getSampling() const
agx::Real getMinColorScalar() const
void setEnableRenderOnNSSBodies(const agx::RigidBodyRefVector &bodies, bool enable)
void setTickSize(const agx::Real tickSize)
@ ENABLE_AXES_SINGLE_COLOR
agx::UInt getMaxPositionPoints()
agxRender::Color m_tickColor
osg::ref_ptr< osg::Geode > m_trajectoryGeode
agx::Real getAlphaValue() const
bool getEnableParticleRendering() const
Class that is used to manipulate the axes in the scene.
agxOSG::ScalarColorMap * getColorMap()
void setLineWidth(agx::Real lineWidth)
osg::ref_ptr< osg::Group > m_hudGroup
void setPosition(agx::Vec3 position)
osg::Geode * createLine(const agx::Vec3 &p1, const agx::Vec3 &p2, agx::Real size, const agxRender::Color &color)
agx::Vec3 getPosition() const
osg::Geode * createCube(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
void preRenderParticles(agx::ParticleSystem *system)
void resetAlphaOnColors()
Class that describes an abstract camera and it's properties.
LegendSettings & getLegendSettings()
void setNumTicks(const agx::UInt numTicks)
ParticleRenderFilterManagerRef m_particleRenderFilterManager
void setEnableTicks(bool enable)
MeasurementAxesController()
Constructor.
agx::Quat getRotation() const
agx::BitState< State, agx::Int32 > AxesState
void setEnableRenderingOnTemplateBodies(const agx::RigidBodyRefVector &bodies, bool enable)
agx::ParticleSystem * m_particleSystem
osg::ref_ptr< agxOSG::ParticleSystemDrawable > m_psDrawable
void setEnable(bool enable)
agx::UInt getTickTextStride() const
agxOSG::ClipPlane * getClipPlane() const
std::array< bool, 3 > getShowAxesSettings() 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...
void setIncrement(agx::Real increment)