AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxOSG Namespace Reference

The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph. More...

Classes

class  BoxProxy
 Implementation of osg-based BoxProxy. More...
 
class  CableDamageDataRenderer
 
class  CableDamageRenderer
 Class that creates OSG rendering nodes for each segment of a cable and colors them with a color gradient based on the current total damage estimate for the segment. More...
 
struct  CameraData
 
class  CameraManipulatorFactory
 
class  CameraSynchronization
 
class  CapsuleProxy
 Implementation of osg-based CapsuleProxy. More...
 
class  ClipPlane
 This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane. More...
 
class  ConeProxy
 Implementation of osg-based ConeProxy. More...
 
class  ContactProxy
 Implementation of batch rendering of contact points. More...
 
class  ContainerShapeBatchRenderer
 Class that handles batch rendering of objects in forward iterator compliant container. More...
 
class  CylinderGeometryShader
 
class  CylinderProxy
 Implementation of osg-based CylinderProxy. More...
 
class  DeformableHeightFieldRenderer
 An osg-renderer for a deformable height field. More...
 
class  EglContext
 EglContext is a class that provides a different way to setup a graphics context for 3D rendering. More...
 
class  EmbeddedGLWindow
 This class is for embedding an OSG based window inside another OpenGL contex, for example in QT. More...
 
class  ExampleApplication
 Class that encapsulates rendering and simulation using OpenSceneGraph. More...
 
class  ExampleApplicationController
 
class  ExternalProcess
 Cross-platform utility class for wrapping and launching external processes. More...
 
class  FilterContactByName
 Filter that only accepts contacts where at least on of the bodes in the contact has a particular name. More...
 
class  ForceArrowRenderer
 Creates an arrow visualizing force, either contact force (for added bodies), or motor force for added Constraint1DOF (Hinge,Prismatic,..) More...
 
class  FrameTrajectoryDrawable
 
class  GatherAvgPressure
 
class  GatherMaxPressure
 
class  GeometryNode
 A node that can be associated with a collision geometry so that the transformation of this node is updated from the transformation of the Geometry. More...
 
class  GranularMergedBodyDrawable
 
class  GranularMergedBodyDrawableSprites
 
class  GraphRenderer
 
class  GuiEventAdapter
 Class for inserting mouse and keyboard event from OSG into agxSDK::Simulation. More...
 
class  GuiEventListener
 Derive from this class to implement a listener for simulation GuiEvents. More...
 
class  HeightField
 Rendering class for the agxCollide::HeightField The visual representation will be updated if the HeightField is modified. More...
 
class  HeightFieldProxy
 Implementation of osg-based HeightfieldProxy. More...
 
class  HollowCylinderProxy
 Implementation of osg-based HollowCylinderProxy. More...
 
class  HollowTruncatedConeProxy
 Implementation of osg-based HollowTruncatedConeProxy. More...
 
class  HudTextManager
 HudTextManager is a class that inherits from agxSDK::StepEventListener and makes it easier to manipulate text in an agxOSG::SceneDecorator. More...
 
class  ImageCapture
 
class  ImageCaptureBase
 
class  LightSource
 
class  LightsSynchronization
 
class  LineProxy
 Implementation of osg-based LineProxy. More...
 
class  MeshExtractor
 Store Vertices and indices as a vector in this class instance. More...
 
class  MeshExtractorReference
 Store vertices and indices in vectors by reference. More...
 
class  NoTiltTrackballManipulator
 
class  OSGData
 Class for handling methods related to OSG such as setColor, setTransform etc. More...
 
class  OsgTextureAtlasBuilder
 
class  Panel
 
class  ParticleContactGraphDrawable
 
class  ParticleSystemDrawable
 
class  ParticleTrajectoriesDrawable
 
class  PickHandler
 
class  PlaneProxy
 Implementation of osg-based PlaneProxy. More...
 
class  PlotsystemConstructor
 
class  PointSpriteDrawable
 
class  PressureAtlas
 A pressure map for a single trimesh. More...
 
class  PressureAtlasManager
 
class  PressureFieldRenderer
 
class  PressureFromContacts
 Generates pressure on a mesh from contacts. More...
 
class  PressureGenerator
 Base class for types that want to supply force updates to a PressureAtlas. More...
 
class  PressureRenderer
 An utility class for handling of pressure rendering and legend. More...
 
class  PressureToColorConverter
 
class  PressureToRgbaConverter
 
class  RenderProxyFactory
 Implementation of the abstract class from the agxRender namespace, this class is responsible for creating RenderProxy of various types and render them as efficiently as possible in OpenSceneGraph. More...
 
class  RenderStateManager
 
class  RenderTarget
 Render target is used for rendering camera content to a buffer, either a DEPTH or COLOR target. More...
 
class  RenderTaskDrawable
 
class  RenderToImage
 This class will transfer the camera buffer to the CPU for local storage/processing. More...
 
class  RenderToTexture
 
class  RigidBodyBatchRenderProxy
 Implementation of batch rendering of rigid body center of mass position. More...
 
class  RigidBodySystemDrawable
 
class  RigidBodyTrajectoryDrawable
 
class  RockGenerator
 
class  ScalarColorMap
 Class that represents a linear scalar color map that converts a scalar interval to a specified color range. More...
 
class  SCCameraManipulator
 SCCameraManipulator is base class for camera control based on focal center, distance from the center, and orientation of distance vector to the eye. More...
 
class  SceneDecorator
 Decorates a scene with a specific AGX Rendering Style. More...
 
struct  SceneDescription
 A pod-struct for holding information about scenes to load by the application. More...
 
class  ShapeBatchRenderer
 Base class for batch rendering of any shape or shape composite. More...
 
class  SimpleDepthBufferLidar
 
class  SimulationDrawable
 
class  SimulationPausedPrinter
 SimulationPausedPrinter is a class that inherits from agxSDK::GuiEventListener and prints the simulation time to the hud. More...
 
class  SimulationSerializer
 class for serializing a simulation into a series for files on disk 0001_filename etc. More...
 
class  SimulationTimePrinter
 SimulationTimePrinter is a class that inherits from agxSDK::GuiEventListener and prints the simulation time to the hud. More...
 
class  SkyBox
 Sky box. More...
 
class  SoilParticleSystemDrawable
 Internal drawable class for drawing the Voxel grid structure. More...
 
class  SphereProxy
 Implementation of osg-based SphereProxy. More...
 
class  SplineRenderer
 Class for rendering a spline model. More...
 
class  SplineRendererOld
 
class  SplineShader
 Class to encapsulate reading shader files and setting up rendering of a Spline. More...
 
class  StatisticsRenderer
 
class  TerrainGridRenderer
 
class  TerrainHeightColorRenderer
 
class  TerrainRenderer
 
class  TerrainVoxelDrawable
 Internal drawable class for drawing the Voxel grid structure. More...
 
class  TerrainVoxelRenderer
 Rendering class for the agxTerrain::Terrain. More...
 
class  Text
 
class  TextGeometry
 Class for drawing simple/fast 2D text onto screen. More...
 
class  TextProxy
 Implementation of osg-based TextProxy. More...
 
class  Texture2D
 
class  TextureAtlasBuilder
 
class  Transform
 
class  Tree
 
class  TreeRenderer
 
class  TriangleExtractOperatorBase
 This class is a base class that implements a functor, with a method triangle that is executed for each triangle visited. More...
 
