|
AGX Dynamics
2.37.2.0
|
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...
#include <RenderProxy.h>
Inheritance diagram for agxOSG::RenderProxyFactory:Classes | |
| struct | ShapeData |
| Class for storing OSG specific data for each RenderProxy. More... | |
Public Member Functions | |
| RenderProxyFactory () | |
| 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 should go into wireframe and or solid parent. More... | |
| void | addChild (osg::Node *node, agxRender::RenderProxy *proxy) |
| agxRender::BoxProxy * | createBox (const agx::Vec3 &halfExtents) override |
| agxRender::CapsuleProxy * | createCapsule (float radius, float height) override |
| agxRender::ConeProxy * | createCone (float radius, float height) override |
| agxRender::ContactsProxy * | createContacts (const agxCollide::GeometryContactPtrVector &contacts) override |
| agxRender::CylinderProxy * | createCylinder (float radius, float height) override |
| agxRender::HeightFieldProxy * | createHeightfield (agxCollide::HeightField *hf) override |
| Create and return a RenderProxy for a Heightfield. More... | |
| agxRender::HollowCylinderProxy * | createHollowCylinder (float radius, float height, float thickness) override |
| agxRender::HollowTruncatedConeProxy * | createHollowTruncatedCone (float topRadius, float bottomRadius, float height, float thickness) override |
| agxRender::LineProxy * | createLine (const agx::Vec3 &p1, const agx::Vec3 &p2) override |
| agxRender::PlaneProxy * | createPlane (const agx::Vec3 &normal, agx::Real distance) override |
| agxRender::RigidBodyBatchRenderProxy * | createRigidBodies (const agx::RigidBodyPtrSetVector *enabledBodies) override |
| Interface for creating and returning batch rendering of rigid bodies (cm). More... | |
| agxRender::SphereProxy * | createSphere (float radius) override |
| 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::TextProxy * | createText (const agx::String &text, const agx::Vec3 &pos) override |
| agxRender::TrimeshProxy * | createTrimesh (agxCollide::Trimesh *mesh) override |
| Create and return a RenderProxy for a Trimesh. More... | |
| agxRender::TruncatedConeProxy * | createTruncatedCone (float topRadius, float bottomRadius, float height) override |
| agxRender::WireRenderProxy * | createWire (float radius, const agx::Vec3 &color) override |
| agxRender::WireShapeProxy * | createWireShape (float radius, float height, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1) override |
| const agx::AffineMatrix4x4 & | getGlobalTransform () const |
| agxRender::Graph::GraphRenderer * | getGraphRenderer () override |
| osg::Node * | getRootNode () |
| osg::Group * | getSolidRootNode () |
| osg::Group * | getTextNode () |
| The text node is not child of the node returned in getRootNode(), hence this node MUST be added separately. More... | |
| osg::Group * | getWireframeRootNode () |
| void | setGlobalTransform (const agx::AffineMatrix4x4 &m) |
| Set a transformation which will be applied to all transformations for RenderProxy's. More... | |
| void | setRenderMode (agxRender::RenderProxy *proxy, osg::Node *node, agxRender::RenderProxy::RenderMode mode) |
| Set the RenderMode for a specified node. More... | |
| void | setSphereBatchRenderModeSprites (bool flag) |
Public Member Functions inherited from agxRender::RenderProxyFactory | |
| RenderProxyFactory () | |
| SphereProxy * | create (float radius) |
| Create a SphereProxy without arguments. More... | |
| BoxProxy * | create (const agx::Vec3 &halfExtents) |
| Create a BoxProxy without arguments. More... | |
| LineProxy * | create (const LineProxy *) |
| Create a LineProxy without arguments. More... | |
| CylinderProxy * | create (const CylinderProxy *) |
| Create a CylinderProxy without arguments. More... | |
| HollowCylinderProxy * | create (const HollowCylinderProxy *) |
| Create a CylinderProxy without arguments. More... | |
| ConeProxy * | create (const ConeProxy *) |
| Create a ConeProxy without arguments. More... | |
| TruncatedConeProxy * | create (const TruncatedConeProxy *) |
| Create a TruncatedConeProxy without arguments. More... | |
| HollowTruncatedConeProxy * | create (const HollowTruncatedConeProxy *) |
| Create a HollowTruncatedConeProxy without arguments. More... | |
| CapsuleProxy * | create (const CapsuleProxy *) |
| Create a CapsuleProxy without arguments. More... | |
| TextProxy * | create (const TextProxy *) |
| Create a TextProxy without arguments. More... | |
| PlaneProxy * | create (const PlaneProxy *) |
| Create a PlaneProxy without arguments. More... | |
| ContactsProxy * | create (const agxCollide::GeometryContactPtrVector &contacts) |
| Create a ContactsProxy without arguments. More... | |
| RigidBodyBatchRenderProxy * | create (const agx::RigidBodyPtrSetVector *enabledBodies) |
| Create a rigid body batch render proxy. More... | |
| RenderProxy::RenderMode | getDefaultRenderMode () const |
| bool | getEnable () const |
| void | setDefaultRenderMode (RenderProxy::RenderMode mode) |
| Set the default RenderMode that will be used when a new RenderProxy is created. More... | |
| void | setEnable (bool flag) |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
Static Public Member Functions | |
| static float | getDefaultDetailRatio () |
| static void | setDefaultDetailRatio (float detailRatio) |
| Assign new default detail ratio for the rendered geometries. More... | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~RenderProxyFactory () |
| Destructor. More... | |
Protected Member Functions inherited from agxRender::RenderProxyFactory | |
| void | setRenderManager (RenderManager *mgr) |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Attributes | |
| agx::ref_ptr< agxOSG::GraphRenderer > | m_graphRenderer |
| agx::AffineMatrix4x4 | m_invTransform |
| osg::ref_ptr< osg::MatrixTransform > | m_parent |
| osg::ref_ptr< osg::Group > | m_solidParent |
| bool | m_sphereBatchRenderModeSprites |
| osg::ref_ptr< osg::Group > | m_textParent |
| osg::ref_ptr< osg::Group > | m_wireframeParent |
Protected Attributes inherited from agxRender::RenderProxyFactory | |
| RenderProxy::RenderMode | m_defaultRenderMode |
| bool | m_enabled |
| RenderManager * | m_mgr |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Additional Inherited Members | |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
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.
There are several node-roots:
Definition at line 74 of file agxOSG/RenderProxy.h.
| agxOSG::RenderProxyFactory::RenderProxyFactory | ( | ) |
|
protectedvirtual |
Destructor.
Reimplemented from agxRender::RenderProxyFactory.
| void agxOSG::RenderProxyFactory::addChild | ( | osg::Node * | node, |
| agxRender::RenderProxy::RenderMode | mode | ||
| ) |
Add a child to the root, default getDefaultRenderMode() will be used for determining if the node should go into wireframe and or solid parent.
| void agxOSG::RenderProxyFactory::addChild | ( | osg::Node * | node, |
| agxRender::RenderProxy * | proxy | ||
| ) |
|
overridevirtual |
| halfExtents | - The size of the box |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| radius | - The radius of a capsule |
| height | - The height of a capsule |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| radius | - The radius of the cone |
| height | - The height of the cone |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| contacts | - Vector with all contacts that should be visualized |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| radius | - The radius of a cylinder |
| height | - The height of a cylinder |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
Create and return a RenderProxy for a Heightfield.
| hf | - The heightfield for which a HeightfieldProxy will be created. |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| radius | - The radius for the a cylinder |
| height | - The height for the cylinder |
| thickness | - The thickness for the cylinder |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| topRadius | - The top radius of the cone |
| bottomRadius | - The bottom radius of the cone |
| height | - The height of the cone |
| thickness | - The thickness of the cone |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| p1,p2 | - Start, end points in WORLD coordinate system |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| normal | - The normal of a plane |
| distance | - The scalar part of the plane |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
Interface for creating and returning batch rendering of rigid bodies (cm).
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| radius | - The radius of the new sphere |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| text | - The text |
| pos | - Position of the text. Currently only x,y is used. |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
Create and return a RenderProxy for a Trimesh.
| mesh | - The mesh shape for which a TrimeshProxy will be created. |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| topRadius | - The top radius of the cone |
| bottomRadius | - The bottom radius of the cone |
| height | - The height of the cone |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
Implements agxRender::RenderProxyFactory.
|
overridevirtual |
| radius | - The radius of a capsule |
| height | - The height of a capsule |
| previousEndPoint0 | - The previous lower end point of the WireShape. |
| previousEndPoint1 | - The previous upper end point of the WireShape. |
Implements agxRender::RenderProxyFactory.
|
static |
|
inline |
Definition at line 248 of file agxOSG/RenderProxy.h.
|
overridevirtual |
Implements agxRender::RenderProxyFactory.
|
inline |
Definition at line 224 of file agxOSG/RenderProxy.h.
|
inline |
Definition at line 229 of file agxOSG/RenderProxy.h.
|
inline |
The text node is not child of the node returned in getRootNode(), hence this node MUST be added separately.
Definition at line 218 of file agxOSG/RenderProxy.h.
|
inline |
Definition at line 234 of file agxOSG/RenderProxy.h.
|
static |
Assign new default detail ratio for the rendered geometries.
| void agxOSG::RenderProxyFactory::setGlobalTransform | ( | const agx::AffineMatrix4x4 & | m | ) |
Set a transformation which will be applied to all transformations for RenderProxy's.
This can be used to transform all objects to the center of the earth instead of trying to render on the surface of the earth (6000km). This transform is by default I. If you for example do m.setTranslate(-10,0,0) all RenderProxy's will be rendered translated -10 units in X. If a RenderManager is present, RenderManager::update() will be called
| void agxOSG::RenderProxyFactory::setRenderMode | ( | agxRender::RenderProxy * | proxy, |
| osg::Node * | node, | ||
| agxRender::RenderProxy::RenderMode | mode | ||
| ) |
Set the RenderMode for a specified node.
| void agxOSG::RenderProxyFactory::setSphereBatchRenderModeSprites | ( | bool | flag | ) |
|
protected |
Definition at line 290 of file agxOSG/RenderProxy.h.
|
protected |
Definition at line 291 of file agxOSG/RenderProxy.h.
|
protected |
Definition at line 288 of file agxOSG/RenderProxy.h.
|
protected |
Definition at line 286 of file agxOSG/RenderProxy.h.
|
protected |
Definition at line 292 of file agxOSG/RenderProxy.h.
|
protected |
Definition at line 289 of file agxOSG/RenderProxy.h.
|
protected |
Definition at line 287 of file agxOSG/RenderProxy.h.