AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RenderManager.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2021. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXRENDER_RENDERMANAGER_H
18 #define AGXRENDER_RENDERMANAGER_H
19 
20 #include <agx/agxPhysics_export.h>
21 #include <agx/Referenced.h>
22 #include <agx/HashVector.h>
23 #include <agx/AffineMatrix4x4.h>
24 #include <agxCollide/Space.h>
25 
26 #include <agxRender/RenderProxy.h>
27 #include <agxRender/Renderable.h>
28 #include <agxRender/Graph.h>
29 
30 namespace agxSDK
31 {
32  class Simulation;
33  class StatisticsEntries;
34 }
35 
42 namespace agxRender
43 {
44 
45  class RenderProxyFactory;
46  class RenderProxy;
47  class SpaceListener;
48  class SphereProxy;
49  class BoxProxy;
50  class LineProxy;
51  class HeightFieldProxy;
52  class CylinderProxy;
53  class HollowCylinderProxy;
54  class ConeProxy;
55  class TruncatedConeProxy;
56  class HollowTruncatedConeProxy;
57  class CapsuleProxy;
58  class TextProxy;
59  class PlaneProxy;
60  class GraphRenderer;
61  class Graph;
62 
64  enum Flags {
70  RENDER_CONSTRAINTS = 1 << 5,
71  RENDER_BODIES = 1 << 6,
74  RENDER_TEXT = 1 << 9,
75  RENDER_AABB_TREES = 1 << 10,
76  RENDER_SENSORS = 1 << 11,
77  RENDER_MESH = 1 << 12,
79  RENDER_STATISTICS = 1 << 14,
80  RENDER_RENDERABLES = 1 << 15,
83  RENDER_BATCH_BODIES = 1 << 18,
84  RENDER_BATCH_WIRES = 1 << 19,
97  };
98 
100 
111  {
112  public:
113 
119 
124  void update();
125 
130  void setProxyFactory ( RenderProxyFactory* factory );
131 
135  RenderProxyFactory* getProxyFactory();
136 
141  void setEnable( bool flag );
142 
146  bool getEnable( ) const;
147 
151  bool isEnabled() const;
152 
157  void setAlpha( float alpha );
158 
162  float getAlpha( ) const;
163 
168  void disableFlags( unsigned int flags );
169 
174  void enableFlags( unsigned int flags );
175 
179  bool isEnabledFlags( unsigned int flags ) const;
180 
184  void setFlags( unsigned int flags );
185 
190  void updateAllProxies( agxRender::RenderProxy::EventType eventType );
191 
197  SphereProxy* acquireSphere( float radius );
198 
204  BoxProxy* acquireBox( const agx::Vec3& halfExtents );
205 
211  LineProxy* acquireLine( const agx::Vec3& p1, const agx::Vec3& p2 );
212 
219  TextProxy* acquireText( const agx::String& text, const agx::Vec3& pos );
220 
226  PlaneProxy* acquirePlane( const agx::Vec3& normal, agx::Real distance );
227 
234  CylinderProxy* acquireCylinder( float radius, float height );
235 
243  CylinderProxy* acquireCylinder( const agx::Vec3& begin, const agx::Vec3& end, float radius );
244 
251  HollowCylinderProxy* acquireHollowCylinder( float radius, float height, float thickness );
252 
253 
261  ConeProxy* acquireCone( const agx::Vec3& p1, const agx::Vec3& p2, float radius );
262 
271  TruncatedConeProxy* acquireTruncatedCone( const agx::Vec3& p1, const agx::Vec3& p2, float topRadius, float bottomRadius );
272 
282  HollowTruncatedConeProxy* acquireHollowTruncatedCone( const agx::Vec3& p1, const agx::Vec3& p2, float topRadius, float bottomRadius, float thickness );
283 
290  CapsuleProxy* acquireCapsule( float radius, float height );
291 
299  CapsuleProxy* acquireCapsule( const agx::Vec3& begin, const agx::Vec3& end, float radius );
300 
307  ContactsProxy* acquireContacts( const agxCollide::GeometryContactPtrVector& contacts, float scale );
308 
315  RigidBodyBatchRenderProxy* acquireRigidBodies( const agx::RigidBodyPtrSetVector* enabledBodies, float scale );
316 
322  WireRenderProxy* acquireWire( float radius, const agx::Vec3& color );
323 
329  void clear( bool clearText = true, bool clearGlobalProxies = true );
330 
335  void addRenderable( Renderable* renderable );
336 
340  bool hasRenderable( Renderable* renderable ) const;
341 
346  bool removeRenderable( Renderable* renderable );
347 
348  void acquireGeometry( const agxCollide::Geometry* geometry, const agx::Vec3& color );
349 
355  RenderProxy* findShapeProxy( const agxCollide::Shape* shape );
356 
361  void setDefaultRenderMode( RenderProxy::RenderMode mode );
362 
369  void setScaleFactor( float scaleFactor = 1.0f );
370 
374  float getScaleFactor() const;
375 
376  public:
377  typedef std::pair< const agx::ParticleSystem*, agxRender::RenderProxyRef > ConstParticleSystemPtrRenderProxyPtrPair;
379 
380  protected:
381 
385  void flush();
386 
387  friend class SpaceListener;
388  friend class agxCollide::Space;
389  friend class agxSDK::Simulation;
391 
392 
396  void setSpace( agxCollide::Space* space );
397 
401  Graph* getGraph();
402 
403  void add( const agx::ParticleSystem* particleSystem );
404  void remove( const agx::ParticleSystem* particleSystem );
405 
412  void add( const agxCollide::Geometry* geometry, const agx::Vec3& color = agx::Vec3( -1, 0, 0 ), bool addToProxies = true );
413 
421  RenderProxy* add( agxCollide::Shape* shape, const agxCollide::Geometry* geometry, const agx::Vec3& color = agx::Vec3( -1, 0, 0 ), bool addToProxies = true );
422 
427  void remove( const agxCollide::Shape* shape );
428 
433  void remove( const agxCollide::Geometry* geometry );
434 
436  void renderBoundingVolume( const agxCollide::Geometry* geometry );
437 
439  void renderAABBTrees( RenderProxy* proxy );
440 
442  void addAllGeometries();
443 
445  void updateText();
446 
448  void updateGraphs();
449 
451  void updateAABBProxies( );
452 
454  void updateBodyProxies( agxData::EntityStorage* islandStorage = nullptr );
455 
457  void updateShapeProxies(agxData::EntityStorage* islandStorage = nullptr );
458 
460  void updateParticleSystemProxies();
461 
463  void updateRenderables();
464 
466  void updateContactProxies();
467 
468 
469  void updateParticleContactProxies();
470  void updateParticleGeometryContactProxies();
471 
473  void updateConstraintProxies();
474 
476  void clearShapeProxies();
477 
479  void updateProxy( RenderProxy* proxy, agxData::EntityStorage* islandStorage = nullptr );
480 
482  virtual ~RenderManager();
483 
484  // Attributes
488  bool m_enable;
489  float m_alpha;
492 
495 
497 
498  // Abstract base class for a ProxyCache
499  struct CacheBase {
500  CacheBase( RenderManager* mgr ) : m_mgr( mgr ) {
501  m_mgr->m_cacheVector.push_back( this );
502  }
503 
504  virtual void clear() = 0;
505  virtual void flush() = 0;
506  virtual void setAlpha( float alpha ) = 0;
508 
509  virtual ~CacheBase() {}
510  };
511 
512 
516  template <typename T>
517  class PrimitiveCache : public CacheBase
518  {
519  public:
520 
523  typedef typename ProxyVector::iterator iterator;
524 
526  PrimitiveCache( RenderManager* mgr ) : CacheBase( mgr ), m_index( 0 ) {}
527 
531  T* acquire();
532 
536  void flush() {
537  for ( size_t i = m_index; i < m_pool.size(); i++ )
538  m_pool[i]->callOnChange( RenderProxy::REMOVE );
539 
540  m_pool.resize( std::min( m_index, m_pool.size() ) );
541  m_index = 0;
542  }
543 
548  void setAlpha( float alpha ) {
549  for ( size_t i = 0; i < m_pool.size(); i++ )
550  m_pool[i]->setAlpha( alpha );
551  }
552 
556  void clear() {
557  for ( typename ProxyVector::iterator it = m_pool.begin(); it != m_pool.end(); ++it )
558  ( *it )->callOnChange( RenderProxy::REMOVE );
559  m_pool.clear( agx::Container::SHRINK_BUFFER );
560  m_index = 0;
561  }
562 
564  virtual ~PrimitiveCache() {
565  clear();
566  }
567 
568  iterator begin() { return m_pool.begin(); }
569  const_iterator begin() const { return m_pool.begin(); }
570 
571  iterator end() { return m_pool.end(); }
572  const_iterator end() const { return m_pool.end(); }
573 
574  protected:
575 
577  size_t m_index;
578  };
579 
583  template <typename T, typename P1>
584  class PrimitiveCache1 : public PrimitiveCache<T>
585  {
586  public:
587 
590 
594  T* acquire( const P1& param );
595 
596  private:
597 
598  T* acquire() { return nullptr; }
599  };
600 
603 
617 
619 
626 
633 
634  };
635 
636 
646  {
647  public:
649 
651  virtual SphereProxy* createSphere( float radius ) = 0;
652 
654  virtual BoxProxy* createBox( const agx::Vec3& halfExtents ) = 0;
655 
657  virtual LineProxy* createLine( const agx::Vec3& p1, const agx::Vec3& p2 ) = 0;
658 
660  virtual CylinderProxy* createCylinder( float radius, float height ) = 0;
661 
663  virtual HollowCylinderProxy* createHollowCylinder( float radius, float height, float thickness ) = 0;
664 
666  virtual ConeProxy* createCone( float radius, float height ) = 0;
667 
669  virtual TruncatedConeProxy* createTruncatedCone( float topRadius, float bottomRadius, float height ) = 0;
670 
672  virtual HollowTruncatedConeProxy* createHollowTruncatedCone( float topRadius, float bottomRadius, float height, float thickness ) = 0;
673 
675  virtual CapsuleProxy* createCapsule( float radius, float height ) = 0;
676 
678  virtual WireShapeProxy* createWireShape( float radius, float height,
679  const agx::Vec3& previousEndPoint0, const agx::Vec3& previousEndPoint1 ) = 0;
680 
682  virtual TextProxy* createText( const agx::String& text, const agx::Vec3& pos ) = 0;
683 
685  virtual PlaneProxy* createPlane( const agx::Vec3& normal, agx::Real distance ) = 0;
686 
688  virtual HeightFieldProxy* createHeightfield( agxCollide::HeightField* hf ) = 0;
689 
691  virtual ContactsProxy* createContacts( const agxCollide::GeometryContactPtrVector& ) = 0;
692 
694  virtual RigidBodyBatchRenderProxy* createRigidBodies( const agx::RigidBodyPtrSetVector* /*enabledBodies*/ ) = 0;
695 
696  virtual WireRenderProxy* createWire( float radius, const agx::Vec3& color ) = 0;
697 
698  virtual RenderProxy* createSphereBatchRenderer(
699  agxData::Buffer *positions,
700  agxData::Buffer *rotations,
701  agxData::Buffer *radii,
702  agxData::Buffer *colors,
703  agxData::Buffer *enableRendering,
704  agxData::Value *bound,
705  agx::Component *context ) = 0;
706 
708  virtual TrimeshProxy* createTrimesh( agxCollide::Trimesh* mesh ) = 0;
709 
711  SphereProxy* create( float radius );
712 
714  BoxProxy* create( const agx::Vec3& halfExtents );
715 
717  LineProxy* create( const LineProxy* );
718 
720  CylinderProxy* create( const CylinderProxy* );
721 
723  HollowCylinderProxy* create( const HollowCylinderProxy* );
724 
726  ConeProxy* create( const ConeProxy* );
727 
729  TruncatedConeProxy* create( const TruncatedConeProxy* );
730 
733 
735  CapsuleProxy* create( const CapsuleProxy* );
736 
738  TextProxy* create( const TextProxy* );
739 
741  PlaneProxy* create( const PlaneProxy* );
742 
744  ContactsProxy* create( const agxCollide::GeometryContactPtrVector& contacts );
745 
747  RigidBodyBatchRenderProxy* create( const agx::RigidBodyPtrSetVector* enabledBodies );
748 
754  virtual Graph::GraphRenderer* getGraphRenderer() = 0;
755 
760  void setDefaultRenderMode( RenderProxy::RenderMode mode );
761 
765  RenderProxy::RenderMode getDefaultRenderMode( ) const;
766 
767  void setEnable( bool flag );
768  bool getEnable( ) const;
769 
770  protected:
771  friend class RenderManager;
773  m_mgr = mgr;
774  }
775  virtual ~RenderProxyFactory();
778  bool m_enabled;
779  };
780 
781  inline void RenderProxyFactory::setEnable( bool flag )
782  {
783  m_enabled = flag;
784  }
785  inline bool RenderProxyFactory::getEnable( ) const
786  {
787  return m_enabled;
788  }
789 
792  {
793  public:
794 
797 
798  agxCollide::Space* getSpace();
799  protected:
800 
802  virtual ~SpaceListener();
803 
805  void addNotification( agxCollide::Space* space );
806 
808  void addGeometryNotification( agxCollide::Space* space, agxCollide::Geometry* geometry );
810  void removeGeometryNotification( agxCollide::Space* space, agxCollide::Geometry* geometry );
812  void addShapeNotification( agxCollide::Space* space, agxCollide::Geometry* geometry, agxCollide::Shape* shape );
814  void removeShapeNotification( agxCollide::Space* space, agxCollide::Geometry* geometry, agxCollide::Shape* shape );
815 
818  };
819 
820 
821 
822 
823  // Implementation
824 
825  inline bool RenderManager::getEnable( ) const
826  {
827  return m_enable;
828  }
829 
830 
831  inline float RenderManager::getAlpha( ) const
832  {
833  return m_alpha;
834  }
835 
836 
837  inline bool RenderManager::isEnabled() const
838  {
839  return getEnable();
840  }
841 
842 
844  inline SphereProxy* RenderProxyFactory::create( float radius )
845  {
846  return createSphere( radius );
847  }
849  inline BoxProxy* RenderProxyFactory::create( const agx::Vec3& halfExtents )
850  {
851  return createBox( halfExtents );
852  }
855  {
856  return createLine( agx::Vec3( agx::Real( 0 ) ), agx::Vec3( agx::Real( 1 ) ) );
857  }
860  {
861  return createCylinder( 1, 1 );
862  }
865  {
866  return createHollowCylinder( 1, 1, 0.1f );
867  }
868 
871  {
872  return createCone( 1, 1 );
873  }
876  {
877  return createTruncatedCone( 1, 1, 1 );
878  }
881  {
882  return createHollowTruncatedCone( 1, 1, 1, 0.1f );
883  }
884 
887  {
888  return createCapsule( 1, 1 );
889  }
892  {
893  return createText( "", agx::Vec3( 0, 0, 0 ) );
894  }
897  {
898  return createPlane( agx::Vec3( 0, 0, 1 ), 0 );
899  }
900 
903  {
904  return createContacts( contacts );
905  }
906 
908  {
909  return createRigidBodies( enabledBodies );
910  }
911 
913  {
914  return m_defaultRenderMode;
915  }
916 
917  template< typename T>
919  {
920  if ( m_index < m_pool.size() ) {
921  T* proxy = m_pool[m_index++];
922 
923  // Reset color, alpha and enabled state
924  proxy->reset();
925  return proxy;
926  } else {
927  const void* p = nullptr;
928  const T* px = static_cast<const T*>( p );
929  T* proxy = m_mgr->getProxyFactory()->create( px);
930  proxy->setEnable( true );
931  m_pool.push_back( proxy );
932  m_index = m_pool.size();
933  return proxy;
934  }
935  }
936 
937  template< typename T, typename P1>
939  {
940  if ( this->m_index < this->m_pool.size() ) {
941  T* proxy = this->m_pool[this->m_index++];
942  // Reset color, alpha and enabled state
943  proxy->reset();
944  return proxy;
945  } else {
946  T* proxy = this->m_mgr->getProxyFactory()->create( param );
947  proxy->setEnable( true );
948  this->m_pool.push_back( proxy );
949  this->m_index = this->m_pool.size();
950  return proxy;
951  }
952  }
953 }
954 
955 #endif
virtual TruncatedConeProxy * createTruncatedCone(float topRadius, float bottomRadius, float height)=0
Interface for creating and returning a TruncatedConeProxy.
agx::Vector< RenderableRef > RenderableRefVector
PrimitiveCache1< BoxProxy, agx::Vec3 > m_boxCache
AGXTERRAIN_EXPORT void clear()
Class that implements a simple graph for plotting scalar values.
Definition: Graph.h:33
Render collision geometries.
Definition: RenderManager.h:65
agx::Vector< agx::ref_ptr< agxRender::RenderProxy > > RenderProxyRefContainer
Batch render bodies.
Definition: RenderManager.h:83
Execute render for all registered Renderables.
Definition: RenderManager.h:80
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Definition: Vec3Template.h:880
AGXOSG_EXPORT void setAlpha(osg::Node *node, float alpha)
Set the alpha part of the material for a node.
The Shape has been removed from space, need to be removed from rendering.
Class for listening for add/remove geometry events for an associated Space.
Definition: SpaceListener.h:29
Render particle contacts.
Definition: RenderManager.h:68
ParticleSystemProxyContainer m_particleSystems
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Definition: observer_ptr.h:60
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:73
Base class for a shape.
Definition: Shape.h:53
Subclass that implements a BoxProxy.
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:38
virtual SphereProxy * createSphere(float radius)=0
Interface for creating and returning a SphereProxy.
Abstract representation of a value.
Definition: Value.h:42
void setRenderManager(RenderManager *mgr)
agx::Vector< CacheBase * > CacheVector
Subclass that implements a TruncatedConeProxy.
virtual HollowCylinderProxy * createHollowCylinder(float radius, float height, float thickness)=0
Interface for creating and returning a HollowCylinderProxy.
agx::Vector< agx::ref_ptr< T > > ProxyVector
PrimitiveCache< TruncatedConeProxy > m_truncatedConeCache
RenderProxyRef m_particleGeometryContactRenderProxy
Subclass that implements a CylinderProxy.
The default rendering mode.
Definition: RenderManager.h:87
#define AGXPHYSICS_EXPORT
Render geometries which are sensors.
Definition: RenderManager.h:76
void flush()
Reduce size of pooled RenderProxy down to the number of used ones.
virtual CylinderProxy * createCylinder(float radius, float height)=0
Interface for creating and returning a CylinderProxy.
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
Color for a RigidBody is selected based on which partition it belongs to.
Definition: RenderManager.h:81
Subclass that implements a TrimeshProxy.
RenderProxyRef m_particleContactRenderProxy
PrimitiveCache< HollowCylinderProxy > m_hollowCylinderCache
Render statistics text/graphs onto screen.
Definition: RenderManager.h:79
agxData::ValueRef m_particleContactBound
Class for storing RenderProxies that are currently in use.
Render contacts as one batch call for all contacts.
Definition: RenderManager.h:82
void setAlpha(float alpha)
Set alpha value for all proxies.
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc...
PrimitiveCache1(RenderManager *mgr)
Constructor.
Subclass that implements a CapsuleProxy.
agx::HashVector< agx::UInt32, agx::ref_ptr< RenderProxy > > RenderProxyHashVector
RenderProxyHashVector m_proxies
PrimitiveCache< CapsuleProxy > m_capsuleCache
AGXOSG_EXPORT agxCollide::Trimesh * createTrimesh(osg::Node *node)
Extracts mesh data from an osg::Node, creates an agxCollide::Trimesh from it and returns the result...
PrimitiveCache1< ContactsProxy, agxCollide::GeometryContactPtrVector > m_contactsCache
A listener that will be responsible for calling RenderManager every time a Shape is added/removed fro...
Abstract class which is responsible for returning a pointer to a specified RenderProxy type...
Render rigid body constraint attachments.
Definition: RenderManager.h:70
PrimitiveCache< CylinderProxy > m_cylinderCache
Base class providing referencing counted objects.
Definition: Referenced.h:113
The geometry representation used by the collision detection engine.
Definition: Geometry.h:88
Subclass that implements a SphereProxy.
Wire content batch rendered.
Definition: RenderManager.h:84
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition: HashVector.h:40
agxData::BufferRef m_particleContactRadiusBuffer
agxRender::GraphRef m_graph
Buffer is deallocated and replaced by an newly allocated empty buffer.
Definition: Container.h:44
Render rigid body mass centers.
Definition: RenderManager.h:71
A basic particle system that contains all the storages and buffers required for basic operation and a...
Render bounding volumes for geometries.
Definition: RenderManager.h:66
Render AABB trees.
Definition: RenderManager.h:75
PrimitiveCache1< RigidBodyBatchRenderProxy, const agx::RigidBodyPtrSetVector * > m_rbCache
virtual RigidBodyBatchRenderProxy * createRigidBodies(const agx::RigidBodyPtrSetVector *)=0
Interface for creating and returning batch rendering of rigid bodies (cm).
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:81
Class holding contacts that makes it possible to batch render these objects.
virtual PlaneProxy * createPlane(const agx::Vec3 &normal, agx::Real distance)=0
Interface for creating and returning PlaneProxy.
agx::ref_ptr< RenderProxyFactory > m_factory
Abstract representation of a data buffer.
Definition: Buffer.h:55
RenderProxyRefContainer m_globalProxies
E.g., wires that hold their proxy (i.e., not doing acquire to fetch their render proxy).
ProxyVector::const_iterator const_iterator
PrimitiveCache1< SphereProxy, float > m_sphereCache
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
RenderableRefVector m_renderables
LinearProbingHashSetImplementation< KeyT, HashT >::iterator begin(LinearProbingHashSetImplementation< KeyT, HashT > &set)
virtual LineProxy * createLine(const agx::Vec3 &p1, const agx::Vec3 &p2)=0
Interface for creating and returning a LineProxy.
std::pair< const agx::ParticleSystem *, agxRender::RenderProxyRef > ConstParticleSystemPtrRenderProxyPtrPair
Subclass that implements a PlaneProxy.
agx::Vector< ConstParticleSystemPtrRenderProxyPtrPair > ParticleSystemProxyContainer
PrimitiveCache< PlaneProxy > m_planeCache
virtual ~PrimitiveCache()
Destructor: calls clear()
Inherit from this class and implement the render() method to make it it self during debug rendering...
Definition: Renderable.h:38
Abstract base class which encapsulated information for rendering a specific shape.
agxData::BufferRef m_particleGeometryContactRadiusBuffer
Render trimesh/height field.
Definition: RenderManager.h:77
virtual CapsuleProxy * createCapsule(float radius, float height)=0
Interface for creating and returning a CapsuleProxy.
Subclass that implements a HollowTruncatedConeProxy.
void clear()
Reduce number of proxies to 0.
Class for storing RenderProxies that are currently in use.
Render particle emitters.
Definition: RenderManager.h:73
agx::ref_ptr< SpaceListener > m_listener
virtual ConeProxy * createCone(float radius, float height)=0
Interface for creating and returning a ConeProxy.
Render geometry contacts.
Definition: RenderManager.h:67
SphereProxy * create(float radius)
Create a SphereProxy without arguments.
PrimitiveCache< ConeProxy > m_coneCache
Render particle-geometry contacts.
Definition: RenderManager.h:69
Subclass that implements a TextProxy.
Abstract base class that acts as an interface and can render the data from a Graph.
Definition: Graph.h:45
PrimitiveCache< LineProxy > m_lineCache
Render contacts with high fidelity.
Definition: RenderManager.h:78
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:121
virtual HollowTruncatedConeProxy * createHollowTruncatedCone(float topRadius, float bottomRadius, float height, float thickness)=0
Interface for creating and returning a HollowTruncatedConeProxy.
agxSDK::Simulation * m_simulation
RenderProxy::RenderMode m_defaultRenderMode
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)
agxData::ValueRef m_particleGeometryContactBound
virtual TextProxy * createText(const agx::String &text, const agx::Vec3 &pos)=0
Interface for creating and returning TextProxy.
EventType
Enum for specifying a type of event which might change a RenderProxy.
double Real
Definition: Real.h:42
RenderProxy::RenderMode getDefaultRenderMode() const
AGXOSG_EXPORT osg::Geode * createText(const std::string &text, const agx::Vec3 &relPosition=agx::Vec3(0, 0, 0), const agx::Vec4f &color=agxRender::Color::Yellow(), agx::Real size=0.2)
Create a text object.
Render particle systems.
Definition: RenderManager.h:72
Subclass that implements a ConeProxy.
virtual BoxProxy * createBox(const agx::Vec3 &halfExtents)=0
Interface for creating and returning a BoxProxy.
Subclass that implements a WireShapeProxy.
Class holding rigid bodies that makes it possible to batch render these objects.
Subclass that implements a HeightfieldProxy.
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:42
Subclass that implements a LineProxy.
Render all types of contacts.
Definition: RenderManager.h:85
Subclass that implements a CylinderProxy.
PrimitiveCache< HollowTruncatedConeProxy > m_hollowTruncatedConeCache
A HeightField is a collision shape that can be created from a grid structure, like an image...
uint32_t UInt32
Definition: Integer.h:40
virtual ContactsProxy * createContacts(const agxCollide::GeometryContactPtrVector &)=0
Interface for creating and returning ContactsProxy.
PrimitiveCache(RenderManager *mgr)
Constructor.
agx::observer_ptr< agxCollide::Space > m_space
agx::observer_ptr< RenderManager > m_mgr
RenderProxy::RenderMode m_defaultRenderMode
Flags
Flags for specifying what is enabled in the debug rendering system.
Definition: RenderManager.h:64
PrimitiveCache< TextProxy > m_textCache