AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agxRender::RenderProxyFactory Class Referenceabstract

Abstract class which is responsible for returning a pointer to a specified RenderProxy type. More...

#include <RenderProxyFactory.h>

+ Inheritance diagram for agxRender::RenderProxyFactory:

Public Member Functions

 RenderProxyFactory ()
 
agxRender::RigidBodyBatchRenderProxy * create (const agx::RigidBodyPtrSetVector *enabledBodies)
 Create a rigid body batch render proxy.
 
BoxProxy * create (const agx::Vec3 &halfExtents)
 Create a BoxProxy without arguments.
 
agxRender::ContactsProxy * create (const agxCollide::GeometryContactPtrVector &contacts)
 Create a ContactsProxy without arguments.
 
CapsuleProxy * create (const CapsuleProxy *)
 Create a CapsuleProxy without arguments.
 
ConeProxy * create (const ConeProxy *)
 Create a ConeProxy without arguments.
 
CylinderProxy * create (const CylinderProxy *)
 Create a CylinderProxy without arguments.
 
HollowConeProxy * create (const HollowConeProxy *)
 Create a HollowConeProxy without arguments.
 
HollowCylinderProxy * create (const HollowCylinderProxy *)
 Create a CylinderProxy without arguments.
 
LineProxy * create (const LineProxy *)
 Create a LineProxy without arguments.
 
PlaneProxy * create (const PlaneProxy *)
 Create a PlaneProxy without arguments.
 
TextProxy * create (const TextProxy *)
 Create a TextProxy without arguments.
 
TruncatedConeProxy * create (const TruncatedConeProxy *)
 Create a TruncatedConeProxy without arguments.
 
SphereProxy * create (float radius)
 Create a SphereProxy without arguments.
 
virtual BoxProxy * createBox (agxCollide::Box *shape)=0
 Interface for creating and returning a BoxProxy.
 
virtual BoxProxy * createBox (const agx::Vec3 &halfExtents)=0
 Interface for creating and returning a BoxProxy.
 
virtual CapsuleProxy * createCapsule (agxCollide::Capsule *shape)=0
 Interface for creating and returning a CapsuleProxy.
 
virtual CapsuleProxy * createCapsule (float radius, float height)=0
 Interface for creating and returning a CapsuleProxy.
 
virtual TruncatedConeProxy * createCone (agxCollide::Cone *shape)=0
 Interface for creating and returning a ConeProxy.
 
virtual ConeProxy * createCone (float radius, float height)=0
 Interface for creating and returning a ConeProxy.
 
virtual agxRender::ContactsProxy * createContacts (const agxCollide::GeometryContactPtrVector &)=0
 Interface for creating and returning ContactsProxy.
 
virtual CylinderProxy * createCylinder (agxCollide::Cylinder *shape)=0
 Interface for creating and returning a CylinderProxy.
 
virtual CylinderProxy * createCylinder (float radius, float height)=0
 Interface for creating and returning a CylinderProxy.
 
virtual HeightFieldProxy * createHeightfield (agxCollide::HeightField *shape)=0
 Interface for creating and returning HeightfieldProxy.
 
virtual HollowConeProxy * createHollowCone (agxCollide::HollowCone *shape)=0
 Interface for creating and returning a HollowCone.
 
virtual HollowConeProxy * createHollowCone (float topRadius, float bottomRadius, float height, float thickness)=0
 Interface for creating and returning a HollowConeProxy.
 
virtual HollowCylinderProxy * createHollowCylinder (agxCollide::HollowCylinder *shape)=0
 Interface for creating and returning a HollowCylinderProxy.
 
virtual HollowCylinderProxy * createHollowCylinder (float outerRadius, float height, float thickness)=0
 Interface for creating and returning a HollowCylinderProxy.
 
virtual LineProxy * createLine (agxCollide::Line *shape)=0
 Interface for creating and returning a LineProxy.
 
virtual LineProxy * createLine (const agx::Vec3 &p1, const agx::Vec3 &p2)=0
 Interface for creating and returning a LineProxy.
 
