AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
agxRender/RenderProxy.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXRENDER_RENDERPROXY_H
18#define AGXRENDER_RENDERPROXY_H
19
20
22#include <agx/DynamicsSystem.h>
23
24namespace 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
42namespace agxSDK
43{
44 class Simulation;
45}
46
47namespace agxRender
48{
50
55 {
56 public:
57
68
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
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
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
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:
213 TextProxy( const agx::String& text, const agx::Vec3& pos );
214
215 void set( const agx::String& text, const agx::Vec3& pos );
216
218
220
221 protected:
222 virtual ~TextProxy() = default;
223
224 protected:
226 };
227
228
231 {
232 public:
234 SphereProxy( float radius );
235
236 void set( float radius );
237
238 float getRadius() const;
239
242
243 protected:
244 virtual ~SphereProxy() = default;
245
246 protected:
248
249 protected:
250 float m_radius;
251 };
252
253
256 {
257 public:
259 PlaneProxy( const agx::Vec3& normal, agx::Real distance );
260
261 void set( const agx::Vec3& normal, agx::Real distance );
262
265
267
269
270 protected:
271 virtual ~PlaneProxy() = default;
272
273 protected:
275
276 protected:
279 };
280
281
284 {
285 public:
287 LineProxy( const agx::Vec3& p1, const agx::Vec3& p2 );
288
289 void set( const agx::Vec3& p1, const agx::Vec3& p2 );
290
292
294
297
298 protected:
299 virtual ~LineProxy() = default;
300
301 protected:
303
304 protected:
307 };
308
309
312 {
313 public:
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
329
330 protected:
331 virtual ~CylinderProxy() {}
332
333 protected:
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
365
366 protected:
367 virtual ~HollowCylinderProxy() = default;
368
369 protected:
371
372 protected:
373 float m_height;
374 float m_radius;
376 };
377
378
381 {
382 public:
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
398
399 protected:
400 virtual ~ConeProxy() = default;
401
402 protected:
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
440
441 protected:
443
444 protected:
446
447 protected:
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
494
495 protected:
496 virtual ~HollowTruncatedConeProxy() = default;
497
498 protected:
500
501 protected:
504 float m_height;
506 };
507
508
511 {
512 public:
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
530
531 protected:
532 virtual ~CapsuleProxy() = default;
533
534 protected:
536
537 protected:
538 float m_height;
539 float m_radius;
540 };
541
542
545 {
546 public:
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
580
581
584
587
588 protected:
589 virtual ~WireShapeProxy() = default;
590
591 protected:
593
594 protected:
597 float m_height;
598 float m_radius;
599 };
600
601
604 {
605 public:
607 BoxProxy( const agx::Vec3& halfExtents );
608
610 void set( const agx::Vec3& halfExtents );
611
613
616
617 protected:
618 virtual ~BoxProxy() {}
619
620 protected:
622
623 protected:
625 };
626
627
630 {
631 public:
634
636
642 void setHeights(const agx::Vec2iVector& modifiedIndices, const agx::RealVector& heights);
643
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:
665
667
669
670 protected:
671 virtual ~TrimeshProxy() {}
672 };
673
674
679 {
680 public:
682
683 void set( const agxCollide::GeometryContactPtrVector& contacts, float scale );
684
686
687 protected:
688 virtual ~ContactsProxy() {}
689
690 protected:
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:
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
739 {
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
828 inline void RenderProxy::setTransform( const agx::AffineMatrix4x4& transform )
829 {
830 m_transform = transform;
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;
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;
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;
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;
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
924
926 {
927 return agx::Vec3f( radius, radius, (float)startPoint.distance( endPoint ) );
928 }
929
934}
935
936#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXPHYSICS_EXPORT
A box shape for geometric intersection tests.
Definition Box.h:33
Implements a Capsule shape for geometric intersection tests.
Definition Capsule.h:35
A right circular cone shape for geometric intersection tests.
Definition Cone.h:49
A cylinder shape for geometric intersection tests.
Definition Cylinder.h:37
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
A HeightField is a collision shape that can be created from a grid structure, like an image.
A right circular hollow cone shape for geometric intersection tests.
Definition HollowCone.h:46
A hollow cylinder shape for geometric intersection tests.
A line shape for intersection tests, mostly for depth sensing and picking.
Base class for a shape.
Definition Shape.h:54
A sphere class for geometric intersection tests.
Definition Sphere.h:32
Triangle mesh for geometric intersection tests.
Definition Trimesh.h:43
Internal class used by agxWire::Wire.
Definition WireShape.h:44
Subclass that implements a BoxProxy.
BoxProxy(const agx::Vec3 &halfExtents)
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
void set(const agx::Vec3 &halfExtents)
Set the size of the box, will trigger onChange(SHAPE)
agx::Vec3 getHalfExtents() const
const agxCollide::Box * getCastShape() const
Subclass that implements a CapsuleProxy.
CapsuleProxy(float radius, float height)
CapsuleProxy(const agx::Vec3 &begin, const agx::Vec3 &end, float radius)
float getRadius() const
void set(float radius, float height)
float getHeight() const
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
virtual ~CapsuleProxy()=default
void set(const agx::Vec3 &begin, const agx::Vec3 &end, float radius)
const agxCollide::Capsule * getCastShape() const
Subclass that implements a ConeProxy.
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
virtual ~ConeProxy()=default
float getHeight() const
void set(const agx::Vec3 &begin, const agx::Vec3 &end, float radius)
void set(float radius, float height)
ConeProxy(const agx::Vec3 &begin, const agx::Vec3 &end, float radius)
ConeProxy(float radius, float height)
float getRadius() const
const agxCollide::Cone * getCastShape() const
Class holding contacts that makes it possible to batch render these objects.
const agxCollide::GeometryContactPtrVector * m_contacts
void set(const agxCollide::GeometryContactPtrVector &contacts, float scale)
const agxCollide::GeometryContactPtrVector & getContacts() const
ContactsProxy(const agxCollide::GeometryContactPtrVector &contacts)
Subclass that implements a CylinderProxy.
CylinderProxy(const agx::Vec3 &begin, const agx::Vec3 &end, float radius)
void set(const agx::Vec3 &begin, const agx::Vec3 &end, float radius)
void set(float radius, float height)
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
const agxCollide::Cylinder * getCastShape() const
CylinderProxy(float radius, float height)
Subclass that implements a HeightfieldProxy.
void setHeights(const agx::Vec2iVector &modifiedIndices, const agx::RealVector &heights)
Set specified heights of a Heightfield.
HeightFieldProxy & operator=(const HeightFieldProxy &)=delete
virtual void set(const agx::Vec2iVector &modifiedIndices, const agx::RealVector &heights)=0
Override this method to support changing a selection of indices in the heightfield.
HeightFieldProxy(agxCollide::HeightField *hf)
virtual ~HeightFieldProxy()=default
Destructor.
const agxCollide::HeightField * getCastShape() const
Subclass that implements a CylinderProxy.
void set(float radius, float height, float thickness)
HollowCylinderProxy(const agx::Vec3 &begin, const agx::Vec3 &end, float radius, float thickness)
HollowCylinderProxy(float radius, float height, float thickness)
void set(const agx::Vec3 &begin, const agx::Vec3 &end, float radius, float thickness)
virtual ~HollowCylinderProxy()=default
const agxCollide::HollowCylinder * getCastShape() const
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
Subclass that implements a HollowTruncatedConeProxy.
HollowTruncatedConeProxy(float topRadius, float bottomRadius, float height, float thickness)
void set(const agx::Vec3 &top, const agx::Vec3 &bottom, float topRadius, float bottomRadius, float thickness)
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
void set(float topRadius, float bottomRadius, float height, float thickness)
virtual ~HollowTruncatedConeProxy()=default
HollowTruncatedConeProxy(const agx::Vec3 &begin, const agx::Vec3 &end, float topRadius, float bottomRadius, float thickness)
const agxCollide::HollowCone * getCastShape() const
Subclass that implements a LineProxy.
LineProxy(const agx::Vec3 &p1, const agx::Vec3 &p2)
agx::Vec3 getP2() const
agx::Vec3 getP1() const
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
const agxCollide::Line * getCastShape() const
void set(const agx::Vec3 &p1, const agx::Vec3 &p2)
virtual ~LineProxy()=default
Subclass that implements a PlaneProxy.
const agxCollide::Plane * getCastShape() const
agx::Real getDistance() const
void set(const agx::Vec3 &normal, agx::Real distance)
PlaneProxy(const agx::Vec3 &normal, agx::Real distance)
agx::Vec3 getNormal() const
virtual ~PlaneProxy()=default
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
Class for managing the rendering of geometries, shapes, rigid bodies, constraints etc.
Abstract base class which encapsulated information for rendering a specific shape.
virtual float getAlpha() const
virtual void setAlpha(float alpha)
Set the alpha value of this proxy.
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.
const agxCollide::Geometry * getGeometry() const
virtual agx::Vec3 getColor() const
void setModifiedCount(agx::UInt32 c)
agx::UInt32 getModifiedCount() const
This value tells us that if the proxy is synchronized with the associated shape.
virtual ~RenderProxy()
Destructor.
void setEnable(bool flag)
Toggle this proxy for rendering on/off.
virtual void onChange(EventType)
Pure virtual method that should response on the different events.
RenderMode getRenderMode() const
agx::AffineMatrix4x4 m_transform
virtual void updateShape()
Called when a Shape has been changed (for example radius on a sphere is changed).
virtual void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
void setShape(agxCollide::Shape *shape, const agxCollide::Geometry *geometry)
Set the shape for this proxy.
void callOnChange(EventType type)
Explicitly fires event of type.
virtual void reset()
Will reset color, alpha and enabled state back to default state (as when initially created).
virtual void setTransform(const agx::AffineMatrix4x4 &transform)
Set the transform of this RenderProxy, if overridden, set the m_transform and call onUpdate(TRANSFORM...
virtual void setColor(const agx::Vec3 &color)
Set the color of this proxy.
const agx::AffineMatrix4x4 & getTransform() const
const agxCollide::Shape * getShape() const
bool compare() const
Compare the modified count with its associated shape.
static agx::Bool shouldRender(const agx::RigidBody *rb)
EventType
Enum for specifying a type of event which might change a RenderProxy.
@ COLOR
The color value for a proxy is updated.
@ ENABLE
A RenderProxy is enabled/disabled.
@ REMOVE
The Shape has been removed from space, need to be removed from rendering.
@ RENDERMODE
The RenderMode has been changed.
@ ALPHA
The alpha value for a proxy is updated.
@ TRANSFORM
The transformation for a proxy is updated.
@ SHAPE
The Shape has been modified a rebuild is needed.
agx::observer_ptr< agxCollide::Shape > m_shape
RenderProxy(agxCollide::Shape *shape=nullptr)
Constructor.
void setRenderMode(RenderMode mode)
Set the render mode for this Proxy.
Class holding rigid bodies that makes it possible to batch render these objects.
agx::Vector< const agx::RigidBody * > Container
virtual ~RigidBodyBatchRenderProxy()=default
void set(const agx::RigidBodyPtrSetVector *enabledBodies, float scale)
agxRender::RigidBodyBatchRenderProxy::Container m_bodies
Subclass that implements a SphereProxy.
virtual ~SphereProxy()=default
float getRadius() const
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
const agxCollide::Sphere * getCastShape() const
void set(float radius)
SphereProxy(float radius)
Subclass that implements a TextProxy.
TextProxy(const agx::String &text, const agx::Vec3 &pos)
void set(const agx::String &text, const agx::Vec3 &pos)
agx::Vec3 getPosition() const
virtual ~TextProxy()=default
agx::String getText() const
Subclass that implements a TrimeshProxy.
TrimeshProxy & operator=(const TrimeshProxy &)=delete
TrimeshProxy(agxCollide::Trimesh *mesh)
const agxCollide::Trimesh * getCastShape() const
Subclass that implements a TruncatedConeProxy.
TruncatedConeProxy(const agx::Vec3 &begin, const agx::Vec3 &end, float topRadius, float bottomRadius)
TruncatedConeProxy(float topRadius, float bottomRadius, float height)
void set(const agx::Vec3 &top, const agx::Vec3 &bottom, float topRadius, float bottomRadius)
void set(float topRadius, float bottomRadius, float height)
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
const agxCollide::Cone * getCastShape() const
void addNode(const agx::Vec3 &point)
Node with default color (lumped node).
virtual void onAddNotification()
Called when the wire is added to the simulation.
void commit()
Commit the current state to the renderer.
agx::VectorPOD< SphereDef > SphereDefContainer
agx::VectorPOD< SegmentDef > SegmentDefContainer
void addSegment(const agx::Vec3 &startPoint, const agx::Vec3 &endPoint, const agx::Vec3 &prevStartPoint, const agx::Vec3 &prevEndPoint)
Add segment with global radius and color.
void addSegment(const agx::Vec3 &startPoint, const agx::Vec3 &endPoint, float radius, const agx::Vec3 &color, agxRender::RenderManager *manager) const
Slow, non-batch-rendered, segment.
void addNode(const agx::Vec3 &point, float radius, const agx::Vec3 &color, agxRender::RenderManager *manager) const
Node with different color and/or size.
void prepare(agx::UInt numSegmentEstimate, agx::UInt numEdgesEstimate, agx::UInt numNodesEstimate)
Prepare buffers.
void addEdge(const agx::Vec3 &startPoint, const agx::Vec3 &endPoint)
Edges are always red and same radius as others.
virtual void onRemoveNotification()
Called when the wire is removed from the simulation.
WireRenderProxy(float radius, const agx::Vec3 &color)
Subclass that implements a WireShapeProxy.
void set(float radius, float height, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1)
void set(float radius, float height)
virtual ~WireShapeProxy()=default
void set(const agx::Vec3 &begin, const agx::Vec3 &end, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1, float radius)
agx::Vec3 getPreviousEndPoint1() const
agx::Vec3 getPreviousEndPoint0() const
const agxCollide::WireShape * getCastShape() const
void synchronizeParameters()
This method should be implemented so that it extracts size parameters from an associated shape and st...
WireShapeProxy(const agx::Vec3 &begin, const agx::Vec3 &end, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1, float radius)
WireShapeProxy(float radius, float height, const agx::Vec3 &previousEndPoint0, const agx::Vec3 &previousEndPoint1)
static AffineMatrix4x4T< Real > rotate(const Vec3T< Real > &from, const Vec3T< Real > &to)
Return a matrix which rotate a vector from from to to.
static AffineMatrix4x4T< Real > translate(const Vec3T< Real > &dv)
Return a matrix which translates according to dv.
Base class providing referencing counted objects.
Definition Referenced.h:120
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
static Vec3T Z_AXIS()
Vector containing 'raw' data.
Definition agx/Vector.h:246
Templated vector class.
Definition agx/Vector.h:53
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Namespace containing classes for handling debug rendering of collision geometries,...
Definition Constraint.h:36
agx::ref_ptr< WireRenderProxy > WireRenderProxyRef
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition Constraint.h:31
int32_t Int32
Definition Integer.h:37
uint32_t UInt32
Definition Integer.h:32
PlaneT< agx::Real > Plane
Definition agx/Plane.h:121
bool Bool
Definition Integer.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42
LineT< Vec3 > Line
Definition agx/Line.h:39
Vec3T< Real32 > Vec3f
Definition agx/Vec3.h:39
AGXPHYSICS_EXPORT agx::Bool equivalent(const agx::AddedMassInteraction::Matrix6x6 &lhs, const agx::AddedMassInteraction::Matrix6x6 &rhs, agx::Real eps=agx::RealEpsilon)
SegmentDef(const agx::Vec3 &sp, const agx::Vec3 &ep, float r)
agx::AffineMatrix4x4 getTransform() const