class  TriangleExtractor
 This class traverses a subgraph, accumulates transformations and execute a functor (TriangleExtractOperator per triangle. More...
 
class  TrimeshProxy
 Implementation of osg-based TrimeshProxy. More...
 
class  TruncatedConeProxy
 Implementation of osg-based TruncatedConeProxy. More...
 
class  VideoFFMPEGPipeCapture
 
class  WireRenderer
 
class  WireRendererOld
 
class  WireRenderProxy
 
class  WireShapeProxy
 Implementation of osg-based WireShapeProxy. More...
 

Typedefs

typedef osg::Group *(* BuildScenePtr )(agxSDK::Simulation *simulation, ExampleApplication *application)
 
typedef agx::observer_ptr
< const
CableDamageDataRenderer > 
CableDamageDataRendererConstObserver
 
typedef agx::ref_ptr< const
CableDamageDataRenderer > 
CableDamageDataRendererConstRef
 
typedef agx::observer_ptr
< CableDamageDataRenderer > 
CableDamageDataRendererObserver
 
typedef agx::ref_ptr
< CableDamageDataRenderer > 
CableDamageDataRendererRef
 
typedef agx::observer_ptr
< const CableDamageRenderer > 
CableDamageRendererConstObserver
 
typedef agx::ref_ptr< const
CableDamageRenderer > 
CableDamageRendererConstRef
 
typedef agx::observer_ptr
< CableDamageRenderer > 
CableDamageRendererObserver
 
typedef agx::ref_ptr
< CableDamageRenderer > 
CableDamageRendererRef
 
typedef agx::Vector
< ExponentialMovingAverageStatisticVector > 
calculateTotalContactForceVectorVector
 
typedef osgGA::MatrixManipulator CameraManipulatorType
 
typedef agx::observer_ptr
< const ClipPlane > 
ClipPlaneConstObserver
 
typedef agx::ref_ptr< const
ClipPlane > 
ClipPlaneConstRef
 
typedef agx::observer_ptr
< ClipPlane > 
ClipPlaneObserver
 
typedef agx::ref_ptr< ClipPlane > ClipPlaneRef
 
typedef agx::Vector
< agx::Constraint1DOFObserver > 
Constraint1DOFObserverVector
 Helper vector's for ForceArrowListener. More...
 
typedef agx::Vector< std::pair
< Constraint1DOFObserverVector,
agx::Vec3 > > 
Constraint1DOFObserverVectorVec3PairVector
 
typedef osg::ref_ptr
< CylinderGeometryShader > 
CylinderGeometryShaderRef
 
typedef agx::observer_ptr
< const
ExampleApplicationController > 
ExampleApplicationControllerConstObserver
 
typedef agx::ref_ptr< const
ExampleApplicationController > 
ExampleApplicationControllerConstRef
 
typedef agx::observer_ptr
< ExampleApplicationController > 
ExampleApplicationControllerObserver
 
typedef agx::ref_ptr
< ExampleApplicationController > 
ExampleApplicationControllerRef
 
typedef agx::ref_ptr
< ExampleApplication > 
ExampleApplicationRef
 
typedef agx::Vector
< agxUtil::ExponentialMovingAverageStatistic > 
ExponentialMovingAverageStatisticVector
 
typedef agx::observer_ptr
< const ExternalProcess > 
ExternalProcessConstObserver
 
typedef agx::ref_ptr< const
ExternalProcess > 
ExternalProcessConstRef
 
typedef agx::observer_ptr
< ExternalProcess > 
ExternalProcessObserver
 
typedef agx::ref_ptr
< ExternalProcess > 
ExternalProcessRef
 
typedef agx::observer_ptr
< const
FrameTrajectoryDrawable > 
FrameTrajectoryDrawableConstObserver
 
typedef agx::ref_ptr< const
FrameTrajectoryDrawable > 
FrameTrajectoryDrawableConstRef
 
typedef agx::observer_ptr
< FrameTrajectoryDrawable > 
FrameTrajectoryDrawableObserver
 
typedef agx::ref_ptr
< FrameTrajectoryDrawable > 
FrameTrajectoryDrawableRef
 
typedef agx::observer_ptr
< const GatherAvgPressure > 
GatherAvgPressureConstObserver
 
typedef agx::ref_ptr< const
GatherAvgPressure > 
GatherAvgPressureConstRef
 
typedef agx::observer_ptr
< GatherAvgPressure > 
GatherAvgPressureObserver
 
typedef agx::ref_ptr
< GatherAvgPressure > 
GatherAvgPressureRef
 
typedef agx::observer_ptr
< const GatherMaxPressure > 
GatherMaxPressureConstObserver
 
typedef agx::ref_ptr< const
GatherMaxPressure > 
GatherMaxPressureConstRef
 
typedef agx::observer_ptr
< GatherMaxPressure > 
GatherMaxPressureObserver
 
typedef agx::ref_ptr
< GatherMaxPressure > 
GatherMaxPressureRef
 
typedef agx::observer_ptr
< const
GranularMergedBodyDrawable > 
GranularMergedBodyDrawableConstObserver
 
typedef agx::ref_ptr< const
GranularMergedBodyDrawable > 
GranularMergedBodyDrawableConstRef
 
typedef agx::observer_ptr
< GranularMergedBodyDrawable > 
GranularMergedBodyDrawableObserver
 
typedef agx::ref_ptr
< GranularMergedBodyDrawable > 
GranularMergedBodyDrawableRef
 
typedef agx::observer_ptr
< const
GranularMergedBodyDrawableSprites > 
GranularMergedBodyDrawableSpritesConstObserver
 
typedef agx::ref_ptr< const
GranularMergedBodyDrawableSprites > 
GranularMergedBodyDrawableSpritesConstRef
 
typedef agx::observer_ptr
< GranularMergedBodyDrawableSprites > 
GranularMergedBodyDrawableSpritesObserver
 
typedef agx::ref_ptr
< GranularMergedBodyDrawableSprites > 
GranularMergedBodyDrawableSpritesRef
 
typedef agx::observer_ptr
< const GraphRenderer > 
GraphRendererConstObserver
 
typedef agx::ref_ptr< const
GraphRenderer > 
GraphRendererConstRef
 
typedef agx::observer_ptr
< GraphRenderer > 
GraphRendererObserver
 
typedef agx::ref_ptr
< GraphRenderer > 
GraphRendererRef
 
typedef agx::ref_ptr
< GuiEventListener > 
GuiEventListenerRef
 
typedef agx::observer_ptr
< const HeightField > 
HeightFieldConstObserver
 
typedef agx::ref_ptr< const
HeightField > 
HeightFieldConstRef
 
typedef agx::observer_ptr
< HeightField > 
HeightFieldObserver
 
typedef agx::ref_ptr< HeightField > HeightFieldRef
 
typedef agx::observer_ptr
< const HudTextManager > 
HudTextManagerConstObserver
 
typedef agx::ref_ptr< const
HudTextManager > 
HudTextManagerConstRef
 
typedef agx::observer_ptr
< HudTextManager > 
HudTextManagerObserver
 
typedef agx::ref_ptr
< HudTextManager > 
HudTextManagerRef
 
typedef agx::observer_ptr
< const ImageCaptureBase > 
ImageCaptureBaseConstObserver
 
typedef agx::ref_ptr< const
ImageCaptureBase > 
ImageCaptureBaseConstRef
 
typedef agx::observer_ptr
< ImageCaptureBase > 
ImageCaptureBaseObserver
 
typedef agx::ref_ptr
< ImageCaptureBase > 
ImageCaptureBaseRef
 
typedef agx::observer_ptr
< const ImageCapture > 
ImageCaptureConstObserver
 
typedef agx::ref_ptr< const
ImageCapture > 
ImageCaptureConstRef
 
typedef agx::observer_ptr
< ImageCapture > 
ImageCaptureObserver
 
typedef agx::ref_ptr
< ImageCapture > 
ImageCaptureRef
 
typedef agx::Vector< PanelRef > PanelContainer
 
typedef osg::ref_ptr< Panel > PanelRef
 
typedef agx::observer_ptr
< const PickHandler > 
PickHandlerConstObserver
 
typedef agx::ref_ptr< const
PickHandler > 
PickHandlerConstRef
 
typedef agx::observer_ptr
< PickHandler > 
PickHandlerObserver
 
typedef agx::ref_ptr< PickHandler > PickHandlerRef
 
typedef osg::ref_ptr
< PointSpriteDrawable > 
PointSpriteDrawableRef
 
typedef agx::observer_ptr
< const PressureAtlas > 
PressureAtlasConstObserver
 
typedef agx::ref_ptr< const
PressureAtlas > 
PressureAtlasConstRef
 
typedef agx::observer_ptr
< const PressureAtlasManager > 
PressureAtlasManagerConstObserver
 
typedef agx::ref_ptr< const
PressureAtlasManager > 
PressureAtlasManagerConstRef
 
typedef agx::observer_ptr
< PressureAtlasManager > 
PressureAtlasManagerObserver
 
typedef agx::ref_ptr
< PressureAtlasManager > 
PressureAtlasManagerRef
 
typedef agx::observer_ptr
< PressureAtlas > 
PressureAtlasObserver
 
typedef agx::ref_ptr
< PressureAtlas > 
PressureAtlasRef
 
typedef agx::observer_ptr
< const PressureFieldRenderer > 
PressureFieldRendererConstObserver
 
typedef agx::ref_ptr< const
PressureFieldRenderer > 
PressureFieldRendererConstRef
 
typedef agx::observer_ptr
< PressureFieldRenderer > 
PressureFieldRendererObserver
 
typedef agx::ref_ptr
< PressureFieldRenderer > 
PressureFieldRendererRef
 
typedef agx::observer_ptr
< const PressureFromContacts > 
PressureFromContactsConstObserver
 
typedef agx::ref_ptr< const
PressureFromContacts > 
PressureFromContactsConstRef
 
typedef agx::observer_ptr
< PressureFromContacts > 
PressureFromContactsObserver
 
typedef agx::ref_ptr
< PressureFromContacts > 
PressureFromContactsRef
 
typedef agx::observer_ptr
< const PressureGenerator > 
PressureGeneratorConstObserver
 
typedef agx::ref_ptr< const
PressureGenerator > 
PressureGeneratorConstRef
 
typedef agx::observer_ptr
< PressureGenerator > 
PressureGeneratorObserver
 
typedef agx::ref_ptr
< PressureGenerator > 
PressureGeneratorRef
 
typedef agx::observer_ptr
< const PressureRenderer > 
PressureRendererConstObserver
 
typedef agx::ref_ptr< const
PressureRenderer > 
PressureRendererConstRef
 
typedef agx::observer_ptr
< PressureRenderer > 
PressureRendererObserver
 
typedef agx::ref_ptr
< PressureRenderer > 
PressureRendererRef
 
typedef agx::observer_ptr
< const
PressureToColorConverter > 
PressureToColorConverterConstObserver
 
typedef agx::ref_ptr< const
PressureToColorConverter > 
PressureToColorConverterConstRef
 
typedef agx::observer_ptr
< PressureToColorConverter > 
PressureToColorConverterObserver
 
typedef agx::ref_ptr
< PressureToColorConverter > 
PressureToColorConverterRef
 
typedef agx::observer_ptr
< const
PressureToRgbaConverter > 
PressureToRgbaConverterConstObserver
 
typedef agx::ref_ptr< const
PressureToRgbaConverter > 
PressureToRgbaConverterConstRef
 
typedef agx::observer_ptr
< PressureToRgbaConverter > 
PressureToRgbaConverterObserver
 
typedef agx::ref_ptr
< PressureToRgbaConverter > 
PressureToRgbaConverterRef
 
typedef agx::observer_ptr
< const RenderProxyFactory > 
RenderProxyFactoryConstObserver
 
typedef agx::ref_ptr< const
RenderProxyFactory > 
RenderProxyFactoryConstRef
 
typedef agx::observer_ptr
< RenderProxyFactory > 
RenderProxyFactoryObserver
 
typedef agx::ref_ptr
< RenderProxyFactory > 
RenderProxyFactoryRef
 
typedef agx::observer_ptr
< const RenderTarget > 
RenderTargetConstObserver
 
typedef agx::ref_ptr< const
RenderTarget > 
RenderTargetConstRef
 
typedef agx::observer_ptr
< RenderTarget > 
RenderTargetObserver
 
typedef agx::ref_ptr
< RenderTarget > 
RenderTargetRef
 
typedef agx::observer_ptr
< const RenderToImage > 
RenderToImageConstObserver
 
typedef agx::ref_ptr< const
RenderToImage > 
RenderToImageConstRef
 
typedef agx::observer_ptr
< RenderToImage > 
RenderToImageObserver
 
typedef agx::ref_ptr
< RenderToImage > 
RenderToImageRef
 
typedef agx::observer_ptr
< const RenderToTexture > 
RenderToTextureConstObserver
 
typedef agx::ref_ptr< const
RenderToTexture > 
RenderToTextureConstRef
 
typedef agx::observer_ptr
< RenderToTexture > 
RenderToTextureObserver
 
typedef agx::ref_ptr
< RenderToTexture > 
RenderToTextureRef
 
typedef agx::HashVector
< agx::RigidBodyRef, agx::Vec3 > 
RigidBodyRefVec3PairTable
 
typedef agx::observer_ptr
< const
RigidBodyTrajectoryDrawable > 
RigidBodyTrajectoryDrawableConstObserver
 
typedef agx::ref_ptr< const
RigidBodyTrajectoryDrawable > 
RigidBodyTrajectoryDrawableConstRef
 
typedef agx::observer_ptr
< RigidBodyTrajectoryDrawable > 
RigidBodyTrajectoryDrawableObserver
 
typedef agx::ref_ptr
< RigidBodyTrajectoryDrawable > 
RigidBodyTrajectoryDrawableRef
 
typedef agx::ref_ptr
< RockGenerator > 
RockGeneratorRef
 
typedef agx::observer_ptr
< const ScalarColorMap > 
ScalarColorMapConstObserver
 
typedef agx::ref_ptr< const
ScalarColorMap > 
ScalarColorMapConstRef
 
typedef agx::observer_ptr
< ScalarColorMap > 
ScalarColorMapObserver
 
typedef agx::ref_ptr
< ScalarColorMap > 
ScalarColorMapRef
 
typedef agx::observer_ptr
< const SimpleDepthBufferLidar > 
SimpleDepthBufferLidarConstObserver
 
typedef agx::ref_ptr< const
SimpleDepthBufferLidar > 
SimpleDepthBufferLidarConstRef
 
typedef agx::observer_ptr
< SimpleDepthBufferLidar > 
SimpleDepthBufferLidarObserver
 
typedef agx::ref_ptr
< SimpleDepthBufferLidar > 
SimpleDepthBufferLidarRef
 
typedef agx::ref_ptr
< SimulationSerializer > 
SimulationSerializerRef
 
typedef agx::ref_ptr
< SplineRendererOld > 
SplineRendererOldRef
 
typedef agx::ref_ptr
< SplineRenderer > 
SplineRendererRef
 
typedef osg::ref_ptr
< SplineShader > 
SplineShaderRef
 
typedef agx::ref_ptr
< StatisticsRenderer > 
StatisticsRendererRef
 
typedef agx::observer_ptr
< const TerrainVoxelRenderer > 
TerrainVoxelRendererConstObserver
 
typedef agx::ref_ptr< const
TerrainVoxelRenderer > 
TerrainVoxelRendererConstRef
 
typedef agx::observer_ptr
< TerrainVoxelRenderer > 
TerrainVoxelRendererObserver
 
typedef agx::ref_ptr
< TerrainVoxelRenderer > 
TerrainVoxelRendererRef
 
typedef agx::ref_ptr< Tree > TreeRef
 
typedef agx::ref_ptr
< TreeRenderer > 
TreeRendererRef
 
typedef osg::TriangleFunctor
< TriangleExtractOperatorBase > 
TriangleExtractOperator
 TriangleExtractOperator is the method inherit to create a operator that will be executed per triangle. More...
 
typedef agx::observer_ptr
< const VideoFFMPEGPipeCapture > 
VideoFFMPEGPipeCaptureConstObserver
 
typedef agx::ref_ptr< const
VideoFFMPEGPipeCapture > 
VideoFFMPEGPipeCaptureConstRef
 
typedef agx::observer_ptr
< VideoFFMPEGPipeCapture > 
VideoFFMPEGPipeCaptureObserver
 
typedef agx::ref_ptr
< VideoFFMPEGPipeCapture > 
VideoFFMPEGPipeCaptureRef
 
typedef agx::ref_ptr
< WireRendererOld > 
WireRendererOldRef
 
typedef agx::ref_ptr
< WireRenderer > 
WireRendererRef
 

Enumerations

enum  ContactForceStatistics {
  NORMAL_X = 0, NORMAL_Y, NORMAL_Z, FRICTION_X,
  FRICTION_Y, FRICTION_Z, NUM_FORCES
}
 Contact force directions. More...
 
enum  TextureMode {
  DIFFUSE_TEXTURE =0, SHADOW_TEXTURE =1, SHADOW_JITTER_TEXTURE =2, NORMALMAP_TEXTURE =3,
  HEIGHTMAP_TEXTURE =4, SPECULARMAP_TEXTURE = 5, SPHEREMAP_TEXTURE = 6
}
 

Functions

AGXOSG_EXPORT void addRenderCallbackToFractureListener (agxModel::FractureGenerator *listener, osg::Group *root, const agx::Vec4f &color)
 Adds default createVisual callback to a fractureListener when new fragments are created. More...
 
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. More...
 
 AGX_DECLARE_VECTOR_TYPES (RenderToTexture)
 
 AGX_DECLARE_VECTOR_TYPES (PressureGenerator)
 
 AGX_DECLARE_VECTOR_TYPES (RenderToImage)
 
 AGX_DECLARE_VECTOR_TYPES (RenderTarget)
 
 AGX_DECLARE_VECTOR_TYPES (ClipPlane)
 
 AGX_DECLARE_VECTOR_TYPES (PressureToColorConverter)
 
AGXOSG_EXPORT
osg::MatrixTransform * 
createAxes (agxCollide::Geometry *geometry, agx::Frame *relativeTransform, osg::Group *root, float scale=1, const agx::Vec4f &color=agx::Vec4f())
 Creates osg axes relative a geometry given relative transform. More...
 
AGXOSG_EXPORT
osg::MatrixTransform * 
createAxes (agxCollide::Geometry *geometry, agx::AffineMatrix4x4 relativeTransform, osg::Group *root, float scale=1, const agx::Vec4f &color=agx::Vec4f())
 
AGXOSG_EXPORT
osg::MatrixTransform * 
createAxes (agx::RigidBody *rb, agx::Frame *relativeTransform, osg::Group *root, float scale=1.f, const agx::Vec4f &color=agx::Vec4f())
 Creates osg axes relative a rigid body given relative transform. More...
 
AGXOSG_EXPORT
osg::MatrixTransform * 
createAxes (agx::RigidBody *rb, agx::AffineMatrix4x4 relativeTransform, osg::Group *root, float scale=1.f, const agx::Vec4f &color=agx::Vec4f())
 
AGXOSG_EXPORT
osg::MatrixTransform * 
createAxes (agx::AffineMatrix4x4 relativeTransform, osg::Group *root, float scale=1.f, const agx::Vec4f &color=agx::Vec4f())
 
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. More...
 
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))
 