virtual PlaneProxy * createPlane (agxCollide::Plane *shape)=0
 Interface for creating and returning PlaneProxy.
 
virtual PlaneProxy * createPlane (const agx::Vec3 &normal, agx::Real distance)=0
 Interface for creating and returning PlaneProxy.
 
virtual agxRender::RigidBodyBatchRenderProxy * createRigidBodies (const agx::RigidBodyPtrSetVector *)=0
 Interface for creating and returning batch rendering of rigid bodies (cm).
 
virtual SphereProxy * createSphere (agxCollide::Sphere *shape)=0
 Interface for creating and returning a SphereProxy.
 
virtual SphereProxy * createSphere (float radius)=0
 Interface for creating and returning a SphereProxy.
 
virtual RenderProxy * createSphereBatchRenderer (agxData::Buffer *positions, agxData::Buffer *rotations, agxData::Buffer *radii, agxData::Buffer *colors, agxData::Buffer *enableRendering, agxData::Value *bound, agx::Component *context)=0
 
virtual TextProxy * createText (const agx::String &text, const agx::Vec3 &pos, float size=1)=0
 Interface for creating and returning TextProxy.
 
virtual agxRender::TrimeshProxy * createTrimesh (agxCollide::Trimesh *mesh)=0
 Interface for creating and returning TrimeshProxy.
 
virtual TruncatedConeProxy * createTruncatedCone (float topRadius, float bottomRadius, float height)=0
 Interface for creating and returning a TruncatedConeProxy.
 
virtual agxRender::WireRenderProxy * createWire (float radius, const agx::Vec3 &color)=0
 
virtual agxRender::WireShapeProxy * createWireShape (float radius, float height, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1)=0
 Interface for creating and returning a WireShapeProxy.
 
RenderProxy::RenderMode getDefaultRenderMode () const
 
bool getEnable () const
 
virtual Graph::GraphRenderer * getGraphRenderer ()=0
 This method should create and return an implementation of a GraphRenderer, a class that can render the statistics graphs as described in the class Graph::GraphRenderer.
 
void setDefaultRenderMode (RenderProxy::RenderMode mode)
 Set the default RenderMode that will be used when a new RenderProxy is created.
 
void setEnable (bool flag)
 
virtual void setGlobalTransform (const agx::AffineMatrix4x4 &)
 Set a transformation which could be applied to all transformations for RenderProxy's.
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor.
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting.
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match.
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test.
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object.
 
void reference (void *ptr=nullptr) const
 Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
void unreference (void *ptr=nullptr) const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 
void unreference_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it.
 

Protected Member Functions

virtual ~RenderProxyFactory ()
 
virtual void setRenderManager (RenderManager *mgr)
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor.
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

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 Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- 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.
 

Detailed Description

Abstract class which is responsible for returning a pointer to a specified RenderProxy type.

This class is to be implemented by the user, depending on the rendering system. The implementation of this factory might have some own cache of Proxies, or not.

This class is also responsible for creating a class derived from agxRender::Graph::GraphRenderer.

Definition at line 53 of file agxRender/RenderProxyFactory.h.

Constructor & Destructor Documentation

◆ RenderProxyFactory()

agxRender::RenderProxyFactory::RenderProxyFactory ( )

◆ ~RenderProxyFactory()

virtual agxRender::RenderProxyFactory::~RenderProxyFactory ( )
protectedvirtual

Reimplemented in agxOSG::RenderProxyFactory.

Member Function Documentation

◆ create() [1/13]

RigidBodyBatchRenderProxy * agxRender::RenderProxyFactory::create ( const agx::RigidBodyPtrSetVector *  enabledBodies)
inline

Create a rigid body batch render proxy.

Definition at line 761 of file RenderManager.h.

References createRigidBodies().

◆ create() [2/13]

BoxProxy * agxRender::RenderProxyFactory::create ( const agx::Vec3 &  halfExtents)
inline

