AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
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...
 
struct  DeformableEdgeShader
 Visualizes each edge of the deformable mesh, each in a unique color. More...
 
struct  DeformableFaceShader
 Visualizes each tetrahedron in the deformable mesh, each in a unique color. More...
 
class  DeformableHeightFieldRenderer
 An osg-renderer for a deformable height field. More...
 
class  DeformableMeshUpdater
 Updates a renderable representation of a deformable triangle mesh. More...
 
class  DeformableRenderer
 Renders the surface mesh of a deformable object. More...
 
struct  DeformableShaderGeometry
 Shader geometry but with a deformable object. 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  ExampleApplicationListener
 
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  HollowConeProxy
 Implementation of osg-based HollowConeProxy. More...
 
class  HollowCylinderProxy
 Implementation of osg-based HollowCylinderProxy. 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  LidarOutputRenderer
 Lidar point cloud renderer. More...
 
struct  LidarOutputRendererLegendPoint
 Reference color point for lidar hit points when using a color legend. More...
 
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...
 
struct  ModelViewMatrixFinder
 Callback when the model view matrix of the main camera has been updated. More...
 
class  NeoCamera
 A new (as of 2026) extended camera type, allowing for more "cinematic"-like effects. More...
 
class  NeoCameraColorImageOutput
 Outputs the NeoCamera color feed to an image buffer of the specified format and color mapping matrix. More...
 
class  NeoCameraColorTextureOutput
 Outputs the NeoCamera color feed to an OpenSceneGraph texture. More...
 
class  NeoCameraDepthImageOutput
 Outputs the NeoCamera depth feed to an image buffer of the specified format. More...
 
class  NeoCameraDepthTextureOutput
 Outputs the NeoCamera depth feed to an OpenSceneGraph texture. More...
 
class  NeoCameraImageOutput
 Base type for the image (GPU->CPU) outputs of the NeoCamera. More...
 
class  NeoCameraLens
 Lens parameter specification for the NeoCamera. More...
 
class  NeoCameraOutput
 Base type for the outputs of the NeoCamera. More...
 
class  NeoCameraSensor
 Sensor parameter specification for the NeoCamera. More...
 
class  NeoCameraSensorBackend
 The agxSensor camera backend for use of the agxOSG NeoCamera/agxViewer. 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  PrimitiveSetTriangleSorter
 Checks all primitive sets of a render geometry for triangles and sort the triangles back to front given camera model view matrix and vertex depth reduce function [d1, d2, d3] -> d. More...
 
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  RigidBodyColorRenderer
 Renders rigid body colors from agxSDK::RigidBodyColorState to the OSG scene graph. More...
 
class  RigidBodyRenderCache
 RigidBodyRenderCache is used to cache generated visuals and lookup mappings of RigidBodies cloned from Templates in agx::RigidBodyEmitter and other related granular applications. 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...
 
struct  ShaderGeometry
 Empty geometry which can load vertex, geometry and fragment shaders, or create a custom osg::Program. More...
 
class  ShaderGeometryGroup
 A group/transform that supports agxOSG::ShaderGeometry instances. 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
 Creates a skybox. 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  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 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::Vector< ClipPlaneObserver > ClipPlaneObserverVector
 
typedef agx::VectorPOD< ClipPlane * > ClipPlanePtrVector
 
typedef agx::ref_ptr< ClipPlane > ClipPlaneRef
 
typedef agx::Vector< ClipPlaneRef > ClipPlaneRefVector
 
typedef osg::ref_ptr< CylinderGeometryShader > CylinderGeometryShaderRef
 
using DeformableRendererRef = osg::ref_ptr< DeformableRenderer >
 
using DistortionModelParameters = std::array< agx::Real, 5 >
 
typedef agx::observer_ptr< const ExampleApplication > ExampleApplicationConstObserver
 
typedef agx::ref_ptr< const ExampleApplication > ExampleApplicationConstRef
 
typedef agx::observer_ptr< const ExampleApplicationListener > ExampleApplicationListenerConstObserver
 
typedef agx::ref_ptr< const ExampleApplicationListener > ExampleApplicationListenerConstRef
 
typedef agx::observer_ptr< ExampleApplicationListener > ExampleApplicationListenerObserver
 
typedef agx::ref_ptr< ExampleApplicationListener > ExampleApplicationListenerRef
 
typedef agx::observer_ptr< ExampleApplication > ExampleApplicationObserver
 
typedef agx::ref_ptr< ExampleApplication > ExampleApplicationRef
 
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
 
using LidarOutputRendererRef = osg::ref_ptr< LidarOutputRenderer >
 
typedef agx::observer_ptr< const NeoCameraColorImageOutput > NeoCameraColorImageOutputConstObserver
 
typedef agx::ref_ptr< const NeoCameraColorImageOutput > NeoCameraColorImageOutputConstRef
 
typedef agx::observer_ptr< NeoCameraColorImageOutput > NeoCameraColorImageOutputObserver
 
typedef agx::ref_ptr< NeoCameraColorImageOutput > NeoCameraColorImageOutputRef
 
typedef agx::observer_ptr< const NeoCameraColorTextureOutput > NeoCameraColorTextureOutputConstObserver
 
typedef agx::ref_ptr< const NeoCameraColorTextureOutput > NeoCameraColorTextureOutputConstRef
 
typedef agx::observer_ptr< NeoCameraColorTextureOutput > NeoCameraColorTextureOutputObserver
 
typedef agx::ref_ptr< NeoCameraColorTextureOutput > NeoCameraColorTextureOutputRef
 
typedef agx::observer_ptr< const NeoCamera > NeoCameraConstObserver
 
typedef agx::ref_ptr< const NeoCamera > NeoCameraConstRef
 
typedef agx::observer_ptr< const NeoCameraDepthImageOutput > NeoCameraDepthImageOutputConstObserver
 
typedef agx::ref_ptr< const NeoCameraDepthImageOutput > NeoCameraDepthImageOutputConstRef
 
typedef agx::observer_ptr< NeoCameraDepthImageOutput > NeoCameraDepthImageOutputObserver
 
typedef agx::ref_ptr< NeoCameraDepthImageOutput > NeoCameraDepthImageOutputRef
 
typedef agx::observer_ptr< const NeoCameraDepthTextureOutput > NeoCameraDepthTextureOutputConstObserver
 
typedef agx::ref_ptr< const NeoCameraDepthTextureOutput > NeoCameraDepthTextureOutputConstRef
 
typedef agx::observer_ptr< NeoCameraDepthTextureOutput > NeoCameraDepthTextureOutputObserver
 
typedef agx::ref_ptr< NeoCameraDepthTextureOutput > NeoCameraDepthTextureOutputRef
 
typedef agx::observer_ptr< const NeoCameraImageOutput > NeoCameraImageOutputConstObserver
 
typedef agx::ref_ptr< const NeoCameraImageOutput > NeoCameraImageOutputConstRef
 
typedef agx::observer_ptr< NeoCameraImageOutput > NeoCameraImageOutputObserver
 
typedef agx::ref_ptr< NeoCameraImageOutput > NeoCameraImageOutputRef
 
typedef agx::observer_ptr< const NeoCameraLens > NeoCameraLensConstObserver
 
typedef agx::ref_ptr< const NeoCameraLens > NeoCameraLensConstRef
 
typedef agx::observer_ptr< NeoCameraLens > NeoCameraLensObserver
 
typedef agx::ref_ptr< NeoCameraLens > NeoCameraLensRef
 
typedef agx::observer_ptr< NeoCamera > NeoCameraObserver
 
typedef agx::observer_ptr< const NeoCameraOutput > NeoCameraOutputConstObserver
 
typedef agx::ref_ptr< const NeoCameraOutput > NeoCameraOutputConstRef
 
