AGX Dynamics  2.38.0.2
agxRender/RenderProxy.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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_RENDERPROXY_H
18 #define AGXRENDER_RENDERPROXY_H
19 
20 
21 #include <agx/agxPhysics_export.h>
22 #include <agx/DynamicsSystem.h>
23 
24 namespace agxCollide
25 {
26  class Shape;
27  class Geometry;
28  class Sphere;
29  class Box;
30  class HeightField;
31  class Line;
32  class Cylinder;
33  class HollowCylinder;
34  class Capsule;
35  class Cone;
36  class HollowCone;
37  class Trimesh;
38  class Plane;
39  class WireShape;
40 }
41 
42 namespace agxSDK
43 {
44  class Simulation;
45 }
46 
47 namespace agxRender
48 {
50 
55  {
56  public:
57 
59  enum EventType {
66  RENDERMODE
67  };
68 
69  enum RenderMode {
70  NOT_SET = 0x0,
71  SOLID = 0x1,
72  WIREFRAME = 0x2
73  };
74 
76  RenderProxy( agxCollide::Shape* shape = nullptr );
77 
79  virtual void setTransform( const agx::AffineMatrix4x4& transform );
80 
84  virtual void setColor( const agx::Vec3& color );
85 
89  virtual agx::Vec3 getColor() const;
90 
94  virtual void setAlpha( float alpha );
95 
97  virtual float getAlpha() const;
98 
102  virtual void updateShape() {}
103 
104 
106  const agx::AffineMatrix4x4& getTransform() const;
107 
114  agx::UInt32 getModifiedCount() const;
115 
116  const agxCollide::Shape* getShape() const;
117  const agxCollide::Geometry* getGeometry() const;
118 
120  bool compare() const;
121 
126  void callOnChange( EventType type );
127 
132  void setEnable( bool flag );
133 
135  bool getEnable() const;
136 
138  inline bool isEnabled() const { return getEnable(); }
139 
144  void setRenderMode( RenderMode mode );
145 
147  RenderMode getRenderMode() const;
148 
150  virtual void reset();
151 
155  static agx::Bool shouldRender( const agx::RigidBody* rb );
156 
157  protected:
161  virtual void synchronizeParameters() {}
162 
168  virtual void onChange( EventType /*type*/ ) {}
169 
170  friend class RenderManager;
171  void setModifiedCount( agx::UInt32 c );
172 
174  void setShape( agxCollide::Shape* shape, const agxCollide::Geometry *geometry );
175 
177  virtual ~RenderProxy();
178 
189  void setBeginToEndTransform( const agx::Vec3& begin,
190  const agx::Vec3& end,
191  float& retHeight,
192  bool signalShapeChanged,
193  bool offsetHalfHeight = true );
194 
197 
198  private:
199  const agxCollide::Geometry* m_geometry;
200  agx::UInt32 m_modifiedCount;
201  float m_alpha;
202  agx::Vec3 m_color;
203  bool m_enable;
204  agx::Int32 m_renderMode;
205  };
206 
207 
210  {
211  public:
212  TextProxy();
213  TextProxy( const agx::String& text, const agx::Vec3& pos );
214 
215  void set( const agx::String& text, const agx::Vec3& pos );
216 
217  agx::String getText() const;
218 
219  agx::Vec3 getPosition() const;
220 
221  protected:
222  virtual ~TextProxy() = default;
223 
224  protected:
226  };
227 
228 
231  {
232  public:
233  SphereProxy();
234  SphereProxy( float radius );
235 
236  void set( float radius );
237 
238  float getRadius() const;
239 
241  const agxCollide::Sphere* getCastShape() const;
242 
243  protected:
244  virtual ~SphereProxy() = default;
245 
246  protected:
247  void synchronizeParameters();
248 
249  protected:
250  float m_radius;
251  };
252 
253 
256  {
257  public:
258  PlaneProxy();
259  PlaneProxy( const agx::Vec3& normal, agx::Real distance );
260 
261  void set( const agx::Vec3& normal, agx::Real distance );
262 
264  const agxCollide::Plane* getCastShape() const;
265 
266  agx::Vec3 getNormal() const;
267 
268  agx::Real getDistance() const;
269 
270  protected:
271  virtual ~PlaneProxy() = default;
272 
273  protected:
274  void synchronizeParameters();
275 
276  protected:
279  };
280 
281 
284  {
285  public:
286  LineProxy();
287  LineProxy( const agx::Vec3& p1, const agx::Vec3& p2 );
288 
289  void set( const agx::Vec3& p1, const agx::Vec3& p2 );
290 
291  agx::Vec3 getP1() const;
292 
293  agx::Vec3 getP2() const;
294 
296  const agxCollide::Line* getCastShape() const;
297 
298  protected:
299  virtual ~LineProxy() = default;
300 
301  protected:
302  void synchronizeParameters();
303 
304  protected:
307  };
308 
309 
312  {
313  public:
314  CylinderProxy();
315  CylinderProxy( float radius, float height );
316  CylinderProxy( const agx::Vec3& begin, const agx::Vec3& end, float radius );
317 
318  void set( float radius, float height );
319  void set( const agx::Vec3& begin, const agx::Vec3& end, float radius );
320 
322  float getRadius() const;
323 
325  float getHeight() const;
326 
328  const agxCollide::Cylinder* getCastShape() const;
329 
330  protected:
331  virtual ~CylinderProxy() {}
332 
333  protected:
334  void synchronizeParameters();
335 
336  protected:
337  float m_height;
338  float m_radius;
339  };
340 
341 
344  {
345  public:
347  HollowCylinderProxy( float radius, float height, float thickness );
348  HollowCylinderProxy( const agx::Vec3& begin, const agx::Vec3& end, float radius, float thickness );
349 
350  void set( float radius, float height, float thickness );
351 
352  void set( const agx::Vec3& begin, const agx::Vec3& end, float radius, float thickness );
353 
355  float getRadius() const;
356 
358  float getHeight() const;
359 
361  float getThickness() const;
362 
364  const agxCollide::HollowCylinder* getCastShape() const;
365 
366  protected:
367  virtual ~HollowCylinderProxy() = default;
368 
369  protected:
370  void synchronizeParameters();
371 
372  protected:
373  float m_height;
374  float m_radius;
375  float m_thickness;
376  };
377 
378 
381  {
382  public:
383  ConeProxy();
384  ConeProxy( float radius, float height );
385  ConeProxy( const agx::Vec3& begin, const agx::Vec3& end, float radius );
386 
387  void set( float radius, float height );
388  void set( const agx::Vec3& begin, const agx::Vec3& end, float radius );
389 
391  float getRadius() const;
392 
394  float getHeight() const;
395 
397  const agxCollide::Cone* getCastShape() const;
398 
399  protected:
400  virtual ~ConeProxy() = default;
401 
402  protected:
403  void synchronizeParameters();
404 
405  protected:
406  float m_radius;
407  float m_height;
408  };
409 
410 
413  {
414  public:
416  TruncatedConeProxy( float topRadius, float bottomRadius, float height );
418  const agx::Vec3& end,
419  float topRadius,
420  float bottomRadius );
421 
422  void set( float topRadius, float bottomRadius, float height );
423 
424  void set( const agx::Vec3& top,
425  const agx::Vec3& bottom,
426  float topRadius,
427  float bottomRadius );
428 
430  float getTopRadius() const;
431 
433  float getBottomRadius() const;
434 
436  float getHeight() const;
437 
439  const agxCollide::Cone* getCastShape() const;
440 
441  protected:
442  virtual ~TruncatedConeProxy() {}
443 
444  protected:
445  void synchronizeParameters();
446 
447  protected:
448  float m_topRadius;
450  float m_height;
451  };
452 
455  {
456  public:
457 
459  HollowTruncatedConeProxy( float topRadius,
460  float bottomRadius,
461  float height,
462  float thickness );
464  const agx::Vec3& end,
465  float topRadius,
466  float bottomRadius,
467  float thickness );
468 
469  void set( float topRadius,
470  float bottomRadius,
471  float height,
472  float thickness );
473 
474  void set( const agx::Vec3& top,
475  const agx::Vec3& bottom,
476  float topRadius,
477  float bottomRadius,
478  float thickness );
479 
481  float getTopRadius() const;
482 
484  float getBottomRadius() const;
485 
487  float getHeight() const;
488 
490  float getThickness() const;
491 
493  const agxCollide::HollowCone* getCastShape() const;
494 
495  protected:
496  virtual ~HollowTruncatedConeProxy() = default;
497 
498  protected:
499  void synchronizeParameters();
500 
501  protected:
502  float m_topRadius;
504  float m_height;
505  float m_thickness;
506  };
507 
508 
511  {
512  public:
513  CapsuleProxy();
514  CapsuleProxy( float radius, float height );
515  CapsuleProxy( const agx::Vec3& begin, const agx::Vec3& end, float radius );
516 
517  void set( float radius, float height );
518 
519  void set( const agx::Vec3& begin, const agx::Vec3& end, float radius );
520 
521 
523  float getRadius() const;
524 
526  float getHeight() const;
527 
529  const agxCollide::Capsule* getCastShape() const;
530 
531  protected:
532  virtual ~CapsuleProxy() = default;
533 
534  protected:
535  void synchronizeParameters();
536 
537  protected:
538  float m_height;
539  float m_radius;
540  };
541 
542 
545  {
546  public:
547  WireShapeProxy();
548  WireShapeProxy( float radius,
549  float height,
550  const agx::Vec3& previousEndPoint0,
551  const agx::Vec3& previousEndPoint1 );
553  const agx::Vec3& end,
554  const agx::Vec3& previousEndPoint0,
555  const agx::Vec3& previousEndPoint1,
556  float radius );
557 
558  void set( float radius, float height );
559 
560  void set( float radius,
561  float height,
562  const agx::Vec3& previousEndPoint0,
563  const agx::Vec3& previousEndPoint1 );
564 
565  void set( const agx::Vec3& begin,
566  const agx::Vec3& end,
567  const agx::Vec3& previousEndPoint0,
568  const agx::Vec3& previousEndPoint1,
569  float radius );
570 
571 
573  float getRadius() const;
574 
576  float getHeight() const;
577 
579  agx::Vec3 getPreviousEndPoint0() const;
580 
581 
583  agx::Vec3 getPreviousEndPoint1() const;
584 
586  const agxCollide::WireShape* getCastShape() const;
587 
588  protected:
589  virtual ~WireShapeProxy() = default;
590 
591  protected:
592  void synchronizeParameters();
593 
594  protected:
597  float m_height;
598  float m_radius;
599  };
600 
601 
604  {
605  public:
606  BoxProxy();
607  BoxProxy( const agx::Vec3& halfExtents );
608 
610  void set( const agx::Vec3& halfExtents );
611 
612  agx::Vec3 getHalfExtents() const;
613 
615  const agxCollide::Box* getCastShape() const;
616 
617  protected:
618  virtual ~BoxProxy() {}
619 
620  protected:
621  void synchronizeParameters();
622 
623  protected:
625  };
626 
627 
630  {
631  public:
634 
635  HeightFieldProxy& operator=( const HeightFieldProxy& ) = delete;
636 
642  void setHeights(const agx::Vec2iVector& modifiedIndices, const agx::RealVector& heights);
643 
645  const agxCollide::HeightField* getCastShape() const;
646 
647  protected:
649  virtual ~HeightFieldProxy() = default;
650 
655  virtual void set( const agx::Vec2iVector& modifiedIndices, const agx::RealVector& heights ) = 0;
656  };
657 
658 
661  {
662  public:
663  TrimeshProxy();
665 
666  TrimeshProxy& operator=( const TrimeshProxy& ) = delete;
667 
668  const agxCollide::Trimesh* getCastShape() const;
669 
670  protected:
671  virtual ~TrimeshProxy() {}
672  };
673 
674 
679  {
680  public:
682 
683  void set( const agxCollide::GeometryContactPtrVector& contacts, float scale );
684 
685  const agxCollide::GeometryContactPtrVector& getContacts() const;
686 
687  protected:
688  virtual ~ContactsProxy() {}
689 
690  protected:
691  ContactsProxy();
692 
693  protected:
695  float m_scale;
696  };
697 
698 
703  {
704  public:
706 
707  public:
709 
710  void set( const agx::RigidBodyPtrSetVector* enabledBodies, float scale );
711 
712  protected:
713  virtual ~RigidBodyBatchRenderProxy() = default;
714 
715  protected:
717  float m_scale;
718  };
719 
721  {
722  public:
723  struct SegmentDef
724  {
725  SegmentDef( const agx::Vec3& sp, const agx::Vec3& ep, float r )
726  : startPoint( sp ), endPoint( ep ), radius( r ) {}
727 
728  const SegmentDef* operator->() const { return this; }
729 
730  agx::AffineMatrix4x4 getTransform() const;
731  agx::Vec3f getScale() const;
732 
735  float radius;
736  };
737 
738  struct SphereDef
739  {
740  SphereDef( const agx::Vec3& p )
741  : point( p ) {}
742 
743  const SphereDef* operator->() const { return this; }
744  agx::AffineMatrix4x4 getTransform() const;
745 
747  };
748 
751 
752  public:
753  WireRenderProxy( float radius, const agx::Vec3& color );
754 
758  virtual void onAddNotification() {}
759 
763  virtual void onRemoveNotification() {}
764 
768  void prepare( agx::UInt numSegmentEstimate,
769  agx::UInt numEdgesEstimate,
770  agx::UInt numNodesEstimate );
771 
775  void commit();
776 
780  void addSegment( const agx::Vec3& startPoint,
781  const agx::Vec3& endPoint,
782  const agx::Vec3& prevStartPoint,
783  const agx::Vec3& prevEndPoint );
784 
788  void addSegment( const agx::Vec3& startPoint,
789  const agx::Vec3& endPoint,
790  float radius,
791  const agx::Vec3& color,
792  agxRender::RenderManager* manager ) const;
793 
797  void addEdge( const agx::Vec3& startPoint, const agx::Vec3& endPoint );
798 
802  void addNode( const agx::Vec3& point );
803 
807  void addNode( const agx::Vec3& point,
808  float radius,
809  const agx::Vec3& color,
810  agxRender::RenderManager* manager ) const;
811 
812  protected:
813  virtual ~WireRenderProxy() {}
814 
815  protected:
816  float m_radius;
820  };
821 
823 
824  // -------- Implementation ----------------
825 
826  //inline PrimitiveType RenderProxy::getType() const { return m_type; }
827 
829  {
832  }
833 
835  {
836  return m_transform;
837  }
838 
839  inline void RenderProxy::setColor( const agx::Vec3& color )
840  {
841  if ( !agx::equivalent( m_color, color ) ) {
842  m_color = color;
843  callOnChange( COLOR );
844  }
845  }
846 
848  {
849  return m_color;
850  }
851 
852  inline void RenderProxy::setAlpha( float alpha )
853  {
854 
855  if ( !agx::equivalent( m_alpha, alpha ) ) {
856  m_alpha = alpha;
857  callOnChange( ALPHA );
858  }
859  }
860 
861  inline float RenderProxy::getAlpha() const
862  {
863  return m_alpha;
864  }
865 
867  {
868  m_modifiedCount = c;
869  }
870 
872  {
873  return m_modifiedCount;
874  }
875 
876  inline void RenderProxy::setShape( agxCollide::Shape* shape, const agxCollide::Geometry* geometry )
877  {
878  m_shape = shape;
879  m_geometry = geometry;
880  setModifiedCount( agx::UInt32( -1 ) );
881  }
882 
884  {
885  return m_shape;
886  }
887 
889  {
890  return m_geometry;
891  }
892 
893  inline void RenderProxy::setEnable( bool flag )
894  {
895  if ( m_enable != flag )
896  {
897  m_enable = flag;
898  callOnChange( ENABLE );
899  }
900  }
901 
902  inline bool RenderProxy::getEnable() const
903  {
904  return m_enable;
905  }
906 
908  {
909  if ( mode != m_renderMode ) {
910  m_renderMode = (RenderMode)mode;
912  }
913  }
914 
916  {
917  return (RenderMode)m_renderMode;
918  }
919 
921  {
923  }
924 
926  {
927  return agx::Vec3f( radius, radius, (float)startPoint.distance( endPoint ) );
928  }
929 
931  {
932  return agx::AffineMatrix4x4::translate( point );
933  }
934 }
935 
936 #endif
agxCollide::Box
A box shape for geometric intersection tests.
Definition: Box.h:32
agxPhysics_export.h
agxRender::RenderProxy::updateShape
virtual void updateShape()
Called when a Shape has been changed (for example radius on a sphere is changed).
Definition: agxRender/RenderProxy.h:102
agxRender::WireRenderProxy::SegmentDef::startPoint
agx::Vec3 startPoint
Definition: agxRender/RenderProxy.h:733
agxRender::RenderProxy::setRenderMode
void setRenderMode(RenderMode mode)
Set the render mode for this Proxy.
Definition: agxRender/RenderProxy.h:907
agxRender::RenderProxy::callOnChange
void callOnChange(EventType type)
Explicitly fires event of type.
agx::UInt
uint64_t UInt
Definition: Integer.h:27
agx::end
LinearProbingHashSetImplementation< KeyT, HashT >::iterator end(LinearProbingHashSetImplementation< KeyT, HashT > &set)
Definition: LinearProbingHashSet.h:593
agxRender::WireShapeProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:598
agxRender::RenderProxy::COLOR
@ COLOR
The color value for a proxy is updated.
Definition: agxRender/RenderProxy.h:63
agxRender::RenderProxy::EventType
EventType
Enum for specifying a type of event which might change a RenderProxy.
Definition: agxRender/RenderProxy.h:59
agxCollide::Capsule
Implements a Capsule shape for geometric intersection tests.
Definition: Capsule.h:34
agxRender::HollowCylinderProxy::m_thickness
float m_thickness
Definition: agxRender/RenderProxy.h:375
agxRender::WireRenderProxy::SegmentDef
Definition: agxRender/RenderProxy.h:723
agx::Real
double Real
Definition: Real.h:42
agxCollide::Cylinder
A cylinder shape for geometric intersection tests.
Definition: Cylinder.h:36
agx::equivalent
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
agxRender::WireRenderProxy::onAddNotification
virtual void onAddNotification()
Called when the wire is added to the simulation.
Definition: agxRender/RenderProxy.h:758
agxData::transform
void AGXCORE_EXPORT transform(void *target, const Format *targetFormat, const void *source, const Format *sourceFormat, size_t numElements)
Transform data between two buffers.
agxRender::RenderProxy::setEnable
void setEnable(bool flag)
Toggle this proxy for rendering on/off.
Definition: agxRender/RenderProxy.h:893
agxRender
Namespace containing classes for handling debug rendering of collision geometries,...
Definition: Constraint.h:35
agxRender::HollowTruncatedConeProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:504
agxCollide::Sphere
A sphere class for geometric intersection tests.
Definition: Sphere.h:31
agx::Vector< const agx::RigidBody * >
agx::AffineMatrix4x4T< Real >::rotate
static AffineMatrix4x4T< Real > rotate(const Vec3T< Real > &from, const Vec3T< Real > &to)
Return a matrix which rotate a vector from from to to.
Definition: AffineMatrix4x4.h:679
agxRender::BoxProxy::~BoxProxy
virtual ~BoxProxy()
Definition: agxRender/RenderProxy.h:618
agxRender::WireRenderProxy::SegmentDef::getScale
agx::Vec3f getScale() const
Definition: agxRender/RenderProxy.h:925
agxRender::RenderProxy::m_transform
agx::AffineMatrix4x4 m_transform
Definition: agxRender/RenderProxy.h:196
agxCollide::Plane
Definition: ollide/Plane.h:34
agxRender::CapsuleProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:538
agxRender::ConeProxy
Subclass that implements a ConeProxy.
Definition: agxRender/RenderProxy.h:380
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:51
agxRender::HollowTruncatedConeProxy::m_topRadius
float m_topRadius
Definition: agxRender/RenderProxy.h:502
agxRender::RenderProxy::ENABLE
@ ENABLE
A RenderProxy is enabled/disabled.
Definition: agxRender/RenderProxy.h:60
agxRender::RenderProxy::RENDERMODE
@ RENDERMODE
The RenderMode has been changed.
Definition: agxRender/RenderProxy.h:66
agx::AffineMatrix4x4T< Real >::translate
static AffineMatrix4x4T< Real > translate(const Vec3T< Real > &dv)
Return a matrix which translates according to dv.
Definition: AffineMatrix4x4.h:663
agxRender::WireRenderProxy::SphereDef::operator->
const SphereDef * operator->() const
Definition: agxRender/RenderProxy.h:743
agxRender::RenderManager
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Definition: RenderManager.h:106
agxRender::WireRenderProxy::SphereDef::getTransform
agx::AffineMatrix4x4 getTransform() const
Definition: agxRender/RenderProxy.h:930
agxRender::WireRenderProxy::SegmentDef::SegmentDef
SegmentDef(const agx::Vec3 &sp, const agx::Vec3 &ep, float r)
Definition: agxRender/RenderProxy.h:725
agxRender::HeightFieldProxy
Subclass that implements a HeightfieldProxy.
Definition: agxRender/RenderProxy.h:629
agxRender::RenderProxy::getModifiedCount
agx::UInt32 getModifiedCount() const
This value tells us that if the proxy is synchronized with the associated shape.
Definition: agxRender/RenderProxy.h:871
agx::AffineMatrix4x4T< Real >
agxRender::RenderProxy::ALPHA
@ ALPHA
The alpha value for a proxy is updated.
Definition: agxRender/RenderProxy.h:62
agxRender::WireRenderProxy::SegmentDefContainer
agx::VectorPOD< SegmentDef > SegmentDefContainer
Definition: agxRender/RenderProxy.h:749
agxRender::CapsuleProxy
Subclass that implements a CapsuleProxy.
Definition: agxRender/RenderProxy.h:510
agxRender::ContactsProxy::m_scale
float m_scale
Definition: agxRender/RenderProxy.h:695
agxRender::LineProxy::m_p1
agx::Vec3 m_p1
Definition: agxRender/RenderProxy.h:305
agxCollide::HeightField
A HeightField is a collision shape that can be created from a grid structure, like an image.
Definition: agxCollide/HeightField.h:51
agx::Vec3T< Real >::Z_AXIS
static Vec3T Z_AXIS()
Definition: Vec3Template.h:783
agxRender::TruncatedConeProxy::~TruncatedConeProxy
virtual ~TruncatedConeProxy()
Definition: agxRender/RenderProxy.h:442
agxRender::WireRenderProxy::~WireRenderProxy
virtual ~WireRenderProxy()
Definition: agxRender/RenderProxy.h:813
agxRender::WireRenderProxy::onRemoveNotification
virtual void onRemoveNotification()
Called when the wire is removed from the simulation.
Definition: agxRender/RenderProxy.h:763
agxRender::HollowTruncatedConeProxy::m_thickness
float m_thickness
Definition: agxRender/RenderProxy.h:505
agxRender::WireRenderProxy::m_nodes
SphereDefContainer m_nodes
Definition: agxRender/RenderProxy.h:819
agxRender::TruncatedConeProxy
Subclass that implements a TruncatedConeProxy.
Definition: agxRender/RenderProxy.h:412
agxRender::BoxProxy
Subclass that implements a BoxProxy.
Definition: agxRender/RenderProxy.h:603
agxCollide::HollowCone
A right circular hollow cone shape for geometric intersection tests.
Definition: HollowCone.h:45
agxRender::RenderProxy::setTransform
virtual void setTransform(const agx::AffineMatrix4x4 &transform)
Set the transform of this RenderProxy, if overridden, set the m_transform and call onUpdate(TRANSFORM...
Definition: agxRender/RenderProxy.h:828
agxRender::CylinderProxy::~CylinderProxy
virtual ~CylinderProxy()
Definition: agxRender/RenderProxy.h:331
agx::VectorPOD
Vector containing 'raw' data.
Definition: Vector.h:245
agx::observer_ptr< agxCollide::Shape >
agxCollide::HollowCylinder
A hollow cylinder shape for geometric intersection tests.
Definition: HollowCylinder.h:44
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agxCollide::WireShape
Internal class used by agxWire::Wire.
Definition: WireShape.h:43
agxRender::RenderProxy::onChange
virtual void onChange(EventType)
Pure virtual method that should response on the different events.
Definition: agxRender/RenderProxy.h:168
agxRender::RenderProxy::getShape
const agxCollide::Shape * getShape() const
Definition: agxRender/RenderProxy.h:883
agx::begin
LinearProbingHashSetImplementation< KeyT, HashT >::iterator begin(LinearProbingHashSetImplementation< KeyT, HashT > &set)
Definition: LinearProbingHashSet.h:587
agxRender::RenderProxy::SHAPE
@ SHAPE
The Shape has been modified a rebuild is needed.
Definition: agxRender/RenderProxy.h:64
agxRender::TextProxy
Subclass that implements a TextProxy.
Definition: agxRender/RenderProxy.h:209
agxRender::CapsuleProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:539
agxRender::PlaneProxy::m_distance
agx::Real m_distance
Definition: agxRender/RenderProxy.h:277
agxRender::RenderProxy::getEnable
bool getEnable() const
Definition: agxRender/RenderProxy.h:902
agxRender::RenderProxy::REMOVE
@ REMOVE
The Shape has been removed from space, need to be removed from rendering.
Definition: agxRender/RenderProxy.h:65
agxRender::WireRenderProxy::m_segments
SegmentDefContainer m_segments
Definition: agxRender/RenderProxy.h:817
agxRender::RenderProxy::synchronizeParameters
virtual void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
Definition: agxRender/RenderProxy.h:161
agxRender::RigidBodyBatchRenderProxy
Class holding rigid bodies that makes it possible to batch render these objects.
Definition: agxRender/RenderProxy.h:702
agxRender::CylinderProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:338
agxRender::RenderProxy::RenderMode
RenderMode
Definition: agxRender/RenderProxy.h:69
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agxRender::WireRenderProxy::SphereDef::SphereDef
SphereDef(const agx::Vec3 &p)
Definition: agxRender/RenderProxy.h:740
agxIO::EventType
EventType
Definition: Events.h:37
agxRender::ConeProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:407
agxRender::HollowCylinderProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:373
agxCollide::Shape
Base class for a shape.
Definition: Shape.h:53
agx::SetVector< RigidBody * >
agxRender::HollowCylinderProxy
Subclass that implements a CylinderProxy.
Definition: agxRender/RenderProxy.h:343
agxRender::WireRenderProxy::m_edges
SegmentDefContainer m_edges
Definition: agxRender/RenderProxy.h:818
agxRender::LineProxy::m_p2
agx::Vec3 m_p2
Definition: agxRender/RenderProxy.h:306
agxRender::BoxProxy::m_halfExtents
agx::Vec3 m_halfExtents
Definition: agxRender/RenderProxy.h:624
agxRender::PlaneProxy
Subclass that implements a PlaneProxy.
Definition: agxRender/RenderProxy.h:255
agxCollide::Line
A line shape for intersection tests, mostly for depth sensing and picking.
Definition: ollide/Line.h:55
agxRender::WireShapeProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:597
agxRender::WireRenderProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:816
agxRender::RenderProxy::getRenderMode
RenderMode getRenderMode() const
Definition: agxRender/RenderProxy.h:915
agxOSG::setAlpha
AGXOSG_EXPORT void setAlpha(osg::Node *node, float alpha)
Set the alpha part of the material for a node.
agxRender::RenderProxy
Abstract base class which encapsulated information for rendering a specific shape.
Definition: agxRender/RenderProxy.h:54
agxRender::RenderProxy::getAlpha
virtual float getAlpha() const
Definition: agxRender/RenderProxy.h:861
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition: Geometry.h:91
agxRender::TruncatedConeProxy::m_bottomRadius
float m_bottomRadius
Definition: agxRender/RenderProxy.h:449
agxRender::RenderProxy::setModifiedCount
void setModifiedCount(agx::UInt32 c)
Definition: agxRender/RenderProxy.h:866
agxRender::WireRenderProxy::SphereDef
Definition: agxRender/RenderProxy.h:738
agxRender::HollowTruncatedConeProxy
Subclass that implements a HollowTruncatedConeProxy.
Definition: agxRender/RenderProxy.h:454
agxRender::TruncatedConeProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:450
agxRender::TrimeshProxy::~TrimeshProxy
virtual ~TrimeshProxy()
Definition: agxRender/RenderProxy.h:671
agxRender::CylinderProxy::m_height
float m_height
Definition: agxRender/RenderProxy.h:337
agxRender::RenderProxy::getTransform
const agx::AffineMatrix4x4 & getTransform() const
Definition: agxRender/RenderProxy.h:834
agxRender::ContactsProxy::m_contacts
const agxCollide::GeometryContactPtrVector * m_contacts
Definition: agxRender/RenderProxy.h:694
agxRender::WireRenderProxy::SphereDefContainer
agx::VectorPOD< SphereDef > SphereDefContainer
Definition: agxRender/RenderProxy.h:750
agxRender::TextProxy::m_text
agx::String m_text
Definition: agxRender/RenderProxy.h:225
agxRender::WireShapeProxy::m_previousEndPoint0
agx::Vec3 m_previousEndPoint0
Definition: agxRender/RenderProxy.h:595
agxRender::ContactsProxy::~ContactsProxy
virtual ~ContactsProxy()
Definition: agxRender/RenderProxy.h:688
agxRender::WireRenderProxy::SegmentDef::endPoint
agx::Vec3 endPoint
Definition: agxRender/RenderProxy.h:734
agxRender::HollowTruncatedConeProxy::m_bottomRadius
float m_bottomRadius
Definition: agxRender/RenderProxy.h:503
agxRender::RenderProxy::TRANSFORM
@ TRANSFORM
The transformation for a proxy is updated.
Definition: agxRender/RenderProxy.h:61
agxRender::SphereProxy
Subclass that implements a SphereProxy.
Definition: agxRender/RenderProxy.h:230
agx::Line
LineT< Vec3 > Line
Definition: Line.h:39
agxRender::CylinderProxy
Subclass that implements a CylinderProxy.
Definition: agxRender/RenderProxy.h:311
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:119
agxRender::PlaneProxy::m_normal
agx::Vec3 m_normal
Definition: agxRender/RenderProxy.h:278
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxRender::RenderProxy::m_shape
agx::observer_ptr< agxCollide::Shape > m_shape
Definition: agxRender/RenderProxy.h:195
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition: ContactForceFilterParticipant.h:22
agx::Bool
bool Bool
Definition: Integer.h:40
agxRender::TruncatedConeProxy::m_topRadius
float m_topRadius
Definition: agxRender/RenderProxy.h:448
agxRender::ConeProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:406
agxCollide::Cone
A right circular cone shape for geometric intersection tests.
Definition: Cone.h:48
agxRender::RenderProxy::getColor
virtual agx::Vec3 getColor() const
Definition: agxRender/RenderProxy.h:847
agxRender::RigidBodyBatchRenderProxy::Container
agx::Vector< const agx::RigidBody * > Container
Definition: agxRender/RenderProxy.h:705
agxRender::RigidBodyBatchRenderProxy::m_bodies
agxRender::RigidBodyBatchRenderProxy::Container m_bodies
Definition: agxRender/RenderProxy.h:716
agxRender::WireRenderProxy
Definition: agxRender/RenderProxy.h:720
agxRender::RigidBodyBatchRenderProxy::m_scale
float m_scale
Definition: agxRender/RenderProxy.h:717
agx::AgXString< std::string >
agxRender::RenderProxy::getGeometry
const agxCollide::Geometry * getGeometry() const
Definition: agxRender/RenderProxy.h:888
agxSDK
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
agxRender::WireShapeProxy::m_previousEndPoint1
agx::Vec3 m_previousEndPoint1
Definition: agxRender/RenderProxy.h:596
agxRender::RenderProxy::isEnabled
bool isEnabled() const
Definition: agxRender/RenderProxy.h:138
agxRender::WireRenderProxy::SegmentDef::radius
float radius
Definition: agxRender/RenderProxy.h:735
agxRender::WireRenderProxy::SegmentDef::getTransform
agx::AffineMatrix4x4 getTransform() const
Definition: agxRender/RenderProxy.h:920
agx::Vec3T< Real >
agxRender::WireShapeProxy
Subclass that implements a WireShapeProxy.
Definition: agxRender/RenderProxy.h:544
agxCollide::Trimesh
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:42
agxRender::RenderProxy::setShape
void setShape(agxCollide::Shape *shape, const agxCollide::Geometry *geometry)
Set the shape for this proxy.
Definition: agxRender/RenderProxy.h:876
agxRender::RenderProxy::setColor
virtual void setColor(const agx::Vec3 &color)
Set the color of this proxy.
Definition: agxRender/RenderProxy.h:839
DynamicsSystem.h
agxRender::LineProxy
Subclass that implements a LineProxy.
Definition: agxRender/RenderProxy.h:283
agx::Vec3f
Vec3T< Real32 > Vec3f
Definition: Vec3.h:39
agx::Int32
int32_t Int32
Definition: Integer.h:37
agx::UInt32
uint32_t UInt32
Definition: Integer.h:32
agxRender::HollowCylinderProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:374
agxRender::RenderProxy::setAlpha
virtual void setAlpha(float alpha)
Set the alpha value of this proxy.
Definition: agxRender/RenderProxy.h:852
agxRender::SphereProxy::m_radius
float m_radius
Definition: agxRender/RenderProxy.h:250
agxRender::WireRenderProxy::SegmentDef::operator->
const SegmentDef * operator->() const
Definition: agxRender/RenderProxy.h:728
agxRender::WireRenderProxyRef
agx::ref_ptr< WireRenderProxy > WireRenderProxyRef
Definition: agxRender/RenderProxy.h:822
agx::Plane
PlaneT< agx::Real > Plane
Definition: Plane.h:121
agxRender::TrimeshProxy
Subclass that implements a TrimeshProxy.
Definition: agxRender/RenderProxy.h:660
agxRender::WireRenderProxy::SphereDef::point
agx::Vec3 point
Definition: agxRender/RenderProxy.h:746
agxRender::ContactsProxy
Class holding contacts that makes it possible to batch render these objects.
Definition: agxRender/RenderProxy.h:678