AGX Dynamics  2.37.3.2
utils.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 #pragma once
18 
19 #include <agxOSG/export.h>
20 #include <agx/Vec4.h>
21 
22 #include <agxUtil/agxUtil.h>
23 #include <agxUtil/Statistic.h>
24 #include <agxOSG/Node.h>
28 #include <agxOSG/ScalarColorMap.h>
30 #include <agxRender/Color.h>
31 
32 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
33 #include <osg/observer_ptr>
34 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
35 
36 namespace agx
37 {
38  class RigidBody;
39  class ParticleSystem;
40 
41  class RigidBodyEmitter;
42 }
43 
44 namespace agxSDK
45 {
46  class Simulation;
47 }
48 
49 namespace agxCollide
50 {
51  class Geometry;
52 }
53 
54 namespace agxUtil
55 {
56  class ExponentialMovingAverageStatistic;
57 }
58 
59 namespace agxModel
60 {
61  class FractureGenerator;
62 }
63 
65 
66 
67 namespace osg {
68  class Geometry;
69  class Node;
70  class Texture2D;
71 }
72 
73 namespace osgSim
74 {
75  class ColorRange;
76 }
77 
78 namespace osgText
79 {
80  class Text;
81 }
83 
84 namespace agxOSG
85 {
86  class GeometryNode;
87  class FrameTrajectoryDrawable;
88 
90  {
98  };
99 
104  AGXOSG_EXPORT GeometryNode* findGeometryNode( const agxCollide::Geometry* geometry, osg::Group* rootNode );
105 
121  AGXOSG_EXPORT bool setCubeMapTexture(osg::Node *node, const std::string& imagePath, const std::string& imageType = ".dds");
122 
128  AGXOSG_EXPORT void setEnvMapReflectionCoefficient(osg::Node* node, float coeff);
129 
141  AGXOSG_EXPORT bool setTexture(const agxCollide::Geometry* geometry, osg::Group* rootNode, const std::string& imagePath, bool repeat = false, TextureMode mode = DIFFUSE_TEXTURE);
142 
155  const agx::RigidBody* rigidBody, osg::Group* rootNode, const std::string& imagePath,
156  bool repeat = false, TextureMode mode = DIFFUSE_TEXTURE);
157 
169  osg::Node* node, const std::string& imagePath, bool repeat = false, TextureMode mode = DIFFUSE_TEXTURE,
170  float scaleU = 1.0f, float scaleV = 1.0f);
171 
172 
177  AGXOSG_EXPORT osg::Texture2D* createTexture(const std::string& filename);
178 
179 
191  osg::Node *node, osg::Texture2D *texture, bool repeat = false, TextureMode mode = DIFFUSE_TEXTURE,
192  float scaleU = 1.0f, float scaleV = 1.0f);
193 
204  AGXOSG_EXPORT bool setTexture(osg::Node *node, agxOSG::Texture2D *texture, bool repeat = false, TextureMode mode = DIFFUSE_TEXTURE, float scaleU = 1.0f, float scaleV = 1.0f);
205 
206 
217  AGXOSG_EXPORT bool setTexture(agxOSG::GeometryNode *node, agxOSG::Texture2D *texture, bool repeat = false, TextureMode mode = DIFFUSE_TEXTURE, float scaleU = 1.0f, float scaleV = 1.0f);
218 
219  template <typename T>
220  void setUniform( osg::Node *node, const std::string& name, T value)
221  {
222  if ( node == nullptr )
223  return;
224 
225  node->getOrCreateStateSet()->addUniform( new osg::Uniform(name.c_str(), value));
226  }
227 
239  AGXOSG_EXPORT bool addText(const agxCollide::Geometry* geometry,
240  osg::Group* root,
241  const std::string& text,
242  const agx::Vec3& relPosition = agx::Vec3(0, 0, 0),
243  const agx::Vec4f& color = agxRender::Color::Yellow(),
244  agx::Real size=0.2);
245 
254  AGXOSG_EXPORT osg::Geode* createText(const std::string& text,
255  const agx::Vec3& relPosition = agx::Vec3(0,0,0),
256  const agx::Vec4f& color = agxRender::Color::Yellow(),
257  agx::Real size = 0.2);
258 
259 
268  AGXOSG_EXPORT bool removeText(const agxCollide::Geometry* geometry, osg::Group * root, size_t index = 0);
269 
278  AGXOSG_EXPORT osgText::Text* findText( const agxCollide::Geometry* geometry, osg::Group* root, size_t index = 0 );
279 
294  AGXOSG_EXPORT osg::Geometry* createGrid(
295  unsigned int resU,
296  unsigned int resV,
297  const osg::Vec3& origin,
298  const osg::Vec3& endPointX,
299  const osg::Vec3& endPointY,
300  bool wireFrameMode = false);
301 
315  AGXOSG_EXPORT osg::Geode* createGrid(
316  unsigned int resU,
317  unsigned int resV,
318  const agx::Vec3& origin,
319  const agx::Vec3& endPointX,
320  const agx::Vec3& endPointY,
321  osg::Group* root);
322 
323 
342  AGXOSG_EXPORT osg::Geometry* create3DGrid(
343  unsigned int resU,
344  unsigned int resV,
345  unsigned int resW,
346  const osg::Vec3& origin,
347  const osg::Vec3& endPointX,
348  const osg::Vec3& endPointY,
349  const osg::Vec3& endPointZ,
350  float width
351  );
352 
369  AGXOSG_EXPORT osg::Geode* create3DGrid(
370  unsigned int resU,
371  unsigned int resV,
372  unsigned int resW,
373  const agx::Vec3& origin,
374  const agx::Vec3& endPointX,
375  const agx::Vec3& endPointY,
376  const agx::Vec3& endPointZ,
377  float width);
378 
379 
388  AGXOSG_EXPORT osg::Geode* createLine(const agx::Vec3& p1, const agx::Vec3& p2, const agx::Vec4& color, float width);
389 
398  AGXOSG_EXPORT osg::Geode* createPolyline(const agx::Vec3Vector& points, const agx::Vec4& color, float width);
399 
404  AGXOSG_EXPORT osg::MatrixTransform* createAxes(agxCollide::Geometry* geometry, agx::Frame* relativeTransform, osg::Group* root, float scale = 1, const agx::Vec4f& color = agx::Vec4f());
405  AGXOSG_EXPORT osg::MatrixTransform* createAxes(agxCollide::Geometry* geometry, agx::AffineMatrix4x4 relativeTransform, osg::Group* root, float scale = 1, const agx::Vec4f& color = agx::Vec4f());
406 
411  AGXOSG_EXPORT osg::MatrixTransform* createAxes(agx::RigidBody* rb, agx::Frame* relativeTransform, osg::Group* root, float scale = 1.f, const agx::Vec4f& color = agx::Vec4f());
412  AGXOSG_EXPORT osg::MatrixTransform* createAxes(agx::RigidBody* rb, agx::AffineMatrix4x4 relativeTransform, osg::Group* root, float scale = 1.f, const agx::Vec4f& color = agx::Vec4f());
413 
414 
415  AGXOSG_EXPORT osg::MatrixTransform* createAxes(agx::AffineMatrix4x4 relativeTransform, osg::Group* root, float scale = 1.f, const agx::Vec4f& color = agx::Vec4f());
416 
420  AGXOSG_EXPORT void createAxes( agx::Constraint* constraint, osg::Group* root, float scale = 1.f, const agx::Vec4f& color = agx::Vec4f() );
421 
426  AGXOSG_EXPORT void setSpecularColor( osg::Node * node, const agx::Vec4f& color );
427 
431  AGXOSG_EXPORT void setShininess( osg::Node *node, float shininess );
432 
437  AGXOSG_EXPORT void setAmbientColor( osg::Node * node, const agx::Vec4f& color );
438 
442  AGXOSG_EXPORT void setAlpha( osg::Node * node, float alpha );
443 
448  AGXOSG_EXPORT void setDiffuseColor( osg::Node * node, const agx::Vec4f& color );
449 
450 
455  AGXOSG_EXPORT void setDiffuseColor( agx::RigidBody* rb, const agx::Vec4f& color, osg::Group* root );
456 
461  AGXOSG_EXPORT void setDiffuseColor( agxCollide::Geometry* geometry, const agx::Vec4f& color, osg::Group* root );
462 
471  AGXOSG_EXPORT agxOSG::GeometryNode *createVisual( const agxCollide::Geometry* geometry, osg::Group* root, float detailRatio = 1.0f, bool createAxes = false, bool evenIfSensor=true );
472 
477 
479 
481 
482  AGXOSG_EXPORT osg::Group *createVisual( agx::RigidBodyEmitter* emitter, osg::Group* root);
483 
484  AGXOSG_EXPORT osg::Group *createVisual(agx::Emitter* emitter, osg::Group* root);
485 
489  AGXOSG_EXPORT osg::MatrixTransform *createVisual(agx::ObserverFrame *frame, osg::Group* root, float scale = 1);
490 
491 
495  AGXOSG_EXPORT osg::Geode *createParticleContactGraph(agx::ParticleSystem* particleSystem, osg::Group* root, agx::Real minForce, agx::Real maxForce);
496 
502  AGXOSG_EXPORT osg::Geode *createParticleTrajectoriesVisual(agx::ParticleSystem* particleSystem, osg::Group* root, agx::Real sampling, agx::UInt numPositions);
503 
509  AGXOSG_EXPORT osg::Geode *createRigidBodyTrajectoriesVisual(agxSDK::Simulation * simulation, osg::Group* root, agx::Real sampling, agx::UInt numPositions, ScalarColorMap* scalarColorMap = nullptr );
510 
511  AGXOSG_EXPORT osg::Geode *createFrameTrajectoryDrawable(agxSDK::Simulation * simulation, osg::Group* root, agx::UInt numPositions, const agx::Vec4f& defaultColor = agx::Vec4f(0.5, 0.5, 0.5, 1.0));
512 
514 
518  AGXOSG_EXPORT osg::Group *createVisual( agx::RigidBody* rb, osg::Group* root, float detailRatio = 1.0f, bool createAxes = false );
519 
525  AGXOSG_EXPORT std::tuple<osg::Group*, std::vector<size_t>> createVisualWithGeometryConnection(agx::RigidBody* rb, osg::Group* root, float detailRatio = 1.0f, bool createAxes = false);
526 
530  AGXOSG_EXPORT osg::Group *createVisual( agxSDK::Assembly *parent, osg::Group* root, float detailRatio = 1.0f, bool createAxes = false );
531 
535  AGXOSG_EXPORT osg::Group* createVisualTemplateCaching( agxSDK::Assembly* parent, osg::Group* root, agxOSG::RigidBodyRenderCache* cache = nullptr, float detailRatio = 1.0f, bool createAxes = false );
536 
544 
548  AGXOSG_EXPORT osg::Group *createVisual(agxSDK::Simulation *simulation, osg::Group* root, float detailRatio = 1.0f, bool createAxes = false);
549 
550  AGXOSG_EXPORT bool setEnableOutline(osg::Node *node, bool enabled, const agxRender::Color& color=agxRender::Color(1,1,0,1), float width = 2.0);
551  AGXOSG_EXPORT bool getEnableOutline(osg::Node *node);
552 
553 
554 
555  AGXOSG_EXPORT void setEnableLight( bool enable, int lightNum, osg::Node* node );
556 
566  AGXOSG_EXPORT void getNearFarPoints(const osg::Camera* camera, float x, float y, agx::Vec3& near, agx::Vec3& far);
567 
576  AGXOSG_EXPORT agxCollide::LocalGeometryContact getHoveredGeometryContact(const osg::Camera * camera, agxCollide::Space * space, float x, float y);
577 
578  AGXOSG_EXPORT bool setEnableWireFrameMode(osg::Node* node, bool flag);
579 
580  AGXOSG_EXPORT bool forceWireFrameModeOn( osg::Node* node );
581 
582  AGXOSG_EXPORT bool toggleWireFrameMode(osg::Node* node);
583 
584  AGXOSG_EXPORT bool setOrbitCamera(osgViewer::Viewer* viewer, agxOSG::GeometryNode* node,
585  const agx::Vec3& eye, const agx::Vec3& center, const agx::Vec3& up,
586  int trackerMode);
587 
588 
589 
593  AGXOSG_EXPORT bool loadCubeMapImages(const std::string& imagename, const std::string& filetype, agx::Vector<osg::ref_ptr<osg::Image> >& images);
594 
598  AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap(agx::Vector<osg::ref_ptr<osg::Image> >& images);
599  AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap(const std::string& imagename, const std::string& filetype);
600 
604  AGXOSG_EXPORT void addRenderColorCallbackToFracture( agxModel::FractureGenerator * listener, osg::Group * root, const agx::Vec4f& color );
605 
610  AGXOSG_EXPORT void addRenderCallbackToFracture( agxModel::FractureGenerator * listener, osg::Group * root );
611 
617 
618 }
AGXOSG_EXPORT osg::Geode * create3DGrid(unsigned int resU, unsigned int resV, unsigned int resW, const agx::Vec3 &origin, const agx::Vec3 &endPointX, const agx::Vec3 &endPointY, const agx::Vec3 &endPointZ, float width)
Create a uniform grid and adds it to a root.
AGXOSG_EXPORT bool loadCubeMapImages(const std::string &imagename, const std::string &filetype, agx::Vector< osg::ref_ptr< osg::Image > > &images)
Internal function to load images into an array.
AGXOSG_EXPORT void addRenderCallbackToFracture(agxModel::FractureGenerator *listener, osg::Group *root)
Adds default createVisual callback to a FractureGenerator when new fragments are created that copies ...
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: Vec3.h:36
AGXOSG_EXPORT osg::Geode * createGrid(unsigned int resU, unsigned int resV, const agx::Vec3 &origin, const agx::Vec3 &endPointX, const agx::Vec3 &endPointY, osg::Group *root)
Create a uniform grid and adds it to a root.
AGXOSG_EXPORT std::tuple< osg::Group *, std::vector< size_t > > createVisualWithGeometryConnection(agx::RigidBody *rb, osg::Group *root, float detailRatio=1.0f, bool createAxes=false)
Given a rigid body, this function creates visual representation of all the geometries.
#define AGXOSG_EXPORT
AGXOSG_EXPORT osg::Geode * createParticleTrajectoriesVisual(agx::ParticleSystem *particleSystem, osg::Group *root, agx::Real sampling, agx::UInt numPositions)
Creates a visual of the particle position trajectories.
AGXOSG_EXPORT osg::Geode * createRigidBodyTrajectoriesVisual(agxSDK::Simulation *simulation, osg::Group *root, agx::Real sampling, agx::UInt numPositions, ScalarColorMap *scalarColorMap=nullptr)
Creates a visual of the rigid body position trajectories.
AGXOSG_EXPORT void setAlpha(osg::Node *node, float alpha)
Set the alpha part of the material for a node.
AGXOSG_EXPORT bool setOrbitCamera(osgViewer::Viewer *viewer, agxOSG::GeometryNode *node, const agx::Vec3 &eye, const agx::Vec3 &center, const agx::Vec3 &up, int trackerMode)
This namespace consists of a set of classes for handling geometric intersection tests including boole...
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:34
AGXOSG_EXPORT bool toggleWireFrameMode(osg::Node *node)
AGXOSG_EXPORT agxOSG::FrameTrajectoryDrawable * findFrameTrajectoryDrawable(osg::Group *root)
The base class for a constraint.
Definition: Constraint.h:88
Utility color class with "common colors".
Definition: Color.h:33
#define DEFAULT_PARTICLE_RENDERING_MODE
AGXOSG_EXPORT void setEnvMapReflectionCoefficient(osg::Node *node, float coeff)
Specifies the amount of reflection that should be used (if CubeMap or SphereMap is assigned to the no...
AGXOSG_EXPORT void setShininess(osg::Node *node, float shininess)
Set the shininess exponent for the Phong specular model.
AGXOSG_EXPORT bool setEnableWireFrameMode(osg::Node *node, bool flag)
AGXOSG_EXPORT void setSpecularColor(osg::Node *node, const agx::Vec4f &color)
Set the specular part of a material for a node.
AGXOSG_EXPORT bool setTexture(agxOSG::GeometryNode *node, agxOSG::Texture2D *texture, bool repeat=false, TextureMode mode=DIFFUSE_TEXTURE, float scaleU=1.0f, float scaleV=1.0f)
Apply a 2D Texture to the specified node in OVERRIDE|PROTECTED mode.
AGXOSG_EXPORT bool setCubeMapTexture(osg::Node *node, const std::string &imagePath, const std::string &imageType=".dds")
Assigns a Cubemap texture to the specified node.
AGXOSG_EXPORT agxCollide::Trimesh * createTrimesh(osg::Node *node)
Extracts mesh data from an osg::Node, creates an agxCollide::Trimesh from it and returns the result...
Spawns new bodys inside a given volume.
Definition: Emitter.h:44
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:36
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
Templated vector class.
Definition: Vector.h:52
A basic particle system that contains all the storages and buffers required for basic operation and a...
AGXOSG_EXPORT osg::Geode * createFrameTrajectoryDrawable(agxSDK::Simulation *simulation, osg::Group *root, agx::UInt numPositions, const agx::Vec4f &defaultColor=agx::Vec4f(0.5, 0.5, 0.5, 1.0))
TextureMode
Definition: utils.h:89
uint32_t UInt
Definition: Integer.h:34
AGXOSG_EXPORT bool getEnableOutline(osg::Node *node)
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:81
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
AGXOSG_EXPORT bool setEnableOutline(osg::Node *node, bool enabled, const agxRender::Color &color=agxRender::Color(1, 1, 0, 1), float width=2.0)
A node that can be associated with a collision geometry so that the transformation of this node is up...
Definition: GeometryNode.h:41
AGXOSG_EXPORT void getNearFarPoints(const osg::Camera *camera, float x, float y, agx::Vec3 &near, agx::Vec3 &far)
Get the near and far points of the current window, given a camera and x and y position.
AGXOSG_EXPORT void createAxes(agx::Constraint *constraint, osg::Group *root, float scale=1.f, const agx::Vec4f &color=agx::Vec4f())
Create axes at the constraint attachments.
AGXOSG_EXPORT osg::Geode * createPolyline(const agx::Vec3Vector &points, const agx::Vec4 &color, float width)
Create and return a new Polyine to render.
AGXOSG_EXPORT void setDiffuseColor(agxCollide::Geometry *geometry, const agx::Vec4f &color, osg::Group *root)
Set the diffuse part of a material for a geometry.
AGXOSG_EXPORT GeometryNode * findGeometryNode(const agxCollide::Geometry *geometry, osg::Group *rootNode)
Finds the geometry node associated to a geometry.
static agxRender::Color Yellow()
Definition: Color.h:193
RigidBodyRenderCache is used to cache generated visuals and lookup mappings of RigidBodies cloned fro...
AGXOSG_EXPORT agxOSG::ParticleSystemDrawable * findParticleSystemDrawable(osg::Group *root)
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
AGXOSG_EXPORT agxCollide::LocalGeometryContact getHoveredGeometryContact(const osg::Camera *camera, agxCollide::Space *space, float x, float y)
Get a geometry contact given the current camera and a position in the camera window.
AGXOSG_EXPORT bool removeText(const agxCollide::Geometry *geometry, osg::Group *root, size_t index=0)
Remove text from a geometry.
The object defining a frame of reference and providing transformations operations.
Definition: Frame.h:67
AGXOSG_EXPORT osg::Geode * createLine(const agx::Vec3 &p1, const agx::Vec3 &p2, const agx::Vec4 &color, float width)
Create and return a new Line to render.
An EventListener can be associated to a Simulation and triggered upon various events.
Definition: EventListener.h:40
AGXOSG_EXPORT osg::Group * createVisualTemplateCaching(agxSDK::Assembly *parent, osg::Group *root, agxOSG::RigidBodyRenderCache *cache=nullptr, float detailRatio=1.0f, bool createAxes=false)
Given an Assembly, this function creates visual representation of all the geometries.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
Spawns new Rigid Bodies inside a volume given to the Emitter.
AGXOSG_EXPORT osg::Texture2D * createTexture(const std::string &filename)
Create a Texture2D object that can be assigned to nodes.
double Real
Definition: Real.h:42
AGXOSG_EXPORT osg::Geode * createText(const std::string &text, const agx::Vec3 &relPosition=agx::Vec3(0, 0, 0), const agx::Vec4f &color=agxRender::Color::Yellow(), agx::Real size=0.2)
Create a text object.
Class that represents a linear scalar color map that converts a scalar interval to a specified color ...
AGXCORE_EXPORT Component * root()
AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap(agx::Vector< osg::ref_ptr< osg::Image > > &images)
Internal functions for creating texture cube maps.
AGXOSG_EXPORT agxOSG::RigidBodySystemDrawable * findRigidBodySystemDrawable(osg::Group *root)
AGXOSG_EXPORT void addRenderColorCallbackToFracture(agxModel::FractureGenerator *listener, osg::Group *root, const agx::Vec4f &color)
Adds createVisual callback to a FractureGenerator when new fragments are created that sets a specific...
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:42
AGXOSG_EXPORT bool addText(const agxCollide::Geometry *geometry, osg::Group *root, const std::string &text, const agx::Vec3 &relPosition=agx::Vec3(0, 0, 0), const agx::Vec4f &color=agxRender::Color::Yellow(), agx::Real size=0.2)
Add text relative to an geometry.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
AGXOSG_EXPORT osgText::Text * findText(const agxCollide::Geometry *geometry, osg::Group *root, size_t index=0)
Finds a text object already added to the geometry (so the text can be changed).
AGXOSG_EXPORT void setEnableLight(bool enable, int lightNum, osg::Node *node)
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
AGXOSG_EXPORT bool forceWireFrameModeOn(osg::Node *node)
AGXOSG_EXPORT osg::Group * createVisual(agxSDK::Simulation *simulation, osg::Group *root, float detailRatio=1.0f, bool createAxes=false)
Given a simulation, this function creates visual representation of all the contents in the simulation...
AGXOSG_EXPORT agxSDK::EventListener * createVisualUpdater(agxSDK::EventListener *listener, osg::Group *root)
Given some specific classes inheriting from EventListener, this function can handle custom visual rep...
AGXOSG_EXPORT void setAmbientColor(osg::Node *node, const agx::Vec4f &color)
Set the ambient part of a material for a node.
The agxUtil namespace contain classes and methods for utility functionality.
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
void setUniform(osg::Node *node, const std::string &name, T value)
Definition: utils.h:220
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.
Definition: Assembly.h:66
AGXOSG_EXPORT osg::Geode * createParticleContactGraph(agx::ParticleSystem *particleSystem, osg::Group *root, agx::Real minForce, agx::Real maxForce)
Creates a visual of the particle contact network, which colors contacts depending on contact force...
With this class you can attach an ObserverFrame object relative to a RigidBody.
Definition: ObserverFrame.h:43