typedef agx::observer_ptr< NeoCameraOutput > NeoCameraOutputObserver
 
typedef agx::Vector< NeoCameraOutputObserver > NeoCameraOutputObserverVector
 
typedef agx::VectorPOD< NeoCameraOutput * > NeoCameraOutputPtrVector
 
typedef agx::ref_ptr< NeoCameraOutput > NeoCameraOutputRef
 
typedef agx::Vector< NeoCameraOutputRef > NeoCameraOutputRefVector
 
typedef agx::ref_ptr< NeoCamera > NeoCameraRef
 
typedef agx::observer_ptr< const NeoCameraSensor > NeoCameraSensorConstObserver
 
typedef agx::ref_ptr< const NeoCameraSensor > NeoCameraSensorConstRef
 
typedef agx::observer_ptr< NeoCameraSensor > NeoCameraSensorObserver
 
typedef agx::ref_ptr< NeoCameraSensor > NeoCameraSensorRef
 
using OptionalDynamicRange = std::optional< agx::Real >
 
using OptionalExposureCompensation = std::optional< agx::Real >
 
using OptionalFocusDistance = std::optional< agx::Real >
 
using OptionalFocusMinimumDistance = std::optional< agx::Real >
 
using OptionalFramerate = std::optional< agx::Real >
 
using OsgShaderGeometryRef = osg::ref_ptr< ShaderGeometry >
 
using OsgShaderGeometryRefVector = std::vector< OsgShaderGeometryRef >
 
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::Vector< PressureGeneratorObserver > PressureGeneratorObserverVector
 
typedef agx::VectorPOD< PressureGenerator * > PressureGeneratorPtrVector
 
typedef agx::ref_ptr< PressureGenerator > PressureGeneratorRef
 
typedef agx::Vector< PressureGeneratorRef > PressureGeneratorRefVector
 
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::Vector< PressureToColorConverterObserver > PressureToColorConverterObserverVector
 
typedef agx::VectorPOD< PressureToColorConverter * > PressureToColorConverterPtrVector
 
typedef agx::ref_ptr< PressureToColorConverter > PressureToColorConverterRef
 
typedef agx::Vector< PressureToColorConverterRef > PressureToColorConverterRefVector
 
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::Vector< RenderTargetObserver > RenderTargetObserverVector
 
typedef agx::VectorPOD< RenderTarget * > RenderTargetPtrVector
 
typedef agx::ref_ptr< RenderTarget > RenderTargetRef
 
typedef agx::Vector< RenderTargetRef > RenderTargetRefVector
 
typedef agx::observer_ptr< const RenderToImage > RenderToImageConstObserver
 
typedef agx::ref_ptr< const RenderToImage > RenderToImageConstRef
 
typedef agx::observer_ptr< RenderToImage > RenderToImageObserver
 
typedef agx::Vector< RenderToImageObserver > RenderToImageObserverVector
 
typedef agx::VectorPOD< RenderToImage * > RenderToImagePtrVector
 
typedef agx::ref_ptr< RenderToImage > RenderToImageRef
 
typedef agx::Vector< RenderToImageRef > RenderToImageRefVector
 
typedef agx::observer_ptr< const RenderToTexture > RenderToTextureConstObserver
 
typedef agx::ref_ptr< const RenderToTexture > RenderToTextureConstRef
 
typedef agx::observer_ptr< RenderToTexture > RenderToTextureObserver
 
typedef agx::Vector< RenderToTextureObserver > RenderToTextureObserverVector
 
typedef agx::VectorPOD< RenderToTexture * > RenderToTexturePtrVector
 
typedef agx::ref_ptr< RenderToTexture > RenderToTextureRef
 
typedef agx::Vector< RenderToTextureRef > RenderToTextureRefVector
 
typedef agx::observer_ptr< const RigidBodyColorRenderer > RigidBodyColorRendererConstObserver
 
typedef agx::ref_ptr< const RigidBodyColorRenderer > RigidBodyColorRendererConstRef
 
typedef agx::observer_ptr< RigidBodyColorRenderer > RigidBodyColorRendererObserver
 
typedef agx::ref_ptr< RigidBodyColorRenderer > RigidBodyColorRendererRef
 
typedef agx::observer_ptr< const RigidBodyRenderCache > RigidBodyRenderCacheConstObserver
 
typedef agx::ref_ptr< const RigidBodyRenderCache > RigidBodyRenderCacheConstRef
 
typedef agx::observer_ptr< RigidBodyRenderCache > RigidBodyRenderCacheObserver
 
typedef agx::ref_ptr< RigidBodyRenderCache > RigidBodyRenderCacheRef
 
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.
 
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  TextureMode {
  DIFFUSE_TEXTURE =0 , SHADOW_TEXTURE =1 , SHADOW_JITTER_TEXTURE =2 , NORMALMAP_TEXTURE =3 ,
  HEIGHTMAP_TEXTURE =4 , ROUGHNESS_TEXTURE = 5 , CUBEMAP_TEXTURE = 6 , METALLIC_TEXTURE = 7
}
 

Functions

AGXOSG_EXPORT void addRenderCallbackToFracture (agxModel::FractureGenerator *listener, osg::Group *root)
 Adds default createVisual callback to a FractureGenerator when new fragments are created that copies RenderData from the fractured geometry shape if it exists.
 
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 color.
 
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, int alignment=6)
 Add text relative to an geometry.
 
AGXOSG_EXPORT osg::StateSet & configureStateSet (osg::StateSet &stateSet, bool isTransparent)
 Configures, or reconfigures, state set for opaque or transparent objects.
 
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 osg::Geometry * create3DGrid (unsigned int resU, unsigned int resV, unsigned int resW, const osg::Vec3 &origin, const osg::Vec3 &endPointX, const osg::Vec3 &endPointY, const osg::Vec3 &endPointZ, float width)
 Create a uniform grid and adds it to a root.
 
AGXOSG_EXPORT osg::MatrixTransform * createAxes (agx::AffineMatrix4x4 absoluteTransform, osg::Group *root, float scale=1, float width=3)
 Creates osg axes relative the world given the absoluteTransform.
 
AGXOSG_EXPORT bool createAxes (agx::Constraint *constraint, osg::Group *root, float scale=1, float width=3)
 Create two axes at the constraint attachments.
 
AGXOSG_EXPORT osg::MatrixTransform * createAxes (agx::RigidBody *rb, agx::AffineMatrix4x4 relativeTransform, osg::Group *root, float scale=1, float width=3)
 Creates osg axes relative a rigid body given relative transform.
 
AGXOSG_EXPORT osg::MatrixTransform * createAxes (agx::RigidBody *rb, agx::Frame *relativeTransform, osg::Group *root, float scale=1, float width=3)
 Creates osg axes relative a rigid body given relative transform.
 
AGXOSG_EXPORT osg::MatrixTransform * createAxes (agxCollide::Geometry *geometry, agx::AffineMatrix4x4 relativeTransform, osg::Group *root, float scale=1, float width=3)
 Creates osg axes relative a geometry given relative transform.
 
AGXOSG_EXPORT osg::MatrixTransform * createAxes (agxCollide::Geometry *geometry, agx::Frame *relativeTransform, osg::Group *root, float scale=1, float width=3)
 Creates osg axes relative a geometry given relative transform.
 
AGXOSG_EXPORT osg::MatrixTransform * createAxes (float scale=1, float width=3)
 Create a x, y and z arrow with the size 1.
 
AGXOSG_EXPORT osg::Geode * createCubeLines (const agx::Vec3 &position, const agx::Vec3 &boxHalfVec3, const agxRender::Color &color=agxRender::Color::BlueViolet(), const agx::Real lineWidth=2.0f)
 This function generates a cube using line segments and returns an osg::Geode node, which can be added to an OSG scenegraph.
 
