|
AGX Dynamics
2.37.3.2
|
Class that handles batch rendering of objects in forward iterator compliant container. More...
#include <RenderProxy.h>
Inheritance diagram for agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType >:Public Member Functions | |
| ContainerShapeBatchRenderer (osg::Geode *geode, const ContainerType *container, agxOSG::RenderProxyFactory *factory, agxRender::RenderProxy *proxy) | |
| Construct given shape composite and compatible container. More... | |
| virtual | ~ContainerShapeBatchRenderer () |
| Destructor. More... | |
| void | clear () |
| Reset container pointer and removes all child transforms. More... | |
| void | setContainer (const ContainerType *container) |
| Assign compatible container. More... | |
| void | update (bool addScaleTransform=false) |
| Updates transforms. More... | |
Public Member Functions inherited from agxOSG::ShapeBatchRenderer< TransformType > | |
| void | clear () |
| Clear the root transform node from all child transforms. More... | |
| float | getScale () const |
| void | setScale (float scale) |
| Assign transform scale. More... | |
Protected Member Functions | |
| agx::Vec3f | findScale (const typename ContainerType::value_type &val) const |
| Find scale (agx::Vec3) given container value type. More... | |
| template<> | |
| agx::Vec3f | findScale (const agxRender::WireRenderProxy::SegmentDefContainer::value_type &val) const |
| agx::AffineMatrix4x4 | findTransform (const typename ContainerType::value_type &val) const |
| Find transform (agx::AffineMatrix4x4) given container value type. More... | |
| template<> | |
| agx::AffineMatrix4x4 | findTransform (const agxCollide::GeometryContactPtrVector::value_type &) const |
| template<> | |
| agx::AffineMatrix4x4 | findTransform (const agx::RigidBodyPtrSetVector::value_type &rbRefPtr) const |
| template<> | |
| agx::AffineMatrix4x4 | findTransform (const agxRender::RigidBodyBatchRenderProxy::Container::value_type &rbPtr) const |
| template<> | |
| agx::AffineMatrix4x4 | findTransform (const agxData::Array< agx::Vec3 >::value_type &p) const |
Protected Member Functions inherited from agxOSG::ShapeBatchRenderer< TransformType > | |
| ShapeBatchRenderer (osg::Shape *shape, agxOSG::RenderProxyFactory *factory, agxRender::RenderProxy *proxy) | |
| Construct given single shape. More... | |
| ShapeBatchRenderer (osg::Geode *geode, agxOSG::RenderProxyFactory *factory, agxRender::RenderProxy *proxy) | |
| Construct given geode. More... | |
| virtual | ~ShapeBatchRenderer () |
| Destructor. More... | |
| void | prepare (size_t numObjects) |
| Prepare the root transform with the current amount of child nodes. More... | |
| void | prepareWithScale (size_t numObjects) |
| Including scale transform. More... | |
| void | setTransform (TransformType *obj, const agx::AffineMatrix4x4 &transform, const agx::Vec3f &scale) |
| Assign transform (given agx type) to a supported osg transform. More... | |
Protected Attributes | |
| const ContainerType * | m_container |
Protected Attributes inherited from agxOSG::ShapeBatchRenderer< TransformType > | |
| osg::ref_ptr< osg::Geode > | m_geode |
| float | m_scale |
Class that handles batch rendering of objects in forward iterator compliant container.
Default ContainerType::value_type& val -> val->getTransform() is used (i.e., typically reference counted or observers to objects with method getTransform()). Template specialization has to be implemented to handle other types... at all.
E.g., for ContainerType = agxCollide::GeometryContactPtrVector: void findTransform( const agxCollide::GeometryContactPtrVector::value_type& ) has to be implemented.
Definition at line 692 of file agxOSG/RenderProxy.h.
|
inline |
Construct given shape composite and compatible container.
| geode | - geode with one or many shapes |
| container | - compatible container |
| factory | - render proxy factory |
| proxy | - render proxy |
Definition at line 702 of file agxOSG/RenderProxy.h.
|
inlinevirtual |
Destructor.
Definition at line 708 of file agxOSG/RenderProxy.h.
References agxTerrain::Profiler::clear().
| void agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType >::clear | ( | ) |
Reset container pointer and removes all child transforms.
Definition at line 876 of file agxOSG/RenderProxy.h.
References agxTerrain::Profiler::clear().
|
protected |
Find scale (agx::Vec3) given container value type.
Default assigned scale returned.
Definition at line 938 of file agxOSG/RenderProxy.h.
|
inlineprotected |
Definition at line 944 of file agxOSG/RenderProxy.h.
References agxOSG::ShapeBatchRenderer< TransformType >::getScale().
|
protected |
Find transform (agx::AffineMatrix4x4) given container value type.
| val | - container value |
Definition at line 908 of file agxOSG/RenderProxy.h.
|
inlineprotected |
Definition at line 914 of file agxOSG/RenderProxy.h.
|
inlineprotected |
Definition at line 920 of file agxOSG/RenderProxy.h.
|
inlineprotected |
Definition at line 926 of file agxOSG/RenderProxy.h.
|
inlineprotected |
Definition at line 932 of file agxOSG/RenderProxy.h.
References agx::AffineMatrix4x4T< Real >::translate().
| void agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType >::setContainer | ( | const ContainerType * | container | ) |
Assign compatible container.
Definition at line 902 of file agxOSG/RenderProxy.h.
| void agxOSG::ContainerShapeBatchRenderer< ContainerType, TransformType >::update | ( | bool | addScaleTransform = false | ) |
Updates transforms.
Definition at line 883 of file agxOSG/RenderProxy.h.
References agxAssert, and agxData::transform().
|
protected |
Definition at line 740 of file agxOSG/RenderProxy.h.