AGXOSG_EXPORT osg::Geometry * createGrid (unsigned int resU, unsigned int resV, const osg::Vec3 &origin, const osg::Vec3 &endPointX, const osg::Vec3 &endPointY, bool wireFrameMode=false)
 Create a uniform grid. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
AGXOSG_EXPORT osg::Geode * createSkyBox (agx::Vector< osg::ref_ptr< osg::Image > > &images, float size)
 
AGXOSG_EXPORT osg::Geode * createSkySphere (const std::string &name, agx::Vector< osg::ref_ptr< osg::Image > > &images, float radius)
 
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. More...
 
AGXOSG_EXPORT osg::Texture2D * createTexture (const std::string &filename)
 Create a Texture2D object that can be assigned to nodes. More...
 
AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap (agx::Vector< osg::ref_ptr< osg::Image > > &images)
 Internal functions for creating texture cube maps. More...
 
AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap (const std::string &imagename, const std::string &filetype)
 
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. More...
 
AGXOSG_EXPORT
agxOSG::GeometryNode * 
createVisual (const agxCollide::Geometry *geometry, osg::Group *root, float detailRatio=1.0f, bool createAxes=false, bool evenIfSensor=true)
 Given a geometry, this function create visual representation of the shape. More...
 
AGXOSG_EXPORT osg::Geode * createVisual (agx::ParticleSystem *particleSystem, osg::Group *root, agxOSG::ParticleSystemDrawable::ParticleRenderingMode mode=agxOSG::ParticleSystemDrawable::QUAD_SPRITES, agxOSG::ParticleSystemDrawable::ParticleShaderMode particleShaderMode=agxOSG::ParticleSystemDrawable::ROTATION_SPRITES)
 Given a particle system, create a visual representation. More...
 