AGXOSG_EXPORT osg::MatrixTransform * createCylinder (const agx::AffineMatrix4x4 &transform, const agx::Vec4 &color, float radius, float height)
 Create and return a new Cylinder to render.
 
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::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 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.
 
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.
 
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.
 
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 * createPolyline (const agx::Vec3Vector &points, const agx::Vec4 &color, float width)
 Create and return a new Polyine to render.
 
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 osg::Geode * createSkySphere (const std::string &name, agx::Vector< osg::ref_ptr< osg::Image > > &images, float radius, float offset=0)
 Create a Sphere with a specified name that will project a cubemap spherically (not as 6 faces) using a shader.
 
AGXOSG_EXPORT osg::Geode * createSphere (const agx::Vec3 &center, const agx::Vec4 &color, float radius)
 Create and return a new Sphere to render.
 
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.
 
AGXOSG_EXPORT osg::Texture2D * createTexture (const agxCollide::TextureDataRef data, bool linear)
 
AGXOSG_EXPORT osg::Texture2D * createTexture (const std::string &filename)
 Create a Texture2D object that can be assigned to nodes.
 
AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap (agx::Vector< osg::ref_ptr< osg::Image > > &images)
 Create a TextureCubeMap from 6 images with a 90x90 fov.
 
AGXOSG_EXPORT osg::TextureCubeMap * createTextureCubeMap (const std::string &imagename, const std::string &filetype)
 Creates an returns a CubeMap based on the images.
 
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.
 
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)
 
AGXOSG_EXPORT osg::Geode * createVisual (agx::ParticleSystem *particleSystem, osg::Group *root, agxOSG::ParticleSystemDrawable::ParticleRenderingMode mode=DEFAULT_PARTICLE_RENDERING_MODE, agxOSG::ParticleSystemDrawable::ParticleShaderMode particleShaderMode=agxOSG::ParticleSystemDrawable::ROTATION_SPRITES)
 Given a particle system, create a visual representation.
 
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.
 
AGXOSG_EXPORT osg::Group * createVisual (agx::RigidBodyEmitter *emitter, osg::Group *root)
 
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.
 
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.
 
AGXOSG_EXPORT agxOSG::TerrainVoxelRenderer * createVisual (agxSDK::TerrainInstance *terrainInstance, osg::Group *root)
 A terrain requires a TerrainVoxelRenderer for rendering and this function will create a TerrainVoxelRenderer and return a pointer to it for modification.
 
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.
 
AGXOSG_EXPORT agxOSG::DeformableRenderer * createVisual (const agxModel::DeformableObject *deformable, osg::Group *root, const agxRender::Color &color=agxRender::Color::DarkOliveGreen(), bool colorSurfaceStress=false, const agxRender::Color &maxStressColor=agxRender::Color::Red(), agx::Real maxStressLimit=6.0E4)
 Create deformable renderer given deformable object, root node and color.
 
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.
 
AGXOSG_EXPORT agxSDK::EventListener * createVisualUpdater (agxSDK::EventListener *listener, osg::Group *root)
 Given some specific classes inheriting from EventListener, this function can handle custom visual representations and effects.
 
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.
 
AGXOSG_EXPORT agxOSG::DeformableRenderer * findDeformableRenderer (const agxModel::DeformableObject *deformable, osg::Group *root)
 Searches for renderer of deformable in root.
 
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.
 
AGXOSG_EXPORT agx::Vector< GeometryNode * > findGeometryNodes (const agxCollide::Geometry *geometry, osg::Group *rootNode)
 Finds the geometry nodes associated to a geometry, if multiple are present in the specified root graph.
 
AGXOSG_EXPORT agxOSG::ParticleSystemDrawable * findParticleSystemDrawable (osg::Group *root)
 
AGXOSG_EXPORT agxOSG::RigidBodySystemDrawable * findRigidBodySystemDrawable (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).
 
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.
 
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 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.
 
unsigned int AGXOSG_EXPORT makeRasterFont (void)
 
template<typename M1 , typename M2 >
bool matrix4x4ExactlyEqual (const M1 &m1, const M2 &m2)
 
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, agxOSG::RigidBodyRenderCache *cache=nullptr)
 Utility function for reading various files:
 
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.
 
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.
 
AGXOSG_EXPORT bool removeText (const agxCollide::Geometry *geometry, osg::Group *root, size_t index=0)
 Remove text from a geometry.
 
void AGXOSG_EXPORT renderText (float x, float y, const char *s)
 Render the bitmap text using previously created bitmap fonts.
 
AGXOSG_EXPORT void setAlpha (osg::Node *node, float alpha, bool override=false)
 Set the alpha part of the material for a node.
 
AGXOSG_EXPORT void setAmbientColor (osg::Node *node, const agx::Vec4f &color, bool override=false)
 Set the ambient part of a material for a node.
 
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 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).
 
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 void setDiffuseColor (osg::Node *node, const agx::Vec4f &color, bool override=false)
 Set the diffuse part of a material for a node.
 
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).
 
AGXOSG_EXPORT void setGamma (osg::Node *node, float gamma, bool override=false)
 Set the gamma that will be used to transform Physical color to monitor color.
 
AGXOSG_EXPORT void setMetallic (osg::Node *node, float metallic, bool override=false)
 Set the metallic:ness of the material.
 
AGXOSG_EXPORT bool setOrbitCamera (osgViewer::Viewer *viewer, osg::Group *node, const agx::Vec3 &eye, const agx::Vec3 &center, const agx::Vec3 &up, int trackerMode=osgGA::NodeTrackerManipulator::NODE_CENTER)
 
AGXOSG_EXPORT void setRoughness (osg::Node *node, float roughness, bool override=false)
 Set the roughness of the material.
 
AGXOSG_EXPORT void setShininess (osg::Node *node, float shininess, bool override=false)
 Set the shininess exponent for the Phong specular model.
 
AGXOSG_EXPORT void setSpecularColor (osg::Node *node, const agx::Vec4f &color, bool override=false)
 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 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.
 
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.
 
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.
 
AGXOSG_EXPORT bool setTexture (osg::Node *node, const agxCollide::TextureDataRef data, bool repeat=false, TextureMode mode=DIFFUSE_TEXTURE, float scaleU=1.0f, float scaleV=1.0f)
 
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.
 
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.
 
template<typename T >
void setUniform (osg::Node *node, const std::string &name, T value)
 
AGXOSG_EXPORT void setupTerrainJournalPlaybackSettings (agxSDK::Simulation *simulation)
 Setup journal playback settings for each TerrainVoxelRenderer in the specified simulation.
 
AGXOSG_EXPORT size_t smoothNormals (osg::Node *node, float creaseAngle=1.48353f)
 Smoothes the normals of all meshes in osg::Geometries using agxUtil::SmoothingVisitor found under the specified node and child nodes.
 
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

◆ BuildScenePtr

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

Definition at line 130 of file ExampleApplication.h.

◆ CableDamageDataRendererConstObserver

◆ CableDamageDataRendererConstRef

◆ CableDamageDataRendererObserver

◆ CableDamageDataRendererRef

◆ CableDamageRendererConstObserver

◆ CableDamageRendererConstRef

◆ CableDamageRendererObserver

◆ CableDamageRendererRef

◆ CameraManipulatorType

typedef osgGA::MatrixManipulator agxOSG::CameraManipulatorType

Definition at line 167 of file ExampleApplication.h.

◆ ClipPlaneConstObserver

Definition at line 35 of file ClipPlane.h.

◆ ClipPlaneConstRef

Definition at line 35 of file ClipPlane.h.

◆ ClipPlaneObserver

Definition at line 35 of file ClipPlane.h.

◆ ClipPlaneObserverVector

◆ ClipPlanePtrVector

Definition at line 36 of file ClipPlane.h.

◆ ClipPlaneRef