Create a BoxProxy without arguments.

Definition at line 703 of file RenderManager.h.

References createBox().

◆ create() [3/13]

ContactsProxy * agxRender::RenderProxyFactory::create ( const agxCollide::GeometryContactPtrVector &  contacts)
inline

Create a ContactsProxy without arguments.

Definition at line 756 of file RenderManager.h.

References createContacts().

◆ create() [4/13]

CapsuleProxy * agxRender::RenderProxyFactory::create ( const CapsuleProxy *  )
inline

Create a CapsuleProxy without arguments.

Definition at line 740 of file RenderManager.h.

References createCapsule().

◆ create() [5/13]

ConeProxy * agxRender::RenderProxyFactory::create ( const ConeProxy *  )
inline

Create a ConeProxy without arguments.

Definition at line 724 of file RenderManager.h.

References createCone().

◆ create() [6/13]

CylinderProxy * agxRender::RenderProxyFactory::create ( const CylinderProxy *  )
inline

Create a CylinderProxy without arguments.

Definition at line 713 of file RenderManager.h.

References createCylinder().

◆ create() [7/13]

HollowConeProxy * agxRender::RenderProxyFactory::create ( const HollowConeProxy *  )
inline

Create a HollowConeProxy without arguments.

Create a TruncatedConeProxy without arguments.

Definition at line 734 of file RenderManager.h.

References createHollowCone().

◆ create() [8/13]

HollowCylinderProxy * agxRender::RenderProxyFactory::create ( const HollowCylinderProxy *  )
inline

Create a CylinderProxy without arguments.

Create a HollowCylinderProxy without arguments.

Definition at line 718 of file RenderManager.h.

References createHollowCylinder().

◆ create() [9/13]

LineProxy * agxRender::RenderProxyFactory::create ( const LineProxy *  )
inline

Create a LineProxy without arguments.

Definition at line 708 of file RenderManager.h.

References createLine().

◆ create() [10/13]

PlaneProxy * agxRender::RenderProxyFactory::create ( const PlaneProxy *  )
inline

Create a PlaneProxy without arguments.

Definition at line 750 of file RenderManager.h.

References createPlane().

◆ create() [11/13]

TextProxy * agxRender::RenderProxyFactory::create ( const TextProxy *  )
inline

Create a TextProxy without arguments.

Definition at line 745 of file RenderManager.h.

References createText().

◆ create() [12/13]

TruncatedConeProxy * agxRender::RenderProxyFactory::create ( const TruncatedConeProxy *  )
inline

Create a TruncatedConeProxy without arguments.

Definition at line 729 of file RenderManager.h.

References createTruncatedCone().

◆ create() [13/13]

SphereProxy * agxRender::RenderProxyFactory::create ( float  radius)
inline

Create a SphereProxy without arguments.

Definition at line 698 of file RenderManager.h.

References createSphere().

◆ createBox() [1/2]

virtual BoxProxy * agxRender::RenderProxyFactory::createBox ( agxCollide::Box *  shape)
pure virtual

Interface for creating and returning a BoxProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createBox() [2/2]

virtual BoxProxy * agxRender::RenderProxyFactory::createBox ( const agx::Vec3 &  halfExtents)
pure virtual

Interface for creating and returning a BoxProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createCapsule() [1/2]

virtual CapsuleProxy * agxRender::RenderProxyFactory::createCapsule ( agxCollide::Capsule *  shape)
pure virtual

Interface for creating and returning a CapsuleProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createCapsule() [2/2]

virtual CapsuleProxy * agxRender::RenderProxyFactory::createCapsule ( float  radius,
float  height 
)
pure virtual

Interface for creating and returning a CapsuleProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createCone() [1/2]

virtual TruncatedConeProxy * agxRender::RenderProxyFactory::createCone ( agxCollide::Cone *  shape)
pure virtual

Interface for creating and returning a ConeProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createCone() [2/2]