AGXOSG_EXPORT osg::Group * createVisual (agx::RigidBodyEmitter *emitter, osg::Group *root)
 
AGXOSG_EXPORT osg::Group * createVisual (agx::Emitter *emitter, osg::Group *root)
 
AGXOSG_EXPORT
osg::MatrixTransform * 
createVisual (agx::ObserverFrame *frame, osg::Group *root, float scale=1)
 Create a visual representation of an ObserverFrame (axis) More...
 
AGXOSG_EXPORT osg::Group * createVisual (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. More...
 
AGXOSG_EXPORT osg::Group * createVisual (agxSDK::Assembly *parent, osg::Group *root, float detailRatio=1.0f, bool createAxes=false)
 Given an Assembly, this function creates visual representation of all the geometries. More...
 
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, such as geometries and particle systems. More...
 
AGXOSG_EXPORT bool executePythonScript (const std::string &filename, const std::string &function, agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, osg::Group *root)
 Execute a named function in a python script file. More...
 
AGXOSG_EXPORT bool executePythonScriptString (const std::string &script, const std::string &function, agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, osg::Group *root, std::string &errorMessage)
 Execute a named function in a python script. More...
 
AGXOSG_EXPORT bool executeScript (const std::string &filename, const std::string &function, agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, osg::Group *root)
 Execute a named function in a lua script file. More...
 
AGXOSG_EXPORT bool executeScriptString (const std::string &script, const std::string &function, agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, osg::Group *root, std::string &errorMessage)
 Execute a named function in a lua script. More...
 
AGXOSG_EXPORT
agxOSG::FrameTrajectoryDrawable * 
findFrameTrajectoryDrawable (osg::Group *root)
 
AGXOSG_EXPORT GeometryNode * findGeometryNode (const agxCollide::Geometry *geometry, osg::Group *rootNode)
 Finds the geometry node associated to a geometry. More...
 
AGXOSG_EXPORT
agxOSG::ParticleSystemDrawable * 
findParticleSystemDrawable (osg::Group *root)
 
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). More...
 
AGXOSG_EXPORT bool forceWireFrameModeOn (osg::Node *node)
 
AGXOSG_EXPORT void GeometryNode_reference (agxOSG::GeometryNode *node)
 
AGXOSG_EXPORT void GeometryNode_unreference (agxOSG::GeometryNode *node)
 
AGXOSG_EXPORT bool getEnableOutline (osg::Node *node)
 
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. More...
 
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. More...
 
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. More...
 
unsigned int AGXOSG_EXPORT makeRasterFont (void)
 
AGXOSG_EXPORT bool readFile (const std::string &filename, agxSDK::Simulation *simulation, osg::Group *root, agxSDK::Assembly *parent=nullptr, agx::Real detailRatio=0.35, bool createAxis=false, agx::UInt selection=agxSDK::Simulation::READ_DEFAULT)
 Utility function for reading various files: More...
 
AGXOSG_EXPORT osg::Node * readNodeFile (const std::string &filename, bool searchForIve=false)
 Read a specified filename from disk and return it as a OpenSceneGraph node. More...
 
AGXOSG_EXPORT osg::Node * readNodeFile (const std::string &filename, const osgDB::ReaderWriter::Options *options, bool searchForIve=false)
 Read a specified filename from disk and return it as a OpenSceneGraph node. More...
 
AGXOSG_EXPORT std::string readPythonScriptError ()
 Checks if there were any error messages when a lua script was executed. More...
 
AGXOSG_EXPORT std::string readScriptError ()
 Checks if there were any error messages when a lua script was executed. More...
 
AGXOSG_EXPORT bool removeText (const agxCollide::Geometry *geometry, osg::Group *root, size_t index=0)
 Remove text from a geometry. More...
 