Definition at line 35 of file ClipPlane.h.

◆ ClipPlaneRefVector

Definition at line 36 of file ClipPlane.h.

◆ CylinderGeometryShaderRef

Definition at line 106 of file CylinderGeometryShader.h.

◆ DeformableRendererRef

using agxOSG::DeformableRendererRef = typedef osg::ref_ptr<DeformableRenderer>

Definition at line 235 of file DeformableRenderer.h.

◆ DistortionModelParameters

using agxOSG::DistortionModelParameters = typedef std::array<agx::Real, 5>

Definition at line 39 of file NeoCamera.h.

◆ ExampleApplicationConstObserver

◆ ExampleApplicationConstRef

◆ ExampleApplicationListenerConstObserver

◆ ExampleApplicationListenerConstRef

◆ ExampleApplicationListenerObserver

◆ ExampleApplicationListenerRef

◆ ExampleApplicationObserver

◆ ExampleApplicationRef

◆ ExternalProcessConstObserver

◆ ExternalProcessConstRef

◆ ExternalProcessObserver

◆ ExternalProcessRef

◆ FrameTrajectoryDrawableConstObserver

◆ FrameTrajectoryDrawableConstRef

◆ FrameTrajectoryDrawableObserver

◆ FrameTrajectoryDrawableRef

◆ GatherAvgPressureConstObserver

◆ GatherAvgPressureConstRef

◆ GatherAvgPressureObserver

◆ GatherAvgPressureRef

◆ GatherMaxPressureConstObserver

◆ GatherMaxPressureConstRef

◆ GatherMaxPressureObserver

◆ GatherMaxPressureRef

◆ GranularMergedBodyDrawableConstObserver

◆ GranularMergedBodyDrawableConstRef

◆ GranularMergedBodyDrawableObserver

◆ GranularMergedBodyDrawableRef

◆ GranularMergedBodyDrawableSpritesConstObserver

◆ GranularMergedBodyDrawableSpritesConstRef

◆ GranularMergedBodyDrawableSpritesObserver

◆ GranularMergedBodyDrawableSpritesRef

◆ GraphRendererConstObserver

◆ GraphRendererConstRef

Definition at line 32 of file GraphRenderer.h.

◆ GraphRendererObserver

◆ GraphRendererRef

Definition at line 32 of file GraphRenderer.h.

◆ GuiEventListenerRef

◆ HeightFieldConstObserver

◆ HeightFieldConstRef

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

◆ HeightFieldObserver

◆ HeightFieldRef

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

◆ HudTextManagerConstObserver

◆ HudTextManagerConstRef

Definition at line 30 of file HudTextManager.h.

◆ HudTextManagerObserver

◆ HudTextManagerRef

◆ ImageCaptureBaseConstObserver

◆ ImageCaptureBaseConstRef

Definition at line 38 of file ImageCapture.h.

◆ ImageCaptureBaseObserver

◆ ImageCaptureBaseRef

◆ ImageCaptureConstObserver

◆ ImageCaptureConstRef

Definition at line 125 of file ImageCapture.h.

◆ ImageCaptureObserver

◆ ImageCaptureRef

Definition at line 125 of file ImageCapture.h.

◆ LidarOutputRendererRef

using agxOSG::LidarOutputRendererRef = typedef osg::ref_ptr<LidarOutputRenderer>

Definition at line 278 of file LidarOutputRenderer.h.

◆ NeoCameraColorImageOutputConstObserver

◆ NeoCameraColorImageOutputConstRef

◆ NeoCameraColorImageOutputObserver

◆ NeoCameraColorImageOutputRef

◆ NeoCameraColorTextureOutputConstObserver

◆ NeoCameraColorTextureOutputConstRef

◆ NeoCameraColorTextureOutputObserver

◆ NeoCameraColorTextureOutputRef

◆ NeoCameraConstObserver

Definition at line 42 of file NeoCamera.h.

◆ NeoCameraConstRef

Definition at line 42 of file NeoCamera.h.

◆ NeoCameraDepthImageOutputConstObserver

◆ NeoCameraDepthImageOutputConstRef

◆ NeoCameraDepthImageOutputObserver

◆ NeoCameraDepthImageOutputRef

◆ NeoCameraDepthTextureOutputConstObserver

◆ NeoCameraDepthTextureOutputConstRef

◆ NeoCameraDepthTextureOutputObserver

◆ NeoCameraDepthTextureOutputRef

◆ NeoCameraImageOutputConstObserver

◆ NeoCameraImageOutputConstRef

◆ NeoCameraImageOutputObserver

◆ NeoCameraImageOutputRef

◆ NeoCameraLensConstObserver

◆ NeoCameraLensConstRef

Definition at line 43 of file NeoCamera.h.

◆ NeoCameraLensObserver

◆ NeoCameraLensRef

Definition at line 43 of file NeoCamera.h.

◆ NeoCameraObserver

Definition at line 42 of file NeoCamera.h.

◆ NeoCameraOutputConstObserver

◆ NeoCameraOutputConstRef

Definition at line 45 of file NeoCamera.h.

◆ NeoCameraOutputObserver

◆ NeoCameraOutputObserverVector

◆ NeoCameraOutputPtrVector

◆ NeoCameraOutputRef

Definition at line 45 of file NeoCamera.h.

◆ NeoCameraOutputRefVector

◆ NeoCameraRef

Definition at line 42 of file NeoCamera.h.

◆ NeoCameraSensorConstObserver

◆ NeoCameraSensorConstRef

Definition at line 44 of file NeoCamera.h.

◆ NeoCameraSensorObserver

◆ NeoCameraSensorRef

Definition at line 44 of file NeoCamera.h.

◆ OptionalDynamicRange

using agxOSG::OptionalDynamicRange = typedef std::optional<agx::Real>

Definition at line 36 of file NeoCamera.h.

◆ OptionalExposureCompensation

using agxOSG::OptionalExposureCompensation = typedef std::optional<agx::Real>

Definition at line 35 of file NeoCamera.h.

◆ OptionalFocusDistance

using agxOSG::OptionalFocusDistance = typedef std::optional<agx::Real>

Definition at line 37 of file NeoCamera.h.

◆ OptionalFocusMinimumDistance

using agxOSG::OptionalFocusMinimumDistance = typedef std::optional<agx::Real>

Definition at line 38 of file NeoCamera.h.

◆ OptionalFramerate

using agxOSG::OptionalFramerate = typedef std::optional<agx::Real>

Definition at line 40 of file NeoCamera.h.

◆ OsgShaderGeometryRef

using agxOSG::OsgShaderGeometryRef = typedef osg::ref_ptr<ShaderGeometry>

Definition at line 29 of file ShaderGeometry.h.

◆ OsgShaderGeometryRefVector

Definition at line 30 of file ShaderGeometry.h.

◆ PanelContainer

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

◆ PanelRef

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

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

◆ PickHandlerConstObserver

◆ PickHandlerConstRef

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

◆ PickHandlerObserver

◆ PickHandlerRef

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

◆ PointSpriteDrawableRef

Definition at line 86 of file PointSpriteDrawable.h.

◆ PressureAtlasConstObserver

◆ PressureAtlasConstRef

Definition at line 35 of file PressureAtlas.h.

◆ PressureAtlasManagerConstObserver

◆ PressureAtlasManagerConstRef

◆ PressureAtlasManagerObserver

◆ PressureAtlasManagerRef

◆ PressureAtlasObserver

◆ PressureAtlasRef

Definition at line 35 of file PressureAtlas.h.

◆ PressureFieldRendererConstObserver

◆ PressureFieldRendererConstRef

◆ PressureFieldRendererObserver

◆ PressureFieldRendererRef

◆ PressureFromContactsConstObserver

◆ PressureFromContactsConstRef

◆ PressureFromContactsObserver

