|
AGX Dynamics 2.42.3.1
|
Implementation of batch rendering of rigid body center of mass position. More...
#include <RenderProxy.h>
Inheritance diagram for agxOSG::RigidBodyBatchRenderProxy< ContainerType, TransformType >:Public Member Functions | |
| RigidBodyBatchRenderProxy (osg::Geode *geode, const ContainerType *container, agxOSG::RenderProxyFactory *factory) | |
Public Member Functions inherited from agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType > | |
| ContainerShapeBatchRenderer (osg::Geode *geode, const ContainerType *container, agxOSG::RenderProxyFactory *factory, agxRender::RenderProxy *proxy) | |
| Construct given shape composite and compatible container. | |
| virtual | ~ContainerShapeBatchRenderer () |
| Destructor. | |
| void | clear () |
| Reset container pointer and removes all child transforms. | |
| void | setContainer (const ContainerType *container) |
| Assign compatible container. | |
| void | update (bool addScaleTransform=false) |
| Updates transforms. | |
Public Member Functions inherited from agxOSG::ShapeBatchRenderer< TransformType > | |
| void | clear () |
| Clear the root transform node from all child transforms. | |
| float | getScale () const |
| void | setScale (float scale) |
| Assign transform scale. | |
Public Member Functions inherited from agxRender::RigidBodyBatchRenderProxy | |
| RigidBodyBatchRenderProxy () | |
| void | set (const agx::RigidBodyPtrSetVector *enabledBodies, float scale) |
Public Member Functions inherited from agxRender::RenderProxy | |
| RenderProxy (agxCollide::Shape *shape=nullptr) | |
| Constructor. | |
| void | callOnChange (EventType type) |
Explicitly fires event of type. | |
| bool | compare () const |
| Compare the modified count with its associated shape. | |
| virtual float | getAlpha () const |
| virtual agx::Vec3 | getColor () const |
| bool | getEnable () const |
| const agxCollide::Geometry * | getGeometry () const |
| agx::UInt32 | getModifiedCount () const |
| This value tells us that if the proxy is synchronized with the associated shape. | |
| RenderMode | getRenderMode () const |
| const agxCollide::Shape * | getShape () const |
| const agx::AffineMatrix4x4 & | getTransform () const |
| bool | isEnabled () const |
| virtual void | reset () |
| Will reset color, alpha and enabled state back to default state (as when initially created). | |
| virtual void | setAlpha (float alpha) |
| Set the alpha value of this proxy. | |
| virtual void | setColor (const agx::Vec3 &color) |
| Set the color of this proxy. | |
| void | setEnable (bool flag) |
| Toggle this proxy for rendering on/off. | |
| void | setRenderMode (RenderMode mode) |
| Set the render mode for this Proxy. | |
| void | setShape (agxCollide::Shape *shape, const agxCollide::Geometry *geometry) |
| Set the shape for this proxy. | |
| virtual void | setTransform (const agx::AffineMatrix4x4 &transform) |
| Set the transform of this RenderProxy, if overridden, set the m_transform and call onUpdate(TRANSFORM) | |
| virtual bool | updateShape () |
| Called when a Shape has been changed (for example radius on a sphere is changed). | |
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 | ~RigidBodyBatchRenderProxy () |
| ADD_COMMON_PROXY_METHODS () | |
| virtual void | reset () override |
| Will reset color, alpha and enabled state back to default state (as when initially created). | |
Protected Member Functions inherited from agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType > | |
| agx::Vec3f | findScale (const agxRender::WireRenderProxy::SegmentDefContainer::value_type &val) const |
| agx::Vec3f | findScale (const typename ContainerType::value_type &val) const |
| Find scale (agx::Vec3) given container value type. | |
| agx::AffineMatrix4x4 | findTransform (const agx::RigidBodyPtrSetVector::value_type &rbRefPtr) const |
| agx::AffineMatrix4x4 | findTransform (const agxCollide::GeometryContactPtrVector::value_type &) const |
| agx::AffineMatrix4x4 | findTransform (const agxData::Array< agx::Vec3 >::value_type &p) const |
| agx::AffineMatrix4x4 | findTransform (const agxRender::RigidBodyBatchRenderProxy::Container::value_type &rbPtr) const |
| agx::AffineMatrix4x4 | findTransform (const typename ContainerType::value_type &val) const |
| Find transform (agx::AffineMatrix4x4) given container value type. | |
Protected Member Functions inherited from agxOSG::ShapeBatchRenderer< TransformType > | |
| ShapeBatchRenderer (osg::Geode *geode, agxOSG::RenderProxyFactory *factory, agxRender::RenderProxy *proxy) | |
| Construct given geode. | |
| ShapeBatchRenderer (osg::Shape *shape, agxOSG::RenderProxyFactory *factory, agxRender::RenderProxy *proxy) | |
| Construct given single shape. | |
| virtual | ~ShapeBatchRenderer () |
| Destructor. | |
| void | prepare (size_t numObjects) |
| Prepare the root transform with the current amount of child nodes. | |
| void | prepareWithScale (size_t numObjects) |
| Including scale transform. | |
| void | setTransform (TransformType *obj, const agx::AffineMatrix4x4 &transform, const agx::Vec3f &scale) |
| Assign transform (given agx type) to a supported osg transform. | |
| virtual | ~RigidBodyBatchRenderProxy ()=default |
Protected Member Functions inherited from agxRender::RenderProxy | |
| virtual | ~RenderProxy () |
| Destructor. | |
| virtual void | onChange (EventType) |
| Pure virtual method that should response on the different events. | |
| void | setBeginToEndTransform (const agx::Vec3 &begin, const agx::Vec3 &end, float &retHeight, bool signalShapeChanged, bool offsetHalfHeight=true) |
| Calculates and sets the transform given begin and end points. | |
| void | setModifiedCount (agx::UInt32 c) |
| virtual void | synchronizeParameters () |
| This method should be implemented so that it extracts size parameters from an associated shape and store it in the Proxy parameters (radius/length etc). | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Additional Inherited Members | |
Public Types inherited from agxRender::RigidBodyBatchRenderProxy | |
| typedef agx::Vector< const agx::RigidBody * > | Container |
Public Types inherited from agxRender::RenderProxy | |
| enum | EventType { ENABLE , TRANSFORM , ALPHA , COLOR , SHAPE , REMOVE , RENDERMODE } |
| Enum for specifying a type of event which might change a RenderProxy. More... | |
| enum | RenderMode { NOT_SET = 0x0 , SOLID = 0x1 , WIREFRAME = 0x2 } |
Static Public Member Functions inherited from agxRender::RenderProxy | |
| static agx::Bool | shouldRender (const agx::RigidBody *rb) |
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. | |
Protected Attributes inherited from agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType > | |
| const ContainerType * | m_container |
Protected Attributes inherited from agxOSG::ShapeBatchRenderer< TransformType > | |
| osg::ref_ptr< osg::Geode > | m_geode |
| float | m_scale |
Protected Attributes inherited from agxRender::RigidBodyBatchRenderProxy | |
| agxRender::RigidBodyBatchRenderProxy::Container | m_bodies |
| float | m_scale |
Protected Attributes inherited from agxRender::RenderProxy | |
| agx::observer_ptr< agxCollide::Shape > | m_shape |
| agx::AffineMatrix4x4 | m_transform |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Implementation of batch rendering of rigid body center of mass position.
Definition at line 586 of file agxOSG/RenderProxy.h.
|
inline |
Definition at line 589 of file agxOSG/RenderProxy.h.
|
inlineprotectedvirtual |
Reimplemented from agxRender::RigidBodyBatchRenderProxy.
Definition at line 593 of file agxOSG/RenderProxy.h.
|
inlineprotected |
Definition at line 596 of file agxOSG/RenderProxy.h.
References agxRender::RigidBodyBatchRenderProxy::m_bodies, agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType >::m_container, agxRender::RigidBodyBatchRenderProxy::m_scale, agxOSG::ShapeBatchRenderer< TransformType >::setScale(), agxRender::RenderProxy::setTransform(), and agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType >::update().
|
inlineoverrideprotectedvirtual |
Will reset color, alpha and enabled state back to default state (as when initially created).
Reimplemented from agxRender::RenderProxy.
Definition at line 608 of file agxOSG/RenderProxy.h.