void AGXOSG_EXPORT renderText (float x, float y, const char *s)
 Render the bitmap text using previously created bitmap fonts. More...
 
AGXOSG_EXPORT void resetPythonScriptError ()
 Resets the script error to the empty string. More...
 
AGXOSG_EXPORT void resetScriptError ()
 Resets the script error to the empty string. More...
 
AGXOSG_EXPORT void setAlpha (osg::Node *node, float alpha)
 Set the alpha part of the material for a node. More...
 
AGXOSG_EXPORT void setAmbientColor (osg::Node *node, const agx::Vec4f &color)
 Set the ambient part of a material for a node. More...
 
AGXOSG_EXPORT bool setCubeMapTexture (osg::Node *node, const std::string &imagePath, const std::string &imageType=".dds")
 Assigns a Cubemap texture to the specified node. More...
 
AGXOSG_EXPORT void setDiffuseColor (osg::Node *node, const agx::Vec4f &color)
 Set the diffuse part of a material for a node. More...
 
AGXOSG_EXPORT void setDiffuseColor (agx::RigidBody *rb, const agx::Vec4f &color, osg::Group *root)
 Set the diffuse part of a material for a rigid body (all geometries). More...
 
AGXOSG_EXPORT void setDiffuseColor (agxCollide::Geometry *geometry, const agx::Vec4f &color, osg::Group *root)
 Set the diffuse part of a material for a geometry. More...
 
AGXOSG_EXPORT void setEnableLight (bool enable, int lightNum, osg::Node *node)
 
AGXOSG_EXPORT bool setEnableOutline (osg::Node *node, bool enabled, const agxRender::Color &color=agxRender::Color(1, 1, 0, 1), float width=2.0)
 
AGXOSG_EXPORT bool setEnableWireFrameMode (osg::Node *node, bool flag)
 
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 node). More...
 
AGXOSG_EXPORT bool setOrbitCamera (osgViewer::Viewer *viewer, agxOSG::GeometryNode *node, const agx::Vec3 &eye, const agx::Vec3 &center, const agx::Vec3 &up, int trackerMode)
 
AGXOSG_EXPORT void setShininess (osg::Node *node, float shininess)
 Set the shininess exponent for the Phong specular model. More...
 
AGXOSG_EXPORT void setSpecularColor (osg::Node *node, const agx::Vec4f &color)
 Set the specular part of a material for a node. More...
 
AGXOSG_EXPORT bool setTexture (const agxCollide::Geometry *geometry, osg::Group *rootNode, const std::string &imagePath, bool repeat=false, TextureMode mode=DIFFUSE_TEXTURE)
 Read an image from disk and apply to the specified geometry as a 2D Texture in OVERRIDE|PROTECTED mode. More...
 
AGXOSG_EXPORT bool setTexture (const agx::RigidBody *rigidBody, osg::Group *rootNode, const std::string &imagePath, bool repeat=false, TextureMode mode=DIFFUSE_TEXTURE)
 For all geometries in the rigid body, this function will set a 2D texture in OVERRIDE|PROTECTED mode. More...
 
AGXOSG_EXPORT bool setTexture (osg::Node *node, const std::string &imagePath, bool repeat=false, TextureMode mode=DIFFUSE_TEXTURE, float scaleU=1.0f, float scaleV=1.0f)
 Read an image from disk and apply to the specified node as a 2D Texture in OVERRIDE|PROTECTED mode. More...
 
AGXOSG_EXPORT bool setTexture (osg::Node *node, osg::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. More...
 
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)
 Apply a 2D Texture to the specified node in OVERRIDE|PROTECTED mode. More...
 
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. More...
 
template<typename T >
void setUniform (osg::Node *node, const std::string &name, T value)
 
AGXOSG_EXPORT void Text_reference (agxOSG::Text *node)
 
AGXOSG_EXPORT void Text_unreference (agxOSG::Text *node)
 
AGXOSG_EXPORT bool toggleWireFrameMode (osg::Node *node)
 
AGXOSG_EXPORT void Transform_reference (agxOSG::Transform *node)
 
AGXOSG_EXPORT void Transform_unreference (agxOSG::Transform *node)
 

Variables

const char * defaultFontName
 

Detailed Description

The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.

Namespace holding utility classes and functions for connecting AGX to the OpenSceneGraph rendering API.

Contains classes/utility functions for connecting AGX to OpenSceneGraph.

Typedef Documentation

typedef osg::Group*(* agxOSG::BuildScenePtr)(agxSDK::Simulation *simulation, ExampleApplication *application)

Definition at line 114 of file ExampleApplication.h.

typedef osgGA::MatrixManipulator agxOSG::CameraManipulatorType

Definition at line 151 of file ExampleApplication.h.

Definition at line 35 of file ClipPlane.h.

Definition at line 35 of file ClipPlane.h.

Definition at line 35 of file ClipPlane.h.

Definition at line 35 of file ClipPlane.h.

Helper vector's for ForceArrowListener.

Definition at line 516 of file utils.h.

Definition at line 106 of file CylinderGeometryShader.h.

Definition at line 35 of file GraphRenderer.h.

Definition at line 35 of file GraphRenderer.h.

Definition at line 33 of file agxOSG/HeightField.h.

Definition at line 33 of file agxOSG/HeightField.h.

Definition at line 30 of file HudTextManager.h.

Definition at line 40 of file ImageCapture.h.

Definition at line 128 of file ImageCapture.h.

Definition at line 128 of file ImageCapture.h.

Definition at line 69 of file agxOSG/PickHandler.h.

typedef osg::ref_ptr< Panel > agxOSG::PanelRef

Definition at line 67 of file agxOSG/PickHandler.h.

Definition at line 74 of file agxOSG/PickHandler.h.

Definition at line 74 of file agxOSG/PickHandler.h.

Definition at line 86 of file PointSpriteDrawable.h.

Definition at line 35 of file PressureAtlas.h.

Definition at line 35 of file PressureAtlas.h.

Definition at line 34 of file RenderTarget.h.

Definition at line 34 of file RenderTarget.h.

Definition at line 28 of file RenderToImage.h.

Definition at line 28 of file RenderToImage.h.

Definition at line 31 of file ScalarColorMap.h.

typedef osg::ref_ptr< SplineShader > agxOSG::SplineShaderRef

Definition at line 123 of file SplineRenderer.h.

Definition at line 90 of file agxOSG/Tree.h.

Definition at line 54 of file agxOSG/Tree.h.

TriangleExtractOperator is the method inherit to create a operator that will be executed per triangle.

Definition at line 138 of file TriangleExtractor.h.

Definition at line 53 of file WireRenderer.h.

Enumeration Type Documentation

Contact force directions.

Enumerator
NORMAL_X 
NORMAL_Y 
NORMAL_Z 
FRICTION_X 
FRICTION_Y 
FRICTION_Z 
NUM_FORCES 

Definition at line 525 of file utils.h.

Enumerator
DIFFUSE_TEXTURE 
SHADOW_TEXTURE 
SHADOW_JITTER_TEXTURE 
NORMALMAP_TEXTURE 
HEIGHTMAP_TEXTURE 
SPECULARMAP_TEXTURE 
SPHEREMAP_TEXTURE 

Definition at line 88 of file utils.h.

Function Documentation

AGXOSG_EXPORT void agxOSG::addRenderCallbackToFractureListener ( agxModel::FractureGenerator *  listener,
osg::Group *  root,
const agx::Vec4f &  color 
)

Adds default createVisual callback to a fractureListener when new fragments are created.

AGXOSG_EXPORT bool agxOSG::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 text object will follow the geometry if it moves.

Note
The Geometry must have a visual representation created before this call.
Parameters
geometry- subject geometry
root- root node
text- the text to render
relPosition- relative position to the geometry
color- color of the text
size- size of the text
Returns
false if the geometry does not have a visual representation in the root parent
agxOSG::AGX_DECLARE_VECTOR_TYPES ( RenderToTexture  )
agxOSG::AGX_DECLARE_VECTOR_TYPES ( PressureGenerator  )
agxOSG::AGX_DECLARE_VECTOR_TYPES ( RenderToImage  )
agxOSG::AGX_DECLARE_VECTOR_TYPES ( RenderTarget  )
agxOSG::AGX_DECLARE_VECTOR_TYPES ( ClipPlane  )
agxOSG::AGX_DECLARE_VECTOR_TYPES ( PressureToColorConverter  )
AGXOSG_EXPORT osg::MatrixTransform* agxOSG::createAxes ( agxCollide::Geometry *  geometry,
agx::Frame *  relativeTransform,
osg::Group *  root,
float  scale = 1,
const agx::Vec4f &  color = agx::Vec4f() 
)

