AGX Dynamics  2.38.0.2
QtOSGUtils.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXQT_QTOSGUTILS_H
18 #define AGXQT_QTOSGUTILS_H
19 
20 #include <agx/config/AGX_USE_KEYSHOT.h>
21 #include <agxQt/export.h>
22 
25 #include <agxQt/ParticleFilters.h>
26 #include <agxQt/CameraViewSet.h>
27 #include <agx/Referenced.h>
32 #include <agxOSG/ClipPlane.h>
35 
36 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
37 #include <osgViewer/ViewerEventHandlers>
38 #include <osg/Group>
39 #include <osgViewer/Renderer>
40 #include <osgSim/ColorRange>
41 #include <osgSim/ScalarsToColors>
42 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
43 
44 namespace agxOSG
45 {
46  class SceneDecorator;
47  class Node;
48  class Group;
49 }
50 
51 namespace agxQt
52 {
53 
55  {
56  public:
58  {
61  };
62 
67 
69  : legendScaleFactor{ 0.5 },
70  orientation { Orientation::HORIZONTAL },
71  enableAutoPlacement{ true },
72  position{ 0,0,0 }
73  {
74  }
75  };
76 
77  class QtAgxWrapper;
78 
84  {
85  public:
86  const agx::Vec3 BASE_NORMAL = agx::Vec3(0, 1, 0);
87 
88  public:
91 
92  void setPosition( agx::Vec3 position );
93 
94  void setRotation(const agx::Quat& quat );
95 
96  agx::Vec3 getPosition() const;
97 
98  agx::Quat getRotation() const;
99 
100  bool getEnable() const;
101 
102  void setEnable(bool enable);
103 
104  bool getEnableRendering() const;
105 
106  void setEnableRendering(bool enable);
107 
108  agx::Real getIncrement() const;
109 
110  void setIncrement(agx::Real increment);
111 
113  void incrementClipPlane();
114 
116  void decrementClipPlane();
117 
119 
120  protected:
121  void updateClipPlaneFromIncrement( agx::Real increment );
122 
124  virtual ~ClipPlaneController();
125 
127  // Variables
129  protected:
134  };
135 
141  {
142  public:
143  enum State : agx::Int32 {
146  ENABLE_TICKS = 1 << 2,
148  ENABLE_GRID = 1 << 4,
149  SHOW_AXIS_X = 1 << 5,
150  SHOW_AXIS_Y = 1 << 6,
151  SHOW_AXIS_Z = 1 << 7,
154  };
155  using AxesState = agx::BitState<State, agx::Int32>;
156 
157  public:
160 
161  void setPosition( agx::Vec3 position );
162 
163  void setRotation( const agx::Quat& quat );
164 
165  void setSize( const agx::Real size );
166 
167  void setLineWidth( agx::Real lineWidth );
168 
169  void setTickSize( const agx::Real tickSize );
170 
171  void setNumTicks( const agx::UInt numTicks );
172 
173  void setTickTextStride( const agx::UInt stride );
174 
175  void setTickTextSize( agx::Real tickTextSize );
176 
177  void setTickColor( const agxRender::Color& color );
178 
179  void setAxesSingleColor( const agxRender::Color& color );
180 
181  agx::Real getTickTextSize() const;
182 
183  agx::Vec3 getPosition() const;
184 
185  agx::Quat getRotation() const;
186 
187  agx::Real getSize() const;
188 
189  agx::Real getLineWidth() const;
190 
191  agx::Real getTickSize() const;
192 
193  agx::UInt getNumTicks() const;
194 
196 
198 
200 
201  bool getEnable() const;
202 
203  void setEnable( bool enable );
204 
205  bool getEnableTicks() const;
206 
207  void setEnableTicks( bool enable );
208 
209  bool getEnableTicksText() const;
210 
211  void setEnableTicksText( bool enable );
212 
213  void setEnableGrid( bool enable );
214 
215  bool getEnableGrid() const;
216 
217  bool getEnableAxesSingleColor() const;
218 
219  void setEnableAxesSingleColor( bool enable );
220 
221  void setShowXAxis( bool enable );
222  void setShowYAxis( bool enable );
223  void setShowZAxis( bool enable );
224 
225  bool getShowXAxis();
226  bool getShowYAxis();
227  bool getShowZAxis();
228 
229  std::array<bool, 3> getShowAxesSettings() const;
230 
231  protected:
232 
234  virtual ~MeasurementAxesController();
235 
237  // Variables
239  protected:
251  };
252 
254 
256  // ParticleTrajectoryRenderer
259  {
261 
262  public:
264  osg::Group* root,
265  agx::ParticleSystem* ps );
266 
267  void setMaxPositionPoints( agx::UInt posPoints );
268 
270 
271  void setEnable( bool enable );
272 
273  bool getEnable() const;
274 
275  void setSampling( agx::Real enable );
276 
277  agx::Real getSampling() const;
278 
279  void reSample();
280 
281  void resetTrajectoires();
282 
283  void setColorMap(agxOSG::ScalarColorMap* colorMap);
284 
286 
287  protected:
288  virtual ~TrajectoryRenderer();
289 
291  // Variables
294  osg::observer_ptr<osg::Group> m_root;
295  osg::ref_ptr<osg::Geode> m_trajectoryGeode;
298  bool m_enable;
299 
300  osg::ref_ptr < agxOSG::ParticleTrajectoriesDrawable > m_particleTrajectoryDrawable;
301  osg::ref_ptr < agxOSG::RigidBodyTrajectoryDrawable > m_RBTrajectorydrawable;
302  };
303 
305 
306 
308  // ParticleContactGraphRenderer
311  {
312  public:
314 
315  void setEnable(bool enable);
316 
317  bool getEnable() const;
318 
320 
321  void setMinNetworkForce(agx::Real minForce);
322 
324 
325  void setMaxNetworkForce(agx::Real minForce);
326 
327  protected:
329 
331  // Variables
333  osg::observer_ptr<osg::Group> m_root;
336  };
337 
339 
341 
343 
345 
347 
349 
354  {
355  public:
357  agxQt::QtAgxWrapper* qtagxViewer,
358  osg::Group* root,
360  agx::ParticleSystem* system);
361 
363 
365 
366  void setAlphaValue(agx::Real alpha);
367 
368  agx::Real getAlphaValue() const;
369 
370  virtual void pre(const agx::TimeStamp& t);
371 
372  virtual void post(const agx::TimeStamp& t);
373 
374  void setParticleColorModeFromName(const agx::String& mode);
375 
377 
379 
381 
382  void setMaxColorScalar(agx::Real maxVel);
383 
384  void setMinColorScalar(agx::Real minVel);
385 
387 
389 
390  void setAnalysisBox(const agx::AnalysisBox* box);
391 
392  void setLimitColoringToAnalysisBound(bool enable);
393 
394  bool getLimitColoringToAnalysisBound() const;
395 
396  void setShowColorLegend(bool enable, int width, int height);
397 
398  void setShowColorLegend(bool enable);
399 
400  void updateColorLegend(int width, int height);
401 
402  void refreshColorLegend();
403 
404  bool getShowColorLegend() const;
405 
406  void setEnableParticleRendering(bool enable);
407 
408  bool getEnableParticleRendering() const;
409 
410  void preRenderParticles( agx::ParticleSystem * system );
411 
412  void preRenderBodies();
413 
415 
417 
418  void addCustomColorers();
419 
420  bool hasOpenColorLegend() const;
421 
423 
424  void setEnableRenderOnNSSBodies(const agx::RigidBodyRefVector& bodies, bool enable);
425 
426  void setEnableRenderingOnTemplateBodies(const agx::RigidBodyRefVector& bodies, bool enable);
427 
429 
430  void setLegendScaleFactor( agx::Real scaleFactor );
431 
433 
435 
436  protected:
437 
439 
440  void preRender();
441 
442  void resetAlphaOnColors();
443 
444  void setAlphaOnParticles(agx::Real alpha);
445 
446  void removeColorLegend();
447 
449  // Variables
451  protected:
453  osg::ref_ptr<agxOSG::ParticleSystemDrawable> m_psDrawable;
456 
457  // color renderer
458  osg::ref_ptr<osg::Group> m_hudGroup;
459  osg::observer_ptr<osg::Group> m_root;
461 
462 
466 
467  // Impacts drawable
468  osg::ref_ptr<agxQt::GranularImpactsDrawable> m_impactsDrawable;
470  };
471 
473 
474  /* Implementation */
475 
477 
479 
481 
483 
485 
487  {
489  return m_particleColorerManager->getMinScalar();
490  else
491  return 0;
492  }
493 
495  {
497  return m_particleColorerManager->getMaxScalar();
498  else
499  return 0;
500  }
501 
503 
505 
507 
509 
511 
512  osg::Geode * createCube(const agx::Vec3& position, const agx::Vec3& boxhalfVec3);
513  osg::Geode * createCubeLines(const agx::AffineMatrix4x4& transform, const agx::Vec3& boxhalfVec3);
514  osg::Geode * createPlaneLines(const agx::Vec3& position, const agx::Vec3& normal, agx::Real size);
515  osg::Geode* createLine( const agx::Vec3& p1, const agx::Vec3& p2, agx::Real size, const agxRender::Color& color );
516 
517 #if AGX_USE_KEYSHOT()
518 
521  class KeyShotParticleDumper
522  {
523  KeyShotParticleDumper();
524  public:
525 
526  static void dumpParticlesInSimulationToKeyShotFile(agxSDK::Simulation * simulation, agx::String filename);
527 
528  static void exportCurrentJournalFrameToBip(int frame,
529  const agx::String& journalFilename,
530  const agx::String& sessionName,
531  const agx::String& bipFile,
532  agxQt::CameraDescription* camera,
534 
535  protected:
537  // Variables
539  };
540 #endif
541 }
542 
543 #endif
agxQt::MeasurementAxesController::setShowXAxis
void setShowXAxis(bool enable)
agxQt::ClipPlaneController::decrementClipPlane
void decrementClipPlane()
Decrements the Near plane of the scene in the coupled agxViewer.
agxOSG::ParticleContactGraphDrawable::setEnable
void setEnable(bool enable)
Definition: ParticleContactGraphDrawable.h:107
agxQt::ParticleContactGraphRenderer::setMinNetworkForce
void setMinNetworkForce(agx::Real minForce)
Definition: QtOSGUtils.h:344
agxQt::GranularImpactsDrawable
Definition: GranularImpactsDrawable.h:36
agxQt::TrajectoryRenderer::setSampling
void setSampling(agx::Real enable)
agxQt::MeasurementAxesController::setSize
void setSize(const agx::Real size)
agxQt::MeasurementAxesController::m_tickTextSize
agx::Real m_tickTextSize
Definition: QtOSGUtils.h:246
agx::UInt
uint64_t UInt
Definition: Integer.h:27
agxQt::ParticleSystemRenderUtility::setLimitColoringToAnalysisBound
void setLimitColoringToAnalysisBound(bool enable)
Definition: QtOSGUtils.h:482
agxQt::ParticleContactGraphRenderer
Definition: QtOSGUtils.h:310
agxQt::LegendSettings::HORIZONTAL
@ HORIZONTAL
Definition: QtOSGUtils.h:59
Referenced.h
agxQt::ParticleSystemRenderUtility::m_qtAgxWrapper
agxQt::QtAgxWrapper * m_qtAgxWrapper
Definition: QtOSGUtils.h:452
agxQt::createCubeLines
osg::Geode * createCubeLines(const agx::AffineMatrix4x4 &transform, const agx::Vec3 &boxhalfVec3)
agxQt::TrajectoryRenderer::m_particleSystem
agx::ParticleSystem * m_particleSystem
Definition: QtOSGUtils.h:293
agxQt::MeasurementAxesController::m_position
agx::Vec3 m_position
Definition: QtOSGUtils.h:240
agxQt::MeasurementAxesController::setShowYAxis
void setShowYAxis(bool enable)
agxQt::MeasurementAxesController::getEnableGrid
bool getEnableGrid() const
GranularImpactsDrawable.h
agxQt::MeasurementAxesController::setTickTextSize
void setTickTextSize(agx::Real tickTextSize)
agxQt::TrajectoryRenderer::setColorMap
void setColorMap(agxOSG::ScalarColorMap *colorMap)
agx::Real
double Real
Definition: Real.h:42
ParticleTrajectoriesDrawable.h
agxQt::ParticleSystemRenderUtility::getParticleShaderMode
agxOSG::ParticleSystemDrawable::ParticleShaderMode getParticleShaderMode() const
agxQt::TrajectoryRenderer::reSample
void reSample()
agxQt::MeasurementAxesController::m_rotation
agx::Quat m_rotation
Definition: QtOSGUtils.h:241
agxQt::ParticleSystemRenderUtility::setParticleColorModeFromName
void setParticleColorModeFromName(const agx::String &mode)
agxQt
Contains classes/utility functions for connecting AGX to QT with OSG.
Definition: AnalysisBoundWidget.h:30
agxQt::QtAgxWrapper
Class that wraps SimulationController with an interface that enables QT Gui signals to control the si...
Definition: QtAgxWrapper.h:70
agxData::transform
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
agxSDK::StepEventListener
Derive from this class to implement a listener for simulation step events.
Definition: StepEventListener.h:37
agxQt::ParticleSystemRenderUtility::m_impactsDrawable
osg::ref_ptr< agxQt::GranularImpactsDrawable > m_impactsDrawable
Definition: QtOSGUtils.h:468
agxQt::ParticleSystemRenderUtility::getGranularImpactsDrawable
GranularImpactsDrawable * getGranularImpactsDrawable()
Definition: QtOSGUtils.h:506
agxQt::TrajectoryRenderer::m_RBTrajectorydrawable
osg::ref_ptr< agxOSG::RigidBodyTrajectoryDrawable > m_RBTrajectorydrawable
Definition: QtOSGUtils.h:301
agxQt::ParticleSystemRenderUtility::getAvailableColorModes
ParticleColorModeVector getAvailableColorModes() const
Definition: QtOSGUtils.h:480
agxQt::ClipPlaneController::ClipPlaneController
ClipPlaneController(agxOSG::ClipPlane *clipPlane)
Constructor.
agx::Vector
Templated vector class.
Definition: Vector.h:52
agxQt::MeasurementAxesController::setAxesSingleColor
void setAxesSingleColor(const agxRender::Color &color)
agxQt::ParticleSystemRenderUtility::getLegendScaleFactor
agx::Real getLegendScaleFactor() const
Definition: QtOSGUtils.h:508
agxQt::TrajectoryRenderer::getEnable
bool getEnable() const
agxQt::MeasurementAxesController::getLineWidth
agx::Real getLineWidth() const
agxQt::ParticleSystemRenderUtility::ParticleSystemRenderUtility
ParticleSystemRenderUtility(agxQt::QtAgxWrapper *qtagxViewer, osg::Group *root, agxOSG::ParticleSystemDrawable *psdraw, agx::ParticleSystem *system)
agxQt::ParticleSystemRenderUtility::setShowColorLegend
void setShowColorLegend(bool enable, int width, int height)
agxQt::ClipPlaneController::updateClipPlaneFromIncrement
void updateClipPlaneFromIncrement(agx::Real increment)
agxQt::ParticleContactGraphRenderer::getMinNetworkForce
agx::Real getMinNetworkForce() const
Definition: QtOSGUtils.h:346
agxQt::ParticleSystemRenderUtility::getShowColorLegend
bool getShowColorLegend() const
agxQt::MeasurementAxesController::setEnableAxesSingleColor
void setEnableAxesSingleColor(bool enable)
agxQt::MeasurementAxesController::m_axesColor
agxRender::Color m_axesColor
Definition: QtOSGUtils.h:250
agxQt::ClipPlaneController::getIncrement
agx::Real getIncrement() const
agxOSG::ScalarColorMap
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
Definition: ScalarColorMap.h:37
agxQt::ParticleSystemRenderUtility::setAlphaOnParticles
void setAlphaOnParticles(agx::Real alpha)
agxQt::ParticleSystemRenderUtility::getActiveParticleColorMode
ParticleColorMode getActiveParticleColorMode() const
Definition: QtOSGUtils.h:478
agxQt::ParticleSystemRenderUtility::setAnalysisBox
void setAnalysisBox(const agx::AnalysisBox *box)
agxQt::MeasurementAxesController::DEFAULT
@ DEFAULT
Definition: QtOSGUtils.h:153
agxQt::MeasurementAxesController::getEnableTicks
bool getEnableTicks() const
agxQt::MeasurementAxesController::SHOW_AXIS_Z
@ SHOW_AXIS_Z
Definition: QtOSGUtils.h:151
agxQt::ParticleSystemRenderUtility::m_particleColorerManager
ParticleColorerManagerRef m_particleColorerManager
Definition: QtOSGUtils.h:464
agxOSG::ParticleSystemDrawable::ParticleShaderMode
ParticleShaderMode
Definition: ParticleSystemDrawable.h:56
ParticleContactGraphDrawable.h
agxQt::ParticleSystemRenderUtility::m_enableParticleRendering
bool m_enableParticleRendering
Definition: QtOSGUtils.h:469
agxQt::ParticleSystemRenderUtility::m_legendSettings
LegendSettings m_legendSettings
Definition: QtOSGUtils.h:460
agx::AffineMatrix4x4T< Real >
agxQt::ParticleSystemRenderUtility::getParticleContactGraphRenderer
ParticleContactGraphRendererRef getParticleContactGraphRenderer()
Definition: QtOSGUtils.h:504
agxQt::ParticleColorMode
Definition: ParticlePostProcessColorer.h:46
ClipPlane.h
agxQt::ParticleSystemRenderUtility::setLegendScaleFactor
void setLegendScaleFactor(agx::Real scaleFactor)
agxQt::MeasurementAxesController::setTickColor
void setTickColor(const agxRender::Color &color)
agxQt::LegendSettings::LegendSettings
LegendSettings()
Definition: QtOSGUtils.h:68
agxQt::ParticleSystemRenderUtility::refreshColorLegend
void refreshColorLegend()
agxQt::ParticleSystemRenderUtility::getMaxColorScalar
agx::Real getMaxColorScalar() const
Definition: QtOSGUtils.h:494
agxQt::TrajectoryRenderer::m_particleTrajectoryDrawable
osg::ref_ptr< agxOSG::ParticleTrajectoriesDrawable > m_particleTrajectoryDrawable
Definition: QtOSGUtils.h:300
agxQt::ParticleSystemRenderUtility::~ParticleSystemRenderUtility
virtual ~ParticleSystemRenderUtility()
ParticleFilters.h
agxQt::MeasurementAxesController::m_size
agx::Real m_size
Definition: QtOSGUtils.h:242
agxQt::ClipPlaneController::setRotation
void setRotation(const agx::Quat &quat)
agxQt::ParticleSystemRenderUtility::getParticleRenderFilterManager
ParticleRenderFilterManager * getParticleRenderFilterManager()
agxQt::ParticleSystemRenderUtility::getLimitColoringToAnalysisBound
bool getLimitColoringToAnalysisBound() const
Definition: QtOSGUtils.h:484
agxQt::ParticleSystemRenderUtility::m_particleContactGraphRenderer
ParticleContactGraphRendererRef m_particleContactGraphRenderer
Definition: QtOSGUtils.h:463
agxQt::MeasurementAxesController::SHOW_AXIS_X
@ SHOW_AXIS_X
Definition: QtOSGUtils.h:149
agxQt::ParticleSystemRenderUtility::m_root
osg::observer_ptr< osg::Group > m_root
Definition: QtOSGUtils.h:459
agx::AnalysisBox
Class that can be used to extract data from elements in a simulation within a specified bound.
Definition: AnalysisBox.h:32
agxQt::MeasurementAxesController::getTickSize
agx::Real getTickSize() const
agxQt::ClipPlaneController::incrementClipPlane
void incrementClipPlane()
Increments the Near plane of the scene in the coupled agxViewer.
agxQt::ParticleSystemRenderUtility::setMaxColorScalar
void setMaxColorScalar(agx::Real maxVel)
StepEventListener.h
agxQt::LegendSettings
Definition: QtOSGUtils.h:54
agxQt::ClipPlaneController
Class that is used to manipulate the clip plane in the scene.
Definition: QtOSGUtils.h:83
agxOSG::ParticleContactGraphDrawable::setMaxForce
void setMaxForce(agx::Real maxForce)
Definition: ParticleContactGraphDrawable.h:111
export.h
agxQt::ParticleSystemRenderUtility::setMinColorScalar
void setMinColorScalar(agx::Real minVel)
ParticlePostProcessColorer.h
agxQt::createPlaneLines
osg::Geode * createPlaneLines(const agx::Vec3 &position, const agx::Vec3 &normal, agx::Real size)
agxQt::ClipPlaneController::m_clipPlane
agxOSG::ClipPlane * m_clipPlane
Definition: QtOSGUtils.h:130
agxQt::TrajectoryRenderer::m_sampling
agx::Real m_sampling
Definition: QtOSGUtils.h:297
agxQt::ClipPlaneController::setEnableRendering
void setEnableRendering(bool enable)
agxQt::ParticleSystemRenderUtility
This utility class is used for post processing of the particle system drawable representation,...
Definition: QtOSGUtils.h:353
agxQt::ParticleSystemRenderUtility::setParticleShaderMode
void setParticleShaderMode(agxOSG::ParticleSystemDrawable::ParticleShaderMode mode)
agxQt::MeasurementAxesController::State
State
Definition: QtOSGUtils.h:143
agxQt::ClipPlaneController::getEnableRendering
bool getEnableRendering() const
agxOSG::ParticleContactGraphDrawable::getEnable
bool getEnable() const
Definition: ParticleContactGraphDrawable.h:105
agxQt::MeasurementAxesController::getShowYAxis
bool getShowYAxis()
agxQt::MeasurementAxesController::setEnableTicksText
void setEnableTicksText(bool enable)
agxQt::ParticleSystemRenderUtility::post
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...
agxQt::ParticleContactGraphRenderer::~ParticleContactGraphRenderer
virtual ~ParticleContactGraphRenderer()
agxQt::ParticleContactGraphRenderer::setEnable
void setEnable(bool enable)
Definition: QtOSGUtils.h:338
agxQt::ParticleContactGraphRenderer::getMaxNetworkForce
agx::Real getMaxNetworkForce() const
Definition: QtOSGUtils.h:348
agxQt::ParticleContactGraphRenderer::setMaxNetworkForce
void setMaxNetworkForce(agx::Real minForce)
Definition: QtOSGUtils.h:342
agxQt::ParticleContactGraphRenderer::getEnable
bool getEnable() const
Definition: QtOSGUtils.h:340
agxQt::MeasurementAxesController::getTickColor
agxRender::Color getTickColor() const
agxRender::Color
Utility color class with "common colors".
Definition: Color.h:33
agxQt::TrajectoryRenderer::TrajectoryRenderer
TrajectoryRenderer(agxSDK::Simulation *simulation, osg::Group *root, agx::ParticleSystem *ps)
agxQt::LegendSettings::orientation
Orientation orientation
Definition: QtOSGUtils.h:64
agxQt::MeasurementAxesController::setTickTextStride
void setTickTextStride(const agx::UInt stride)
agx::ParticleSystem
A basic particle system that contains all the storages and buffers required for basic operation and a...
Definition: ParticleSystem.h:67
agx::ref_ptr< ParticleContactGraphRenderer >
agxQt::ParticleSystemRenderUtility::resetParticleFilteredState
void resetParticleFilteredState()
agxQt::TrajectoryRenderer::setMaxPositionPoints
void setMaxPositionPoints(agx::UInt posPoints)
agxQt::MeasurementAxesController::m_tickTextStride
agx::UInt m_tickTextStride
Definition: QtOSGUtils.h:245
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:125
agxQt::ClipPlaneController::~ClipPlaneController
virtual ~ClipPlaneController()
Destructor.
agxQt::ClipPlaneController::m_increment
agx::Real m_increment
Definition: QtOSGUtils.h:132
agxQt::ClipPlaneController::BASE_NORMAL
const agx::Vec3 BASE_NORMAL
Definition: QtOSGUtils.h:86
agxQt::MeasurementAxesController::getShowZAxis
bool getShowZAxis()
agxOSG::ParticleContactGraphDrawable::setMinForce
void setMinForce(agx::Real minForce)
Definition: ParticleContactGraphDrawable.h:109
agxQt::LegendSettings::enableAutoPlacement
bool enableAutoPlacement
Definition: QtOSGUtils.h:65
agx::Vec3
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3.h:36
agxOSG
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
PushDisableWarnings.h
agxQt::TrajectoryRenderer::setEnable
void setEnable(bool enable)
agxQt::MeasurementAxesController::getAxesSingleColor
agxRender::Color getAxesSingleColor() const
agxOSG::ParticleContactGraphDrawable::getMinForce
agx::Real getMinForce() const
Definition: ParticleContactGraphDrawable.h:113
agxQt::ParticleSystemRenderUtility::setAlphaValue
void setAlphaValue(agx::Real alpha)
agxQt::LegendSettings::legendScaleFactor
agx::Real legendScaleFactor
Definition: QtOSGUtils.h:63
agxQt::MeasurementAxesController::setEnableGrid
void setEnableGrid(bool enable)
agxQt::ParticleSystemRenderUtility::setEnableParticleRendering
void setEnableParticleRendering(bool enable)
agxQt::MeasurementAxesController::getEnableAxesSingleColor
bool getEnableAxesSingleColor() const
agxOSG::ParticleSystemDrawable
Definition: ParticleSystemDrawable.h:44
agxQt::TrajectoryRenderer::m_root
osg::observer_ptr< osg::Group > m_root
Definition: QtOSGUtils.h:294
agxQt::ClipPlaneController::setPosition
void setPosition(agx::Vec3 position)
agxQt::MeasurementAxesController::setRotation
void setRotation(const agx::Quat &quat)
agxQt::MeasurementAxesController::~MeasurementAxesController
virtual ~MeasurementAxesController()
Destructor.
agxQt::MeasurementAxesController::getSize
agx::Real getSize() const
agxQt::ClipPlaneController::getRotation
agx::Quat getRotation() const
agxQt::ParticleSystemRenderUtility::getParticleSystemDrawable
agxOSG::ParticleSystemDrawable * getParticleSystemDrawable()
agxQt::MeasurementAxesController::getTickTextSize
agx::Real getTickTextSize() const
agxQt::TrajectoryRenderer::~TrajectoryRenderer
virtual ~TrajectoryRenderer()
agxQt::MeasurementAxesController::getEnable
bool getEnable() const
agxQt::ParticleSystemRenderUtility::m_system
agx::ParticleSystem * m_system
Definition: QtOSGUtils.h:454
agxOSG::ParticleContactGraphDrawable
Definition: ParticleContactGraphDrawable.h:35
agxQt::TrajectoryRenderer::m_numTrajectoryPositions
agx::UInt m_numTrajectoryPositions
Definition: QtOSGUtils.h:296
agxQt::MeasurementAxesController::getEnableTicksText
bool getEnableTicksText() const
agxQt::LegendSettings::Orientation
Orientation
Definition: QtOSGUtils.h:57
agxQt::TrajectoryRenderer
Definition: QtOSGUtils.h:258
agxQt::ClipPlaneController::setEnable
void setEnable(bool enable)
agxQt::ParticleSystemRenderUtility::hasOpenColorLegend
bool hasOpenColorLegend() const
agxOSG::ClipPlane
This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane.
Definition: ClipPlane.h:43
agx::QuatT< Real >
agxQt::ClipPlaneController::getPosition
agx::Vec3 getPosition() const
agx::root
AGXCORE_EXPORT Component * root()
agxOSG::ParticleContactGraphDrawable::getMaxForce
agx::Real getMaxForce() const
Definition: ParticleContactGraphDrawable.h:115
agxQt::ParticleSystemRenderUtility::preRender
void preRender()
agxQt::ParticleSystemRenderUtility::m_alpha
agx::Real m_alpha
Definition: QtOSGUtils.h:455
agxQt::LegendSettings::VERTICAL
@ VERTICAL
Definition: QtOSGUtils.h:60
agxQt::ParticleSystemRenderUtility::updateColorLegend
void updateColorLegend(int width, int height)
agxQt::ParticleContactGraphRenderer::ParticleContactGraphRenderer
ParticleContactGraphRenderer(osg::Group *root, agx::ParticleSystem *ps)
agxQt::ParticleContactGraphRenderer::m_root
osg::observer_ptr< osg::Group > m_root
Definition: QtOSGUtils.h:333
agxQt::ParticleSystemRenderUtility::preRenderBodies
void preRenderBodies()
agxQt::TrajectoryRenderer::m_enable
bool m_enable
Definition: QtOSGUtils.h:298
agxQt::ClipPlaneController::m_rotation
agx::Quat m_rotation
Definition: QtOSGUtils.h:131
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:119
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxQt::ParticleSystemRenderUtility::removeColorLegend
void removeColorLegend()
agxQt::ParticleContactGraphRenderer::m_graphDrawable
agxOSG::ParticleContactGraphDrawable * m_graphDrawable
Definition: QtOSGUtils.h:335
RigidBodyTrajectoryDrawable.h
agx::TimeStamp
agx::Real TimeStamp
Definition: TimeStamp.h:26
agxQt::MeasurementAxesController::getNumTicks
agx::UInt getNumTicks() const
agxQt::MeasurementAxesController::setShowZAxis
void setShowZAxis(bool enable)
agxQt::MeasurementAxesController::ENABLE_TICK_TEXT
@ ENABLE_TICK_TEXT
Definition: QtOSGUtils.h:147
agxQt::TrajectoryRenderer::getSampling
agx::Real getSampling() const
agxQt::MeasurementAxesController::SHOW_ALL
@ SHOW_ALL
Definition: QtOSGUtils.h:152
agxQt::MeasurementAxesController::m_tickSize
agx::Real m_tickSize
Definition: QtOSGUtils.h:243
agxQt::ParticleSystemRenderUtility::getMinColorScalar
agx::Real getMinColorScalar() const
Definition: QtOSGUtils.h:486
agxQt::ParticleSystemRenderUtility::setEnableRenderOnNSSBodies
void setEnableRenderOnNSSBodies(const agx::RigidBodyRefVector &bodies, bool enable)
agxQt::MeasurementAxesController::setTickSize
void setTickSize(const agx::Real tickSize)
agxQt::ClipPlaneController::m_enableRendering
bool m_enableRendering
Definition: QtOSGUtils.h:133
agxQt::LegendSettings::position
agx::Vec3 position
Definition: QtOSGUtils.h:66
agxQt::MeasurementAxesController::ENABLE_AXES_SINGLE_COLOR
@ ENABLE_AXES_SINGLE_COLOR
Definition: QtOSGUtils.h:145
agxQt::MeasurementAxesController::ENABLE_GRID
@ ENABLE_GRID
Definition: QtOSGUtils.h:148
agxQt::TrajectoryRenderer::getMaxPositionPoints
agx::UInt getMaxPositionPoints()
agxQt::MeasurementAxesController::SHOW_AXIS_Y
@ SHOW_AXIS_Y
Definition: QtOSGUtils.h:150
agxQt::MeasurementAxesController::m_tickColor
agxRender::Color m_tickColor
Definition: QtOSGUtils.h:249
agx::AgXString< std::string >
agxQt::TrajectoryRenderer::m_trajectoryGeode
osg::ref_ptr< osg::Geode > m_trajectoryGeode
Definition: QtOSGUtils.h:295
agxQt::ParticleSystemRenderUtility::getAlphaValue
agx::Real getAlphaValue() const
Definition: QtOSGUtils.h:476
agxQt::ParticleSystemRenderUtility::getEnableParticleRendering
bool getEnableParticleRendering() const
Definition: QtOSGUtils.h:502
agxQt::MeasurementAxesController
Class that is used to manipulate the axes in the scene.
Definition: QtOSGUtils.h:140
agxQt::TrajectoryRenderer::getColorMap
agxOSG::ScalarColorMap * getColorMap()
agxQt::MeasurementAxesController::setLineWidth
void setLineWidth(agx::Real lineWidth)
agxQt::ParticleRenderFilterManager
Definition: ParticleFilters.h:53
agxQt::MeasurementAxesController::ENABLE_RENDERING
@ ENABLE_RENDERING
Definition: QtOSGUtils.h:144
agx::Vec3T< Real >
agxQt::MeasurementAxesController::m_lineWidth
agx::Real m_lineWidth
Definition: QtOSGUtils.h:247
CameraViewSet.h
agxQt::ParticleSystemRenderUtility::m_hudGroup
osg::ref_ptr< osg::Group > m_hudGroup
Definition: QtOSGUtils.h:458
agxQt::MeasurementAxesController::setPosition
void setPosition(agx::Vec3 position)
agxQt::createLine
osg::Geode * createLine(const agx::Vec3 &p1, const agx::Vec3 &p2, agx::Real size, const agxRender::Color &color)
agxQt::ParticleSystemRenderUtility::addCustomColorers
void addCustomColorers()
agxQt::MeasurementAxesController::getPosition
agx::Vec3 getPosition() const
agxQt::createCube
osg::Geode * createCube(const agx::Vec3 &position, const agx::Vec3 &boxhalfVec3)
agxQt::ParticleSystemRenderUtility::preRenderParticles
void preRenderParticles(agx::ParticleSystem *system)
agxQt::MeasurementAxesController::getShowXAxis
bool getShowXAxis()
ParticleSystemDrawable.h
agxQt::MeasurementAxesController::ENABLE_TICKS
@ ENABLE_TICKS
Definition: QtOSGUtils.h:146
agx::Int32
int32_t Int32
Definition: Integer.h:37
agxQt::ParticleSystemRenderUtility::resetAlphaOnColors
void resetAlphaOnColors()
agxQt::CameraDescription
Class that describes an abstract camera and it's properties.
Definition: CameraViewSet.h:131
agxQt::ParticleSystemRenderUtility::getLegendSettings
LegendSettings & getLegendSettings()
Definition: QtOSGUtils.h:510
agxQt::MeasurementAxesController::setNumTicks
void setNumTicks(const agx::UInt numTicks)
agxQt::ParticleSystemRenderUtility::m_particleRenderFilterManager
ParticleRenderFilterManagerRef m_particleRenderFilterManager
Definition: QtOSGUtils.h:465
GranularBodySystem.h
agxQt::MeasurementAxesController::setEnableTicks
void setEnableTicks(bool enable)
agxQt::MeasurementAxesController::MeasurementAxesController
MeasurementAxesController()
Constructor.
agxQt::MeasurementAxesController::getRotation
agx::Quat getRotation() const
agxQt::MeasurementAxesController::AxesState
agx::BitState< State, agx::Int32 > AxesState
Definition: QtOSGUtils.h:155
agxQt::ParticleSystemRenderUtility::setEnableRenderingOnTemplateBodies
void setEnableRenderingOnTemplateBodies(const agx::RigidBodyRefVector &bodies, bool enable)
agxQt::ParticleContactGraphRenderer::m_particleSystem
agx::ParticleSystem * m_particleSystem
Definition: QtOSGUtils.h:334
agxQt::ParticleSystemRenderUtility::m_psDrawable
osg::ref_ptr< agxOSG::ParticleSystemDrawable > m_psDrawable
Definition: QtOSGUtils.h:453
AGX_FORCE_INLINE
#define AGX_FORCE_INLINE
Definition: macros.h:58
agxQt::MeasurementAxesController::setEnable
void setEnable(bool enable)
agxQt::MeasurementAxesController::m_state
AxesState m_state
Definition: QtOSGUtils.h:248
agxQt::TrajectoryRenderer::resetTrajectoires
void resetTrajectoires()
agxQt::MeasurementAxesController::getTickTextStride
agx::UInt getTickTextStride() const
agxQt::ClipPlaneController::getClipPlane
agxOSG::ClipPlane * getClipPlane() const
agxQt::MeasurementAxesController::m_numTicks
agx::UInt m_numTicks
Definition: QtOSGUtils.h:244
agxQt::MeasurementAxesController::getShowAxesSettings
std::array< bool, 3 > getShowAxesSettings() const
PopDisableWarnings.h
agxQt::ClipPlaneController::getEnable
bool getEnable() const
agxQt::ParticleSystemRenderUtility::pre
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...
agxQt::ClipPlaneController::setIncrement
void setIncrement(agx::Real increment)