◆ PressureFromContactsRef

◆ PressureGeneratorConstObserver

◆ PressureGeneratorConstRef

◆ PressureGeneratorObserver

◆ PressureGeneratorObserverVector

◆ PressureGeneratorPtrVector

◆ PressureGeneratorRef

◆ PressureGeneratorRefVector

◆ PressureRendererConstObserver

◆ PressureRendererConstRef

◆ PressureRendererObserver

◆ PressureRendererRef

◆ PressureToColorConverterConstObserver

◆ PressureToColorConverterConstRef

◆ PressureToColorConverterObserver

◆ PressureToColorConverterObserverVector

◆ PressureToColorConverterPtrVector

◆ PressureToColorConverterRef

◆ PressureToColorConverterRefVector

◆ PressureToRgbaConverterConstObserver

◆ PressureToRgbaConverterConstRef

◆ PressureToRgbaConverterObserver

◆ PressureToRgbaConverterRef

◆ RenderProxyFactoryConstObserver

◆ RenderProxyFactoryConstRef

◆ RenderProxyFactoryObserver

◆ RenderProxyFactoryRef

◆ RenderTargetConstObserver

◆ RenderTargetConstRef

Definition at line 34 of file RenderTarget.h.

◆ RenderTargetObserver

◆ RenderTargetObserverVector

◆ RenderTargetPtrVector

◆ RenderTargetRef

Definition at line 34 of file RenderTarget.h.

◆ RenderTargetRefVector

◆ RenderToImageConstObserver

◆ RenderToImageConstRef

Definition at line 28 of file RenderToImage.h.

◆ RenderToImageObserver

◆ RenderToImageObserverVector

◆ RenderToImagePtrVector

◆ RenderToImageRef

Definition at line 28 of file RenderToImage.h.

◆ RenderToImageRefVector

◆ RenderToTextureConstObserver

◆ RenderToTextureConstRef

◆ RenderToTextureObserver

◆ RenderToTextureObserverVector

◆ RenderToTexturePtrVector

◆ RenderToTextureRef

◆ RenderToTextureRefVector

◆ RigidBodyColorRendererConstObserver

◆ RigidBodyColorRendererConstRef

◆ RigidBodyColorRendererObserver

◆ RigidBodyColorRendererRef

◆ RigidBodyRenderCacheConstObserver

◆ RigidBodyRenderCacheConstRef

◆ RigidBodyRenderCacheObserver

◆ RigidBodyRenderCacheRef

◆ RigidBodyTrajectoryDrawableConstObserver

◆ RigidBodyTrajectoryDrawableConstRef

◆ RigidBodyTrajectoryDrawableObserver

◆ RigidBodyTrajectoryDrawableRef

◆ RockGeneratorRef

◆ ScalarColorMapConstObserver

◆ ScalarColorMapConstRef

Definition at line 31 of file ScalarColorMap.h.

◆ ScalarColorMapObserver

◆ ScalarColorMapRef

◆ SimpleDepthBufferLidarConstObserver

◆ SimpleDepthBufferLidarConstRef

◆ SimpleDepthBufferLidarObserver

◆ SimpleDepthBufferLidarRef

◆ SimulationSerializerRef

◆ SplineRendererOldRef

◆ SplineRendererRef

◆ SplineShaderRef

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

Definition at line 123 of file SplineRenderer.h.

◆ StatisticsRendererRef

◆ TerrainVoxelRendererConstObserver

◆ TerrainVoxelRendererConstRef

◆ TerrainVoxelRendererObserver

◆ TerrainVoxelRendererRef

◆ TreeRef

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

◆ TreeRendererRef

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

◆ TriangleExtractOperator

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

Definition at line 138 of file TriangleExtractor.h.

◆ VideoFFMPEGPipeCaptureConstObserver

◆ VideoFFMPEGPipeCaptureConstRef

◆ VideoFFMPEGPipeCaptureObserver

◆ VideoFFMPEGPipeCaptureRef

◆ WireRendererOldRef

◆ WireRendererRef

Definition at line 53 of file WireRenderer.h.

Enumeration Type Documentation

◆ TextureMode

Enumerator
DIFFUSE_TEXTURE 
SHADOW_TEXTURE 
SHADOW_JITTER_TEXTURE 
NORMALMAP_TEXTURE 
HEIGHTMAP_TEXTURE 
ROUGHNESS_TEXTURE 
CUBEMAP_TEXTURE 
METALLIC_TEXTURE 

Definition at line 100 of file utils.h.

Function Documentation

◆ addRenderCallbackToFracture()

AGXOSG_EXPORT void agxOSG::addRenderCallbackToFracture ( agxModel::FractureGenerator *  listener,
osg::Group *  root 
)

Adds default createVisual callback to a FractureGenerator when new fragments are created that copies RenderData from the fractured geometry shape if it exists.

References addRenderCallbackToFracture().

Referenced by addRenderCallbackToFracture().

◆ addRenderColorCallbackToFracture()

AGXOSG_EXPORT void agxOSG::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 color.

References addRenderColorCallbackToFracture().

Referenced by addRenderColorCallbackToFracture().

◆ addText()

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,
int  alignment = 6 
)

Add text relative to an geometry.

The text object will follow the geometry if it moves.

enum AxisAlignment { [0] XY_PLANE, [1] REVERSED_XY_PLANE, [2] XZ_PLANE, [3] REVERSED_XZ_PLANE, [4] YZ_PLANE, [5] REVERSED_YZ_PLANE, [6] SCREEN, [7] USER_DEFINED_ROTATION };

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
alignment- AxisAlignment.SCREEN == 6 is default, how the text should relate to the camera
Returns
false if the geometry does not have a visual representation in the root parent

References addText().

Referenced by addText().

◆ configureStateSet()

AGXOSG_EXPORT osg::StateSet & agxOSG::configureStateSet ( osg::StateSet &  stateSet,
bool  isTransparent 
)

Configures, or reconfigures, state set for opaque or transparent objects.

Parameters
stateSet- state set to configure
isTransparent- true to configure the state set for transparent surface, otherwise false for opaque
Returns
the input stateSet

◆ create3DGrid() [1/2]

AGXOSG_EXPORT osg::Geode * agxOSG::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.

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.
resWThe resolution of the grid (in number of lines) in z.
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.
endPointZThe end point of the grid in z coordinates. The distance between this point and the origin gives the length of the grid in z.
widthThe line width of the grid, this is in pixel size.
Return values
Thecreated geode with the grid. This may be null if the method failed. Remember to add this geometry to a node.

References create3DGrid().

◆ create3DGrid() [2/2]

AGXOSG_EXPORT osg::Geometry * agxOSG::create3DGrid ( unsigned int  resU,
unsigned int  resV,
unsigned int  resW,
const osg::Vec3 &  origin,
const osg::Vec3 &  endPointX,
const osg::Vec3 &  endPointY,
const osg::Vec3 &  endPointZ,
float  width 
)

Create a uniform grid and adds it to a root.

Check return value to see if everything was successful. 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.
resWThe resolution of the grid (in number of lines) in z.
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.
endPointZThe end point of the grid in z coordinates. The distance between this point and the origin gives the length of the grid in z.
widthThe line width of the grid, this is in pixel size.
Return values
theosg::Geometry* containing the grid. Remember to add this geometry to a node.

References create3DGrid().

Referenced by create3DGrid().

◆ createAxes() [1/7]

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createAxes ( agx::AffineMatrix4x4  absoluteTransform,
osg::Group *  root,
float  scale = 1,
float  width = 3 
)

Creates osg axes relative the world given the absoluteTransform.

Parameters
root- if not null, the created MatrixTransform will be added to this node as a child.
scale- Scale of the axes. Default is 1.
width- Line width
Returns
pointer to a MatrixTransform containing the Axes geometry