Creates osg axes relative a geometry given relative transform.

If the relative transform is zero, the axes will be at model center of the geometry. If geometry = 0 the root node will be used as parent.

AGXOSG_EXPORT osg::MatrixTransform* agxOSG::createAxes ( agxCollide::Geometry *  geometry,
agx::AffineMatrix4x4  relativeTransform,
osg::Group *  root,
float  scale = 1,
const agx::Vec4f &  color = agx::Vec4f() 
)
AGXOSG_EXPORT osg::MatrixTransform* agxOSG::createAxes ( agx::RigidBody *  rb,
agx::Frame *  relativeTransform,
osg::Group *  root,
float  scale = 1.f,
const agx::Vec4f &  color = agx::Vec4f() 
)

Creates osg axes relative a rigid body given relative transform.

If the relative transform is zero, the axes will be at model center of the rigid body. If rigid body = 0 the root node will be used as parent.

AGXOSG_EXPORT osg::MatrixTransform* agxOSG::createAxes ( agx::RigidBody *  rb,
agx::AffineMatrix4x4  relativeTransform,
osg::Group *  root,
float  scale = 1.f,
const agx::Vec4f &  color = agx::Vec4f() 
)
AGXOSG_EXPORT osg::MatrixTransform* agxOSG::createAxes ( agx::AffineMatrix4x4  relativeTransform,
osg::Group *  root,
float  scale = 1.f,
const agx::Vec4f &  color = agx::Vec4f() 
)
AGXOSG_EXPORT void agxOSG::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* agxOSG::createFrameTrajectoryDrawable ( agxSDK::Simulation *  simulation,
osg::Group *  root,
agx::UInt  numPositions,
const agx::Vec4f &  defaultColor = agx::Vec4f(0.5, 0.5, 0.5, 1.0) 
)
AGXOSG_EXPORT osg::Geometry* agxOSG::createGrid ( unsigned int  resU,
unsigned int  resV,
const osg::Vec3 &  origin,
const osg::Vec3 &  endPointX,
const osg::Vec3 &  endPointY,
bool  wireFrameMode = false 
)

Create a uniform grid.

This function might be a little hard to use, since it uses osg-primitives. There is an easier to use variant of this function.

Parameters
resUThe resolution of the grid (in number of lines) in x.
resVThe resolution of the grid (in number of lines) in y.
originThe origin of the grid in world coordinates
endPointXThe end point of the grid in x coordinates. The distance between this point and the origin gives the length of the grid in x.
endPointYThe end point of the grid in y coordinates. The distance between this point and the origin gives the length of the grid in y.
wireFrameModeunused
Return values
theosg::Geometry* containing the grid.
AGXOSG_EXPORT osg::Geode* agxOSG::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.

Check return value to see if everything was successful.

Parameters
resUThe resolution of the grid (in number of lines) in x.
resVThe resolution of the grid (in number of lines) in y.
originThe origin of the grid in world coordinates
endPointXThe end point of the grid in x coordinates. The distance between this point and the origin gives the length of the grid in x.
endPointYThe end point of the grid in y coordinates. The distance between this point and the origin gives the length of the grid in y.
rootThe root that the grid should be added to. Non-zero.
Return values
Thegeode which is part of root now.
AGXOSG_EXPORT osg::Geode* agxOSG::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.

AGXOSG_EXPORT osg::Geode* agxOSG::createParticleTrajectoriesVisual ( agx::ParticleSystem *  particleSystem,
osg::Group *  root,
agx::Real  sampling,
agx::UInt  numPositions 
)

Creates a visual of the particle position trajectories.

Parameters
sampling- Sampling fraction of particles that will be used for rendering trajectories. 0 (none) - 1.0 (all).
numPositions- Number of positions that will be used for each trajectory.
AGXOSG_EXPORT osg::Geode* agxOSG::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.

Parameters
sampling- Sampling fraction of rigidBodies that will be used for rendering trajectories. 0 (none) - 1.0 (all).
numPositions- Number of positions that will be used for each trajectory.
AGXOSG_EXPORT osg::Geode* agxOSG::createSkyBox ( agx::Vector< osg::ref_ptr< osg::Image > > &  images,
float  size 
)
AGXOSG_EXPORT osg::Geode* agxOSG::createSkySphere ( const std::string &  name,
agx::Vector< osg::ref_ptr< osg::Image > > &  images,
float  radius 
)
AGXOSG_EXPORT osg::Geode* agxOSG::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.

Parameters
text- the text to render
relPosition- relative position to the geometry
color- color of the text
size- size of the text
Returns
The text node
AGXOSG_EXPORT osg::Texture2D* agxOSG::createTexture ( const std::string &  filename)

Create a Texture2D object that can be assigned to nodes.

Parameters
filename- Path to the image file
AGXOSG_EXPORT osg::TextureCubeMap * agxOSG::createTextureCubeMap ( agx::Vector< osg::ref_ptr< osg::Image > > &  images)

Internal functions for creating texture cube maps.

AGXOSG_EXPORT osg::TextureCubeMap * agxOSG::createTextureCubeMap ( const std::string &  imagename,
const std::string &  filetype 
)
AGXOSG_EXPORT agxCollide::Trimesh* agxOSG::createTrimesh ( osg::Node *  node)

Extracts mesh data from an osg::Node, creates an agxCollide::Trimesh from it and returns the result.

All triangle data read from the Node will be merged into one TriangleMesh in the world coordinate system.

AGXOSG_EXPORT agxOSG::GeometryNode* agxOSG::createVisual ( const agxCollide::Geometry *  geometry,
osg::Group *  root,
float  detailRatio = 1.0f,
bool  createAxes = false,
bool  evenIfSensor = true 
)

Given a geometry, this function create visual representation of the shape.

Parameters
geometry. The geometry for which a visual node should be created
root- The root node for the visual node (will be inserted)
detailRatio- The tessellation count, the higher, the more detailed
createAxes- If true, xyz axes are created at the center
evenIfSensor- Create visual even if the geometry is a sensor

Given a particle system, create a visual representation.

AGXOSG_EXPORT osg::Group* agxOSG::createVisual ( agx::RigidBodyEmitter *  emitter,
osg::Group *  root 
)
AGXOSG_EXPORT osg::Group* agxOSG::createVisual ( agx::Emitter *  emitter,
osg::Group *  root 
)
AGXOSG_EXPORT osg::MatrixTransform* agxOSG::createVisual ( agx::ObserverFrame *  frame,
osg::Group *  root,
float  scale = 1 
)

Create a visual representation of an ObserverFrame (axis)