virtual ConeProxy * agxRender::RenderProxyFactory::createCone ( float  radius,
float  height 
)
pure virtual

Interface for creating and returning a ConeProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createContacts()

virtual agxRender::ContactsProxy * agxRender::RenderProxyFactory::createContacts ( const agxCollide::GeometryContactPtrVector &  )
pure virtual

Interface for creating and returning ContactsProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createCylinder() [1/2]

virtual CylinderProxy * agxRender::RenderProxyFactory::createCylinder ( agxCollide::Cylinder *  shape)
pure virtual

Interface for creating and returning a CylinderProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createCylinder() [2/2]

virtual CylinderProxy * agxRender::RenderProxyFactory::createCylinder ( float  radius,
float  height 
)
pure virtual

Interface for creating and returning a CylinderProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createHeightfield()

virtual HeightFieldProxy * agxRender::RenderProxyFactory::createHeightfield ( agxCollide::HeightField *  shape)
pure virtual

Interface for creating and returning HeightfieldProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createHollowCone() [1/2]

virtual HollowConeProxy * agxRender::RenderProxyFactory::createHollowCone ( agxCollide::HollowCone *  shape)
pure virtual

Interface for creating and returning a HollowCone.

Implemented in agxOSG::RenderProxyFactory.

◆ createHollowCone() [2/2]

virtual HollowConeProxy * agxRender::RenderProxyFactory::createHollowCone ( float  topRadius,
float  bottomRadius,
float  height,
float  thickness 
)
pure virtual

Interface for creating and returning a HollowConeProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createHollowCylinder() [1/2]

virtual HollowCylinderProxy * agxRender::RenderProxyFactory::createHollowCylinder ( agxCollide::HollowCylinder *  shape)
pure virtual

Interface for creating and returning a HollowCylinderProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createHollowCylinder() [2/2]

virtual HollowCylinderProxy * agxRender::RenderProxyFactory::createHollowCylinder ( float  outerRadius,
float  height,
float  thickness 
)
pure virtual

Interface for creating and returning a HollowCylinderProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createLine() [1/2]

virtual LineProxy * agxRender::RenderProxyFactory::createLine ( agxCollide::Line *  shape)
pure virtual

Interface for creating and returning a LineProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createLine() [2/2]

virtual LineProxy * agxRender::RenderProxyFactory::createLine ( const agx::Vec3 &  p1,
const agx::Vec3 &  p2 
)
pure virtual

Interface for creating and returning a LineProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createPlane() [1/2]

virtual PlaneProxy * agxRender::RenderProxyFactory::createPlane ( agxCollide::Plane *  shape)
pure virtual

Interface for creating and returning PlaneProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createPlane() [2/2]

virtual PlaneProxy * agxRender::RenderProxyFactory::createPlane ( const agx::Vec3 &  normal,
agx::Real  distance 
)
pure virtual

Interface for creating and returning PlaneProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createRigidBodies()

virtual agxRender::RigidBodyBatchRenderProxy * agxRender::RenderProxyFactory::createRigidBodies ( const agx::RigidBodyPtrSetVector *  )
pure virtual

Interface for creating and returning batch rendering of rigid bodies (cm).

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createSphere() [1/2]

virtual SphereProxy * agxRender::RenderProxyFactory::createSphere ( agxCollide::Sphere *  shape)
pure virtual

Interface for creating and returning a SphereProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createSphere() [2/2]

virtual SphereProxy * agxRender::RenderProxyFactory::createSphere ( float  radius)
pure virtual

Interface for creating and returning a SphereProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createSphereBatchRenderer()

virtual RenderProxy * agxRender::RenderProxyFactory::createSphereBatchRenderer ( agxData::Buffer *  positions,
agxData::Buffer *  rotations,
agxData::Buffer *  radii,
agxData::Buffer *  colors,
agxData::Buffer *  enableRendering,
agxData::Value *  bound,
agx::Component *  context 
)
pure virtual

Implemented in agxOSG::RenderProxyFactory.