References createAxes().

◆ createAxes() [2/7]

AGXOSG_EXPORT bool agxOSG::createAxes ( agx::Constraint *  constraint,
osg::Group *  root,
float  scale = 1,
float  width = 3 
)

Create two axes at the constraint attachments.

Parameters
root- if not null, the created MatrixTransform will be added to this node as a child.
scale- Scale of the axes. Default is 1.
width- Line width
Returns
true if axes where successfully created.

References createAxes().

◆ createAxes() [3/7]

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createAxes ( agx::RigidBody *  rb,
agx::AffineMatrix4x4  relativeTransform,
osg::Group *  root,
float  scale = 1,
float  width = 3 
)

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.

Parameters
root- A node in which we will look for a GeometryNode that we can use to follow the rigid body.
scale- Scale of the axes. Default is 1.
width- Line width
Returns
pointer to a MatrixTransform containing the Axes geometry

References createAxes().

◆ createAxes() [4/7]

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createAxes ( agx::RigidBody *  rb,
agx::Frame *  relativeTransform,
osg::Group *  root,
float  scale = 1,
float  width = 3 
)

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. Because we need to find something to follow when the body is moving, we will search in the root for a GeometryNode that is used to render any geometries part of the body. If we does not find any GeometryNodes belonging to this body, it will be stationary in the world.

Parameters
rb- Body for which the Axes will be following.
relativeTransform- A frame transforming the axis relative the model origo for the rigid body.
root- A node in which we will look for a GeometryNode that we can use to follow the rigid body.
scale- Scale of the axes. Default is 1.
width- Line width
Returns
pointer to a MatrixTransform containing the Axes geometry

References createAxes().

◆ createAxes() [5/7]

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createAxes ( agxCollide::Geometry *  geometry,
agx::AffineMatrix4x4  relativeTransform,
osg::Group *  root,
float  scale = 1,
float  width = 3 
)

Creates osg axes relative a geometry given relative transform.

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

Parameters
scale- Length of each axis.
width- Line width
Returns
pointer to a MatrixTransform containing the Axes geometry

References createAxes().

◆ createAxes() [6/7]

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createAxes ( agxCollide::Geometry *  geometry,
agx::Frame *  relativeTransform,
osg::Group *  root,
float  scale = 1,
float  width = 3 
)

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.

Parameters
scale- Length of each axis.
width- Line width
Returns
pointer to a MatrixTransform containing the Axes geometry

References createAxes().

◆ createAxes() [7/7]

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createAxes ( float  scale = 1,
float  width = 3 
)

Create a x, y and z arrow with the size 1.

Axes are colored red, green blue.

Parameters
scale- Length of each axis.
width- Line width
Returns
A matrix transform with the tree orthogonal lines

References createAxes().

Referenced by createAxes().

◆ createCubeLines()

AGXOSG_EXPORT osg::Geode * agxOSG::createCubeLines ( const agx::Vec3 &  position,
const agx::Vec3 &  boxHalfVec3,
const agxRender::Color &  color = agxRender::Color::BlueViolet(),
const agx::Real  lineWidth = 2.0f 
)

This function generates a cube using line segments and returns an osg::Geode node, which can be added to an OSG scenegraph.

Parameters
positionThe center position of the cube as a vector (agx::Vec3).
boxHalfVec3Half the dimensions of the cube along each axis as a vector (agx::Vec3). For example, a cube with side length 2 units would have a boxHalfVec3 of (1.0, 1.0, 1.0).
colorThe color of the lines defining the cube (agxRender::Color).
lineWidthThe width of the lines (agx::Real).
Returns
A pointer to an osg::Geode containing the line representation of the cube.

References createCubeLines().

Referenced by createCubeLines().

◆ createCylinder()

AGXOSG_EXPORT osg::MatrixTransform * agxOSG::createCylinder ( const agx::AffineMatrix4x4 &  transform,
const agx::Vec4 &  color,
float  radius,
float  height 
)

Create and return a new Cylinder to render.

Check return value to see if everything was successful.

Parameters
transform- The transform of the created cylinder
color- An RGBt color array, where x is R, y is G, z is B and w is transparency
radius- The radius of the cylinder
height- The height of the cylinder
Return values
Thecreated node with the sphere. This may be null if the method failed. Remember to add this node to the root scene node.

References createCylinder().

Referenced by createCylinder().

◆ createFrameTrajectoryDrawable()

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) 
)

◆ createGrid() [1/2]

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.

References createGrid().

◆ createGrid() [2/2]

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.

References createGrid().

Referenced by createGrid().

◆ createLine()

AGXOSG_EXPORT osg::Geode * agxOSG::createLine ( const agx::Vec3 &  p1,
const agx::Vec3 &  p2,
const agx::Vec4 &  color,
float  width 
)

Create and return a new Line to render.

Check return value to see if everything was successful.

Parameters
p1,p2- Start, end points in WORLD coordinate system
color- An RGBt color array, where x is R, y is G, z is B and w is transparency
width- This is the number defining the line width in pixels
Return values
Thecreated geode with the line. This may be null if the method failed. Remember to add this geometry to a node.

References createLine().

Referenced by createLine().

◆ createParticleContactGraph()

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.

References createParticleContactGraph().

Referenced by createParticleContactGraph().

◆ createParticleTrajectoriesVisual()

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.

References createParticleTrajectoriesVisual().

Referenced by createParticleTrajectoriesVisual().

◆ createPolyline()

AGXOSG_EXPORT osg::Geode * agxOSG::createPolyline ( const agx::Vec3Vector &  points,
const agx::Vec4 &  color,
float  width 
)

Create and return a new Polyine to render.

Check return value to see if everything was successful.

Parameters
points- A vector of points, in WORLD coordinate system, defining the polyline. Give at least two points
color- An RGBt color array, where x is R, y is G, z is B and w is transparency
width- This is the number defining the line width in pixels
Return values
Thecreated geode with the polyline. This may be null if the method failed. Remember to add this geometry to a node.

References createPolyline().

Referenced by createPolyline().

◆ createRigidBodyTrajectoriesVisual()

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.

References createRigidBodyTrajectoriesVisual().

Referenced by createRigidBodyTrajectoriesVisual().

◆ createSkySphere()

AGXOSG_EXPORT osg::Geode * agxOSG::createSkySphere ( const std::string &  name,
agx::Vector< osg::ref_ptr< osg::Image > > &  images,
float  radius,
float  offset = 0 
)

Create a Sphere with a specified name that will project a cubemap spherically (not as 6 faces) using a shader.

The sphere will always follow the camera.

Parameters
name- Name of the node
images- 6 images each with a 90x90 fov view of the environment. Order: +x, -x, +y, -y, +z. -z
radius- Radius of the sphere
offset- Offset in up/down where 0 mean the camera will be at the center of the sphere. Negative will move the sphere down relative the camera.
Returns
pointer to the created node.

◆ createSphere()

AGXOSG_EXPORT osg::Geode * agxOSG::createSphere ( const agx::Vec3 &  center,
const agx::Vec4 &  color,
float  radius 
)

Create and return a new Sphere to render.

Check return value to see if everything was successful.

Parameters
center- The center, or position, of the sphere
color- An RGBt color array, where x is R, y is G, z is B and w is transparency
radius- The radius of the sphere
Return values
Thecreated geode with the sphere. This may be null if the method failed. Remember to add this geometry to a node.

References createSphere().

Referenced by createSphere().

◆ createText()

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

References createText().

Referenced by createText().

◆ createTexture() [1/2]

AGXOSG_EXPORT osg::Texture2D * agxOSG::createTexture ( const agxCollide::TextureDataRef  data,
bool  linear 
)

References createTexture().

◆ createTexture() [2/2]

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

References createTexture().

Referenced by createTexture().

◆ createTextureCubeMap() [1/2]

AGXOSG_EXPORT osg::TextureCubeMap * agxOSG::createTextureCubeMap ( agx::Vector< osg::ref_ptr< osg::Image > > &  images)

Create a TextureCubeMap from 6 images with a 90x90 fov.

Internal functions for creating texture cube maps.

Parameters
images- 6 images each with a 90x90 fov view of the environment. Order: +x, -x, +y, -y, +z. -z
Returns
pointer to the cubemap

Referenced by loadCubeMapImages().

◆ createTextureCubeMap() [2/2]

AGXOSG_EXPORT osg::TextureCubeMap * agxOSG::createTextureCubeMap ( const std::string &  imagename,
const std::string &  filetype 
)

Creates an returns a CubeMap based on the images.

Parameters
imagename- Prefix name of the 6 textures for the cubemap.Filenames will be <imagename>+_posx.<filetype>, _negx, posy, negy, ...
filetype- Filetype of the images ".dds", ".png"
Returns
pointer to a TextureCubeMap pointer

◆ createTrimesh()

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.

References createTrimesh().

Referenced by createTrimesh().

◆ createVisual() [1/10]

AGXOSG_EXPORT osg::Group * agxOSG::createVisual ( agx::Emitter *  emitter,
osg::Group *  root 
)

References createVisual().

◆ createVisual() [2/10]

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

Create a visual representation of an ObserverFrame (axis)

References createVisual().

◆ createVisual() [3/10]

Given a particle system, create a visual representation.

References createVisual().

◆ createVisual() [4/10]

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.

References createVisual().

◆ createVisual() [5/10]

AGXOSG_EXPORT osg::Group * agxOSG::createVisual ( agx::RigidBodyEmitter *  emitter,
osg::Group *  root 
)

References createVisual().

◆ createVisual() [6/10]

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.

References createVisual().

◆ createVisual() [7/10]

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.

References createVisual().

◆ createVisual() [8/10]

AGXOSG_EXPORT agxOSG::TerrainVoxelRenderer * agxOSG::createVisual ( agxSDK::TerrainInstance *  terrainInstance,
osg::Group *  root 
)

A terrain requires a TerrainVoxelRenderer for rendering and this function will create a TerrainVoxelRenderer and return a pointer to it for modification.

If the terrainInstance is already added to a simulation you need to add this renderer explicitly to the same simulation. If the terrainInstance is not part of a simulation, the renderer will automatically be added to the simulation when the terrain is added.

Reason being, you cannot change some parameters of a TerrainVoxelRenderer if it is already added to a simulation.

Parameters
terrainInstance- A TerrainInstance for which a renderer will be created.
root- The TerrainVoxelRenderer requires a valid root into which it will be added.
Returns
a pointer to a created TerrainVoxelRenderer. If root == nullptr, nullptr will be returned.

References createVisual().

◆ createVisual() [9/10]

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

References createVisual().

Referenced by createVisual().

◆ createVisual() [10/10]

AGXOSG_EXPORT agxOSG::DeformableRenderer * agxOSG::createVisual ( const agxModel::DeformableObject *  deformable,
osg::Group *  root,
const agxRender::Color &  color = agxRender::Color::DarkOliveGreen(),
bool  colorSurfaceStress = false,
const agxRender::Color &  maxStressColor = agxRender::Color::Red(),
agx::Real  maxStressLimit = 6.0E4 
)

Create deformable renderer given deformable object, root node and color.

It's possible to change color, settings etc. on the returned matrix node. It's also possible use, e.g., setDiffuseColor(createVisual(deformable, root), agxRender::Color::Blue()) but that will override the color set by DeformableRenderer.

Parameters
deformable- deformable to visualize
root- root node
color- color of the surface of the deformable
colorSurfaceStress- true to color surface stress with maxStressColor at maxStressLimit
maxStressColor- color of the stress
maxStressLimit- limit when maxStressColor is used
Returns
renderer (osg::MatrixTransform) of the deformable

References createVisual().

◆ createVisualTemplateCaching()

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

References createVisualTemplateCaching().

Referenced by createVisualTemplateCaching().

◆ createVisualUpdater()

AGXOSG_EXPORT agxSDK::EventListener * agxOSG::createVisualUpdater ( agxSDK::EventListener *  listener,
osg::Group *  root 
)

Given some specific classes inheriting from EventListener, this function can handle custom visual representations and effects.

Parameters
listener- an EventListener which hold some information about how to update visuals
root- a pointer to the osg::Group root node where the visuals to update are expected to be
Returns
- a new listener which will update the visual, null on fail.

References createVisualUpdater().

Referenced by createVisualUpdater().

◆ createVisualWithGeometryConnection()

AGXOSG_EXPORT std::tuple< osg::Group *, std::vector< size_t > > agxOSG::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.

Returns
- a tuple with the group and a vector. The group contains children with visual nodes of the geometries in the rb. The vector has indices connecting the visal nodes (as children in the group) with the geometries in the rb->getGeometries() vector.

References createVisualWithGeometryConnection().

Referenced by createVisualWithGeometryConnection().

◆ findDeformableRenderer()

AGXOSG_EXPORT agxOSG::DeformableRenderer * agxOSG::findDeformableRenderer ( const agxModel::DeformableObject *  deformable,
osg::Group *  root 
)

Searches for renderer of deformable in root.

Parameters
deformable- deformable with renderer
root- any group that may contain the renderer
Returns
deformable renderer of deformable if found, otherwise nullptr

References findDeformableRenderer().

Referenced by findDeformableRenderer().

◆ findFrameTrajectoryDrawable()

AGXOSG_EXPORT agxOSG::FrameTrajectoryDrawable * agxOSG::findFrameTrajectoryDrawable ( osg::Group *  root)

◆ findGeometryNode()

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

References findGeometryNode().

Referenced by findGeometryNode().

◆ findGeometryNodes()

AGXOSG_EXPORT agx::Vector< GeometryNode * > agxOSG::findGeometryNodes ( const agxCollide::Geometry *  geometry,
osg::Group *  rootNode 
)

Finds the geometry nodes associated to a geometry, if multiple are present in the specified root graph.

Returns
the vector of geometry nodes found

References findGeometryNodes().

Referenced by findGeometryNodes().

◆ findParticleSystemDrawable()

AGXOSG_EXPORT agxOSG::ParticleSystemDrawable * agxOSG::findParticleSystemDrawable ( osg::Group *  root)

◆ findRigidBodySystemDrawable()

AGXOSG_EXPORT agxOSG::RigidBodySystemDrawable * agxOSG::findRigidBodySystemDrawable ( osg::Group *  root)

◆ findText()

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

References findText().

Referenced by findText().

◆ forceWireFrameModeOn()

AGXOSG_EXPORT bool agxOSG::forceWireFrameModeOn ( osg::Node *  node)

References forceWireFrameModeOn().

Referenced by forceWireFrameModeOn().

◆ GeometryNode_reference()

AGXOSG_EXPORT void agxOSG::GeometryNode_reference ( agxOSG::GeometryNode *  node)

◆ GeometryNode_unreference()

AGXOSG_EXPORT void agxOSG::GeometryNode_unreference ( agxOSG::GeometryNode *  node)

◆ getEnableOutline()

AGXOSG_EXPORT bool agxOSG::getEnableOutline ( osg::Node *  node)

References getEnableOutline().

Referenced by getEnableOutline().

◆ getHoveredGeometryContact()

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))

References getHoveredGeometryContact().

Referenced by getHoveredGeometryContact().

◆ getNearFarPoints()

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

References getNearFarPoints().

Referenced by getNearFarPoints().

◆ loadCubeMapImages()

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.

References createTextureCubeMap(), and loadCubeMapImages().

Referenced by loadCubeMapImages().

◆ makeRasterFont()

unsigned int AGXOSG_EXPORT agxOSG::makeRasterFont ( void  )

◆ matrix4x4ExactlyEqual()

template<typename M1 , typename M2 >
bool agxOSG::matrix4x4ExactlyEqual ( const M1 &  m1,
const M2 &  m2 
)
Returns
true if the matrices are identical in values

Definition at line 42 of file TransparencyUtils.h.

◆ readFile()

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,
agxOSG::RigidBodyRenderCache *  cache = nullptr 
)

Utility function for reading various files:

  • .agx/.aagx (serialization of simulations)

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.

◆ readNodeFile() [1/2]

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.

References readNodeFile().

Referenced by readNodeFile().

◆ readNodeFile() [2/2]

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.

References readNodeFile().

◆ removeText()

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

References removeText().

Referenced by removeText().

◆ renderText()

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().

◆ setAlpha()

AGXOSG_EXPORT void agxOSG::setAlpha ( osg::Node *  node,
float  alpha,
bool  override = false 
)

Set the alpha part of the material for a node.

0 completely transparent, 1 - opaque

Parameters
node- Node to set Alpha value on
alpha- New alpha value
override- If true it will override values down in the scenegraph

References setAlpha().

Referenced by setAlpha().

◆ setAmbientColor()

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

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.

Parameters
node- The node to set ambient color to
color- New ambient color
override- If true it will override values down in the scenegraph

References setAmbientColor().

Referenced by setAmbientColor().

◆ setCubeMapTexture()

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

References setCubeMapTexture().

Referenced by setCubeMapTexture().

◆ setDiffuseColor() [1/3]

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.

References setDiffuseColor().

◆ setDiffuseColor() [2/3]

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 scenegraph), this call will be ignored.

References setDiffuseColor().

◆ setDiffuseColor() [3/3]

AGXOSG_EXPORT void agxOSG::setDiffuseColor ( osg::Node *  node,
const agx::Vec4f &  color,
bool  override = false 
)

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.

Parameters
node- The node for which diffuse color will be set.
color- New diffuse color.
override- If true it will override values down in the scenegraph

References setDiffuseColor().

Referenced by setDiffuseColor().

◆ setEnableLight()

AGXOSG_EXPORT void agxOSG::setEnableLight ( bool  enable,
int  lightNum,
osg::Node *  node 
)

References setEnableLight().

Referenced by setEnableLight().

◆ setEnableOutline()

AGXOSG_EXPORT bool agxOSG::setEnableOutline ( osg::Node *  node,
bool  enabled,
const agxRender::Color &  color = agxRender::Color(1, 1, 0, 1),
float  width = 2.0 
)

References setEnableOutline().

Referenced by setEnableOutline().

◆ setEnableWireFrameMode()

AGXOSG_EXPORT bool agxOSG::setEnableWireFrameMode ( osg::Node *  node,
bool  flag 
)

◆ setEnvMapReflectionCoefficient()

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

References setEnvMapReflectionCoefficient().

Referenced by setEnvMapReflectionCoefficient().

◆ setGamma()

AGXOSG_EXPORT void agxOSG::setGamma ( osg::Node *  node,
float  gamma,
bool  override = false 
)

Set the gamma that will be used to transform Physical color to monitor color.

Ideally you only set this once (for the root) and not as part of individual nodes.

Note
Only works with the shader based pipeline.
Parameters
node- The node where we should set gamma
gamma- New value for gamma
override- If true it will override values down in the scenegraph

References setGamma().

Referenced by setGamma().

◆ setMetallic()

AGXOSG_EXPORT void agxOSG::setMetallic ( osg::Node *  node,
float  metallic,
bool  override = false 
)

Set the metallic:ness of the material.

Note
Only works with the shader pipeline
Parameters
node- The node for which we should update the metallic value
metallic- New value for metallic. [0..1], where 0: Non metallic, 1: Metallic.
override- If true it will override values down in the scenegraph

References setMetallic().

Referenced by setMetallic().

◆ setOrbitCamera()

AGXOSG_EXPORT bool agxOSG::setOrbitCamera ( osgViewer::Viewer *  viewer,
osg::Group *  node,
const agx::Vec3 &  eye,
const agx::Vec3 &  center,
const agx::Vec3 &  up,
int  trackerMode = osgGA::NodeTrackerManipulator::NODE_CENTER 
)

References setOrbitCamera().

Referenced by setOrbitCamera().

◆ setRoughness()

AGXOSG_EXPORT void agxOSG::setRoughness ( osg::Node *  node,
float  roughness,
bool  override = false 
)

Set the roughness of the material.

Parameters
node- The node where we should set roughness
roughness- New value for roughness
override- If true it will override values down in the scenegraph

References setRoughness().

Referenced by setRoughness().

◆ setShininess()

AGXOSG_EXPORT void agxOSG::setShininess ( osg::Node *  node,
float  shininess,
bool  override = false 
)

Set the shininess exponent for the Phong specular model.

Parameters
node- The node where we should set shininess
shininess- New value for shininess
override- If true it will override values down in the scenegraph

References setShininess().

Referenced by setShininess().

◆ setSpecularColor()

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

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.

Parameters
node- The node for which the specular color will be applied
color- Specular color
override- If true it will override values down in the scenegraph

References setSpecularColor().

Referenced by setSpecularColor().

◆ setTexture() [1/7]

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.

References setTexture().

◆ setTexture() [2/7]

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.

References setTexture().

◆ setTexture() [3/7]

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.

References setTexture().

Referenced by setTexture().

◆ setTexture() [4/7]

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.

References setTexture().

◆ setTexture() [5/7]

AGXOSG_EXPORT bool agxOSG::setTexture ( osg::Node *  node,
const agxCollide::TextureDataRef  data,
bool  repeat = false,
TextureMode  mode = DIFFUSE_TEXTURE,
float  scaleU = 1.0f,
float  scaleV = 1.0f 
)

References setTexture().

◆ setTexture() [6/7]

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.

References setTexture().

◆ setTexture() [7/7]

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.

References setTexture().

◆ setUniform()

template<typename T >
void agxOSG::setUniform ( osg::Node *  node,
const std::string &  name,
T  value 
)

Definition at line 244 of file utils.h.

References setUniform().

Referenced by setUniform().

◆ setupTerrainJournalPlaybackSettings()

AGXOSG_EXPORT void agxOSG::setupTerrainJournalPlaybackSettings ( agxSDK::Simulation *  simulation)

Setup journal playback settings for each TerrainVoxelRenderer in the specified simulation.

◆ smoothNormals()

AGXOSG_EXPORT size_t agxOSG::smoothNormals ( osg::Node *  node,
float  creaseAngle = 1.48353f 
)

Smoothes the normals of all meshes in osg::Geometries using agxUtil::SmoothingVisitor found under the specified node and child nodes.

Parameters
node- the specified node
creaseAngle- the crease angle to use with the SmoothingVisitor
Returns
the number of osg::Geometries smoothed.

References smoothNormals().

Referenced by smoothNormals().

◆ Text_reference()

AGXOSG_EXPORT void agxOSG::Text_reference ( agxOSG::Text *  node)

◆ Text_unreference()

AGXOSG_EXPORT void agxOSG::Text_unreference ( agxOSG::Text *  node)

◆ toggleWireFrameMode()

AGXOSG_EXPORT bool agxOSG::toggleWireFrameMode ( osg::Node *  node)

References toggleWireFrameMode().

Referenced by toggleWireFrameMode().

◆ Transform_reference()

AGXOSG_EXPORT void agxOSG::Transform_reference ( agxOSG::Transform *  node)

◆ Transform_unreference()

AGXOSG_EXPORT void agxOSG::Transform_unreference ( agxOSG::Transform *  node)

Variable Documentation

◆ defaultFontName

const char* agxOSG::defaultFontName
extern