AGXOSG_EXPORT osg::Group* agxOSG::createVisual ( 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.

AGXOSG_EXPORT osg::Group* agxOSG::createVisual ( agxSDK::Assembly *  parent,
osg::Group *  root,
float  detailRatio = 1.0f,
bool  createAxes = false 
)

Given an Assembly, this function creates visual representation of all the geometries.

AGXOSG_EXPORT osg::Group* agxOSG::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, such as geometries and particle systems.

AGXOSG_EXPORT bool agxOSG::executePythonScript ( const std::string &  filename,
const std::string &  function,
agxSDK::Simulation *  simulation,
agxOSG::ExampleApplication *  application,
osg::Group *  root 
)

Execute a named function in a python script file.

In contrast to how things are done with Lua scripts, this function should not receive any arguments but instead retrieve the Simulation, ExampleApplication and OSG group root node objects from the ScriptContext instance retrievable from the agxPython module, e.g in Python:


sim, app, group = (agxPython.scriptContext().getSimulation(), agxPython.scriptContext().getApplication(), agxPython.scriptContext().getGroup())


If agxPython.scriptContext().getSimulation() returns None, the script is not run from AGX. Otherwise, the current Simulation object is returned. AGX Python scripts should end with an if-statement to check if it is None and separately deal with that scenario.

The function should not return anything (it will not be handled).

The script file will be "reloaded" every time, so changes in the file between two calls will be reflected.

Parameters
filename- path to the python script
function- name of function to be called (from global scope)
simulation- pointer to a valid simulation.
application- pointer to the current ExampleApplication being used (could very well be nullptr).
root- pointer to a scene graph root where to put the graphics nodes (can also be nullptr).
AGXOSG_EXPORT bool agxOSG::executePythonScriptString ( const std::string &  script,
const std::string &  function,
agxSDK::Simulation *  simulation,
agxOSG::ExampleApplication *  application,
osg::Group *  root,
std::string &  errorMessage 
)

Execute a named function in a python script.

This function should take no arguments and exist in global scope:

function()

The function should not return anything (it will not be handled).

Parameters
script- the python script string
function- name of function to be called (from global scope)
simulation- pointer to a valid simulation.
application- pointer to the current ExampleApplication being used (could very well be nullptr).
root- pointer to a scene graph root where to put the graphics nodes (can also be nullptr).
errorMessage- Errors will be appended to this string.
AGXOSG_EXPORT bool agxOSG::executeScript ( const std::string &  filename,
const std::string &  function,
agxSDK::Simulation *  simulation,
agxOSG::ExampleApplication *  application,
osg::Group *  root 
)

Execute a named function in a lua script file.

This function should take 3 arguments: <function>(agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, osg::Group *root))

The function should not return anything (it will not be handled).

It is up to the lua function to check if any of the arguments are != 0. The script file will be "reloaded" every time, so changes in the file between two calls will be reflected.

Parameters
filename- path to the lua script
function- name of function to be called (in global scope)
simulation- pointer to a valid simulation.
application- pointer to the current ExampleApplication being used (could very well be null).
root- pointer to a scene graph root where to put the graphics nodes.
AGXOSG_EXPORT bool agxOSG::executeScriptString ( const std::string &  script,
const std::string &  function,
agxSDK::Simulation *  simulation,
agxOSG::ExampleApplication *  application,
osg::Group *  root,
std::string &  errorMessage 
)

Execute a named function in a lua script.

This function should take 3 arguments: <function>(agxSDK::Simulation *simulation, agxOSG::ExampleApplication *application, osg::Group *root))

The function should not return anything (it will not be handled).

It is up to the lua function to check if any of the arguments are != 0.

Parameters
script- the lua script string
function- name of function to be called (in global scope)
simulation- pointer to a valid simulation.
application- pointer to the current ExampleApplication being used (could very well be null).
root- pointer to a scene graph root where to put the graphics nodes.
AGXOSG_EXPORT agxOSG::FrameTrajectoryDrawable* agxOSG::findFrameTrajectoryDrawable ( osg::Group *  root)
AGXOSG_EXPORT GeometryNode* agxOSG::findGeometryNode ( const agxCollide::Geometry *  geometry,
osg::Group *  rootNode 
)

Finds the geometry node associated to a geometry.

Returns
the geometry node if the geometry has one, otherwise false
AGXOSG_EXPORT agxOSG::ParticleSystemDrawable* agxOSG::findParticleSystemDrawable ( osg::Group *  root)
AGXOSG_EXPORT osgText::Text* agxOSG::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).

If several text objects have been added to the geometry, index will find you the i'th text object added.

Parameters
geometry- geometry with agxOSG::GeometryNode and text
root- root node
index- index of the text object to find (default 0)
Returns
text object if present - otherwise false
AGXOSG_EXPORT bool agxOSG::forceWireFrameModeOn ( osg::Node *  node)
AGXOSG_EXPORT void agxOSG::GeometryNode_reference ( agxOSG::GeometryNode *  node)
AGXOSG_EXPORT void agxOSG::GeometryNode_unreference ( agxOSG::GeometryNode *  node)
AGXOSG_EXPORT bool agxOSG::getEnableOutline ( osg::Node *  node)
AGXOSG_EXPORT agxCollide::LocalGeometryContact agxOSG::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.

If the ray passes through more than one geometry, the closest contact is returned.

Parameters
camera- A camera object (from e.g. agxOSG::ExampleApplication::getCamera())
space- A space object (from e.g. agxSDK::Simulation::getSpace())
x- The x position in the camera window (from e.g. agxSDK::GuiEventListener::update(x, y))
y- The y position in the camera window (from e.g. agxSDK::GuiEventListener::update(x, y))
AGXOSG_EXPORT void agxOSG::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.

Note that buffers for the near and far points have to be supplied.

Parameters
camera- A camera object
x- The x position in the camera window
y- The y position in the camera window
near- The near point
far- The far point
AGXOSG_EXPORT bool agxOSG::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.

unsigned int AGXOSG_EXPORT agxOSG::makeRasterFont ( void  )
AGXOSG_EXPORT bool agxOSG::readFile ( const std::string &  filename,
agxSDK::Simulation *  simulation,
osg::Group *  root,
agxSDK::Assembly *  parent = nullptr,
agx::Real  detailRatio = 0.35,
bool  createAxis = false,
agx::UInt  selection = agxSDK::Simulation::READ_DEFAULT 
)

Utility function for reading various files:

  • .agx/.aagx (serialization of simulations)

For the .scene/.agxScene format: If an parent assembly is specified, nothing will be added to the simulation, only into the parent assembly. So you will need to add this assembly to a simulation to be able to simulate the objects.

The file will be searched for using AGX_ENVIRONMENT().getFilePath(agxIO::Environment::RESOURCE_PATH).find() which means that it will use the AGX_FILE_PATH environment variable and path's added to the RESOURCE_PATH.

The data will be added to the simulation given as an argument

Parameters
filename- Filename to be opened and read
simulation- The simulation where the content of the data will be added
root- The openscenegraph root node where visuals (if available) will be put
parent- Objects read from the file will be put in this assembly if it is != nullptr
detailRatio- The detail of the visual models, default=0.34, higher is more tessellated
createAxis- If true XYZ axis will be attached to the visual model
selection- Selection of things to read from file. See agxSDK::Simulation::ReadSelectionMask. Only for .agx or .aagx.
Returns
true if loading was successful, otherwise false.
AGXOSG_EXPORT osg::Node* agxOSG::readNodeFile ( const std::string &  filename,
bool  searchForIve = false 
)

Read a specified filename from disk and return it as a OpenSceneGraph node.

The special thing with this is that if searchForIve is true, it will try to find a file named [path]/[filename].ive instead of the specified extension. Will add the option "noRotation" so that osgDB's plugin for reading .obj-files will not rotate them 90 degrees about the (-1, 0, 0) axis (as it does by default).

Parameters
filename- path to the model that is supposed to be read
searchForIve- if true, a filename with the ive extension will be read instead if found.
Returns
true if model is loaded successfully.
AGXOSG_EXPORT osg::Node* agxOSG::readNodeFile ( const std::string &  filename,
const osgDB::ReaderWriter::Options *  options,
bool  searchForIve = false 
)

Read a specified filename from disk and return it as a OpenSceneGraph node.

The special thing with this is that if searchForIve is true, it will try to find a file named [path]/[filename].ive instead of the specified extension.

Parameters
filename- path to the model that is supposed to be read
options- Options for the call to osgDB::readNodeFile. Recommendation: add the option "noRotation" so that osgDB's plugin for reading .obj-files will not rotate them 90 degrees about the (-1, 0, 0) axis (as it does by default).
searchForIve- if true, a filename with the ive extension will be read instead if found.
Returns
true if model is loaded successfully.
AGXOSG_EXPORT std::string agxOSG::readPythonScriptError ( )

Checks if there were any error messages when a lua script was executed.

Returns
The last error message, or the empty string if no error.
AGXOSG_EXPORT std::string agxOSG::readScriptError ( )

Checks if there were any error messages when a lua script was executed.

Returns
The last error message, or the empty string if no error.
AGXOSG_EXPORT bool agxOSG::removeText ( const agxCollide::Geometry *  geometry,
osg::Group *  root,
size_t  index = 0 
)

Remove text from a geometry.

If several text objects have been added to the geometry,index will find you the i'th text object added.

Parameters
geometry- subject geometry
root- root node
index- index of the text object to remove
Returns
true if text object found, false otherwise
void AGXOSG_EXPORT agxOSG::renderText ( float  x,
float  y,
const char *  s 
)

Render the bitmap text using previously created bitmap fonts.

Referenced by agxOSG::TextGeometry::TextDrawCallback::drawImplementation().

AGXOSG_EXPORT void agxOSG::resetPythonScriptError ( )

Resets the script error to the empty string.

AGXOSG_EXPORT void agxOSG::resetScriptError ( )

Resets the script error to the empty string.

AGXOSG_EXPORT void agxOSG::setAlpha ( osg::Node *  node,
float  alpha 
)

Set the alpha part of the material for a node.

0 completely transparent, 1 - opaque

Referenced by agxRender::RenderManager::PrimitiveCache< agxRender::HollowCylinderProxy >::setAlpha().

AGXOSG_EXPORT void agxOSG::setAmbientColor ( osg::Node *  node,
const agx::Vec4f &  color 
)

Set the ambient part of a material for a node.

If the node does not have a material, a new one will be created and assigned to the node.

AGXOSG_EXPORT bool agxOSG::setCubeMapTexture ( osg::Node *  node,
const std::string &  imagePath,
const std::string &  imageType = ".dds" 
)

Assigns a Cubemap texture to the specified node.

Parameters
node- Node to which the texture will be assigned
imagePath- Path to the initial part of the 6 files that build up the cubemap:

[imagePath]/negx.[imageType] [imagePath]/posx.[imageType] [imagePath]/negy.[imageType] [imagePath]/posy.[imageType] [imagePath]/negz.[imageType] [imagePath]/posz.[imageType]

Parameters
imageType- The file type of the cubemap textures. default is ".dds"
Returns
true if files are found and the node has a cube map assigned
AGXOSG_EXPORT void agxOSG::setDiffuseColor ( osg::Node *  node,
const agx::Vec4f &  color 
)

Set the diffuse part of a material for a node.

If the node does not have a material, a new one will be created and assigned to the node.

AGXOSG_EXPORT void agxOSG::setDiffuseColor ( agx::RigidBody *  rb,
const agx::Vec4f &  color,
osg::Group *  root 
)

Set the diffuse part of a material for a rigid body (all geometries).

Only geometries with geometry node in the scene graph will have their color changed.

AGXOSG_EXPORT void agxOSG::setDiffuseColor ( agxCollide::Geometry *  geometry,
const agx::Vec4f &  color,
osg::Group *  root 
)

Set the diffuse part of a material for a geometry.

If the geometry doesn't have a geometry node (in the scene graph), this call will be ignored.

AGXOSG_EXPORT void agxOSG::setEnableLight ( bool  enable,
int  lightNum,
osg::Node *  node 
)
AGXOSG_EXPORT bool agxOSG::setEnableOutline ( osg::Node *  node,
bool  enabled,
const agxRender::Color &  color = agxRender::Color(1, 1, 0, 1),
float  width = 2.0 
)
AGXOSG_EXPORT bool agxOSG::setEnableWireFrameMode ( osg::Node *  node,
bool  flag 
)
AGXOSG_EXPORT void agxOSG::setEnvMapReflectionCoefficient ( osg::Node *  node,
float  coeff 
)

Specifies the amount of reflection that should be used (if CubeMap or SphereMap is assigned to the node).

0 - No reflection 1 - Only reflection

AGXOSG_EXPORT bool agxOSG::setOrbitCamera ( osgViewer::Viewer *  viewer,
agxOSG::GeometryNode *  node,
const agx::Vec3 &  eye,
const agx::Vec3 &  center,
const agx::Vec3 &  up,
int  trackerMode 
)
AGXOSG_EXPORT void agxOSG::setShininess ( osg::Node *  node,
float  shininess 
)

Set the shininess exponent for the Phong specular model.

AGXOSG_EXPORT void agxOSG::setSpecularColor ( osg::Node *  node,
const agx::Vec4f &  color 
)

Set the specular part of a material for a node.

If the node does not have a material, a new one will be created and assigned to the node.

AGXOSG_EXPORT bool agxOSG::setTexture ( const agxCollide::Geometry *  geometry,
osg::Group *  rootNode,
const std::string &  imagePath,
bool  repeat = false,
TextureMode  mode = DIFFUSE_TEXTURE 
)

Read an image from disk and apply to the specified geometry as a 2D Texture in OVERRIDE|PROTECTED mode.

Note
For this to work, geometry has to have an agxOSG::GeometryNode in the root. createVisual( geometry, root )
Parameters
geometry- geometry to search for
rootNode- Parent node in which the GeometryNode associated to geometry should be found
imagePath- Path to the image to be used as a texture
repeat- If true the texture will use WRAP mode REPEAT
mode- Texture mode
Returns
false if image cannot be read.
AGXOSG_EXPORT bool agxOSG::setTexture ( const agx::RigidBody *  rigidBody,
osg::Group *  rootNode,
const std::string &  imagePath,
bool  repeat = false,
TextureMode  mode = DIFFUSE_TEXTURE 
)

For all geometries in the rigid body, this function will set a 2D texture in OVERRIDE|PROTECTED mode.

Note
For this to work, the geometries have to have an agxOSG::GeometryNode in the root. createVisual( rigidBody, root )
Parameters
rigidBody- body to search for
rootNode- Parent node in which the GeometryNode associated to geometry should be found
imagePath- Path to the image to be used as a texture
repeat- If true the texture will use WRAP mode REPEAT
mode- Texture mode
Returns
false if image cannot be read.
AGXOSG_EXPORT bool agxOSG::setTexture ( osg::Node *  node,
const std::string &  imagePath,
bool  repeat = false,
TextureMode  mode = DIFFUSE_TEXTURE,
float  scaleU = 1.0f,
float  scaleV = 1.0f 
)

Read an image from disk and apply to the specified node as a 2D Texture in OVERRIDE|PROTECTED mode.

Parameters
node- Node to attach texture to
imagePath- Path to the image to be used as a texture
repeat- If true the texture will use WRAP mode REPEAT
mode- Texture mode
scaleU- Scaling of texture in U
scaleV- Scaling of texture in V
Returns
false if image cannot be read.
AGXOSG_EXPORT bool agxOSG::setTexture ( osg::Node *  node,
osg::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.

Parameters
node- Node to attach texture to
texture- The texture to apply
repeat- If true the texture will use WRAP mode REPEAT
mode- Texture mode
scaleU- Scaling of texture in U
scaleV- Scaling of texture in V
Returns
false if image cannot be read.
AGXOSG_EXPORT bool agxOSG::setTexture ( osg::Node *  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.

Parameters
node- Node to attach texture to
texture- The texture to apply
repeat- If true the texture will use WRAP mode REPEAT
mode- Texture mode
scaleU- Scaling of texture in U
scaleV- Scaling of texture in V
Returns
false if image cannot be read.
AGXOSG_EXPORT bool agxOSG::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.

Parameters
node- Node to attach texture to
texture- The texture to apply
repeat- If true the texture will use WRAP mode REPEAT
mode- Texture mode
scaleU- Scaling of texture in U
scaleV- Scaling of texture in V
Returns
false if image cannot be read.
template<typename T >
void agxOSG::setUniform ( osg::Node *  node,
const std::string &  name,
T  value 
)

Definition at line 219 of file utils.h.

AGXOSG_EXPORT void agxOSG::Text_reference ( agxOSG::Text *  node)
AGXOSG_EXPORT void agxOSG::Text_unreference ( agxOSG::Text *  node)
AGXOSG_EXPORT bool agxOSG::toggleWireFrameMode ( osg::Node *  node)
AGXOSG_EXPORT void agxOSG::Transform_reference ( agxOSG::Transform *  node)
AGXOSG_EXPORT void agxOSG::Transform_unreference ( agxOSG::Transform *  node)

Variable Documentation

const char* agxOSG::defaultFontName