26#include <osg/MatrixTransform>
27#include <osg/Material>
28#include <osg/AutoTransform>
30#include <osg/ShapeDrawable>
31#include <osgText/Text>
41# pragma warning( disable : 4355 )
304 static osg::Geode*
createGeode(osg::Shape* shape, osg::ShapeDrawable** shapeDrawable =
nullptr,
float detailRatio = RenderProxyFactory::getDefaultDetailRatio());
#define AGX_DECLARE_POINTER_TYPES(type)
A box shape for geometric intersection tests.
Implements a Capsule shape for geometric intersection tests.
A right circular cone shape for geometric intersection tests.
A cylinder shape for geometric intersection tests.
A HeightField is a collision shape that can be created from a grid structure, like an image.
A right circular hollow cone shape for geometric intersection tests.
A hollow cylinder shape for geometric intersection tests.
A line shape for intersection tests, mostly for depth sensing and picking.
A sphere class for geometric intersection tests.
Triangle mesh for geometric intersection tests.
Abstract representation of a data buffer.
Abstract representation of a value.
Implementation of the abstract class from the agxRender namespace, this class is responsible for crea...
osg::Group * getTextNode()
The text node is not child of the node returned in getRootNode(), hence this node MUST be added separ...
static float getDefaultDetailRatio()
osg::ref_ptr< osg::Group > m_parent
agxRender::ContactsProxy * createContacts(const agxCollide::GeometryContactPtrVector &contacts) override
osg::Group * getSolidRootNode()
agxRender::RigidBodyBatchRenderProxy * createRigidBodies(const agx::RigidBodyPtrSetVector *enabledBodies) override
Interface for creating and returning batch rendering of rigid bodies (cm).
agxRender::HollowConeProxy * createHollowCone(agxCollide::HollowCone *shape) override
agxRender::HollowCylinderProxy * createHollowCylinder(float outerRadius, float height, float thickness) override
agxRender::WireShapeProxy * createWireShape(float radius, float height, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1) override
agxRender::CylinderProxy * createCylinder(agxCollide::Cylinder *shape) override
void setRenderMode(agxRender::RenderProxy *proxy, osg::Node *node, agxRender::RenderProxy::RenderMode mode)
Set the RenderMode for a specified node.
agxRender::LineProxy * createLine(agxCollide::Line *shape) override
void addChild(osg::Node *node, agxRender::RenderProxy::RenderMode mode)
Add a child to the root, default getDefaultRenderMode() will be used for determining if the node shou...
agxRender::TextProxy * createText(const agx::String &text, const agx::Vec3 &pos, float size=1) override
bool m_sphereBatchRenderModeSprites
agxRender::CapsuleProxy * createCapsule(float radius, float height) override
osg::Group * getWireframeRootNode()
agxRender::LineProxy * createLine(const agx::Vec3 &p1, const agx::Vec3 &p2) override
agxRender::Graph::GraphRenderer * getGraphRenderer() override
agxRender::PlaneProxy * createPlane(agxCollide::Plane *shape) override
void setGlobalTransform(const agx::AffineMatrix4x4 &m) override
Set a transformation which will be applied to all transformations for RenderProxy's.
agxRender::RenderProxy * createSphereBatchRenderer(agxData::Buffer *positions, agxData::Buffer *rotations, agxData::Buffer *radii, agxData::Buffer *colors, agxData::Buffer *enableRendering, agxData::Value *bound, agx::Component *context) override
agxRender::SphereProxy * createSphere(float radius) override
agxRender::HollowCylinderProxy * createHollowCylinder(agxCollide::HollowCylinder *shape) override
const agx::AffineMatrix4x4 & getGlobalTransform() const
agxRender::TruncatedConeProxy * createCone(agxCollide::Cone *shape) override
agxRender::HollowConeProxy * createHollowCone(float topRadius, float bottomRadius, float height, float thickness) override
agxRender::PlaneProxy * createPlane(const agx::Vec3 &normal, agx::Real distance) override
osg::ref_ptr< osg::Group > m_solidParent
agxRender::TruncatedConeProxy * createTruncatedCone(float topRadius, float bottomRadius, float height) override
agxRender::CylinderProxy * createCylinder(float radius, float height) override
virtual ~RenderProxyFactory()
Destructor.
static float getCurrentDetailRatio()
agxRender::HeightFieldProxy * createHeightfield(agxCollide::HeightField *shape) override
Create and return a RenderProxy for a Heightfield.
agx::ref_ptr< agxOSG::GraphRenderer > m_graphRenderer
static osg::Geode * createGeode(osg::Shape *shape, osg::ShapeDrawable **shapeDrawable=nullptr, float detailRatio=RenderProxyFactory::getDefaultDetailRatio())
agxRender::TrimeshProxy * createTrimesh(agxCollide::Trimesh *shape) override
Create and return a RenderProxy for a Trimesh.
agxRender::BoxProxy * createBox(const agx::Vec3 &halfExtents) override
void setSphereBatchRenderModeSprites(bool flag)
static void setCurrentDetailRatio(float detailRatio)
Set new detail ratio for the rendered geometries.
agxRender::BoxProxy * createBox(agxCollide::Box *shape) override
agxRender::CapsuleProxy * createCapsule(agxCollide::Capsule *shape) override
osg::ref_ptr< osg::Group > m_textParent
agxRender::SphereProxy * createSphere(agxCollide::Sphere *shape) override
osg::Node * getRootNode()
agxRender::WireRenderProxy * createWire(float radius, const agx::Vec3 &color) override
void addChild(osg::Node *node, agxRender::RenderProxy *proxy)
osg::ref_ptr< osg::Group > m_wireframeParent
agxRender::ConeProxy * createCone(float radius, float height) override
agx::AffineMatrix4x4 m_invTransform
Subclass that implements a BoxProxy.
Subclass that implements a CapsuleProxy.
Subclass that implements a ConeProxy.
Subclass that implements a CylinderProxy.
Abstract base class that acts as an interface and can render the data from a Graph.
Subclass that implements a HeightfieldProxy.
Subclass that implements a HollowConeProxy.
Subclass that implements a CylinderProxy.
Subclass that implements a LineProxy.
Subclass that implements a PlaneProxy.
Abstract class which is responsible for returning a pointer to a specified RenderProxy type.
Abstract base class which encapsulated information for rendering a specific shape.
Class holding rigid bodies that makes it possible to batch render these objects.
Subclass that implements a SphereProxy.
Subclass that implements a TextProxy.
Subclass that implements a TrimeshProxy.
Subclass that implements a TruncatedConeProxy.
Subclass that implements a WireShapeProxy.
A component is an object containing other objects, enabling hierarchical structuring.
Smart pointer for handling referenced counted objects.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
Class for storing OSG specific data for each RenderProxy.
osg::ref_ptr< osg::Geode > geode
ShapeData(const ShapeData &other)
osg::ref_ptr< osg::StateSet > stateSet