◆ createText()

virtual TextProxy * agxRender::RenderProxyFactory::createText ( const agx::String &  text,
const agx::Vec3 &  pos,
float  size = 1 
)
pure virtual

Interface for creating and returning TextProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createTrimesh()

virtual agxRender::TrimeshProxy * agxRender::RenderProxyFactory::createTrimesh ( agxCollide::Trimesh *  mesh)
pure virtual

Interface for creating and returning TrimeshProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ createTruncatedCone()

virtual TruncatedConeProxy * agxRender::RenderProxyFactory::createTruncatedCone ( float  topRadius,
float  bottomRadius,
float  height 
)
pure virtual

Interface for creating and returning a TruncatedConeProxy.

Implemented in agxOSG::RenderProxyFactory.

Referenced by create().

◆ createWire()

virtual agxRender::WireRenderProxy * agxRender::RenderProxyFactory::createWire ( float  radius,
const agx::Vec3 &  color 
)
pure virtual

Implemented in agxOSG::RenderProxyFactory.

◆ createWireShape()

virtual agxRender::WireShapeProxy * agxRender::RenderProxyFactory::createWireShape ( float  radius,
float  height,
const agx::Vec3 &  previousEndPoint0,
const agx::Vec3 &  previousEndPoint1 
)
pure virtual

Interface for creating and returning a WireShapeProxy.

Implemented in agxOSG::RenderProxyFactory.

◆ getDefaultRenderMode()

RenderProxy::RenderMode agxRender::RenderProxyFactory::getDefaultRenderMode ( ) const
inline
Returns
The RenderMode used when new RenderProxy's are created

Definition at line 766 of file RenderManager.h.

References m_defaultRenderMode.

◆ getEnable()

bool agxRender::RenderProxyFactory::getEnable ( ) const
inline

Definition at line 232 of file agxRender/RenderProxyFactory.h.

References m_enabled.

◆ getGraphRenderer()

virtual Graph::GraphRenderer * agxRender::RenderProxyFactory::getGraphRenderer ( )
pure virtual

This method should create and return an implementation of a GraphRenderer, a class that can render the statistics graphs as described in the class Graph::GraphRenderer.

Returns
a pointer to the GraphRenderer

Implemented in agxOSG::RenderProxyFactory.

◆ setDefaultRenderMode()

void agxRender::RenderProxyFactory::setDefaultRenderMode ( RenderProxy::RenderMode  mode)

Set the default RenderMode that will be used when a new RenderProxy is created.

Parameters
mode- New RenderMode

◆ setEnable()

void agxRender::RenderProxyFactory::setEnable ( bool  flag)
inline

Definition at line 228 of file agxRender/RenderProxyFactory.h.

References m_enabled.

◆ setGlobalTransform()

virtual void agxRender::RenderProxyFactory::setGlobalTransform ( const agx::AffineMatrix4x4 &  )
inlinevirtual

Set a transformation which could 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

Reimplemented in agxOSG::RenderProxyFactory.

Definition at line 140 of file agxRender/RenderProxyFactory.h.

◆ setRenderManager()

virtual void agxRender::RenderProxyFactory::setRenderManager ( RenderManager *  mgr)
inlineprotectedvirtual

Definition at line 218 of file agxRender/RenderProxyFactory.h.

Member Data Documentation

◆ m_defaultRenderMode

RenderProxy::RenderMode agxRender::RenderProxyFactory::m_defaultRenderMode
protected

Definition at line 224 of file agxRender/RenderProxyFactory.h.

Referenced by getDefaultRenderMode().

◆ m_enabled

bool agxRender::RenderProxyFactory::m_enabled
protected

Definition at line 225 of file agxRender/RenderProxyFactory.h.

Referenced by getEnable(), and setEnable().

◆ m_mgr

RenderManager* agxRender::RenderProxyFactory::m_mgr
protected

Definition at line 223 of file agxRender/RenderProxyFactory.h.


The documentation for this class was generated from the following files: