AGX Dynamics 2.41.2.0
Loading...
Searching...
No Matches
Contacts.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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#pragma once
18
19#ifdef _MSC_VER
20# pragma warning(push)
21# pragma warning( disable : 4275 ) // warning C4275: non dll-interface class
22#endif
23
25
27#include <agx/agx.h>
28#include <agx/Referenced.h>
29#include <agx/RigidBody.h>
30#include <agx/Vec3.h>
32
33#include <agx/Material.h>
34#include <agx/Vector.h>
40
41
42namespace agxSDK
43{
44 class MaterialManager;
45}
46
47namespace agxCollide
48{
49 class Geometry;
50
51
56 {
57 public:
59 {
60 NORMAL_FORCE = 0,
62 TANGENTIAL_FORCE_V
63 };
64
66 {
67 IMPACTING = 1 << 0,
73 NONHOLONOMIC = 1 << 1
79 };
80
81 public:
86
93
100 ContactPoint(agx::Vec3 thePoint, agx::Vec3f theNormal, agx::Real theDepth);
101
103 void clear();
104
106
107#ifndef SWIG
113 agx::Real& localForce( size_t idx );
114#endif
120 agx::Real localForce( size_t idx ) const;
121
126 agx::Vec3 getForce() const;
127
131 agx::Real getForceMagnitude() const;
132
136 agx::Vec3 getNormalForce() const;
137
141 agx::Real getNormalForceMagnitude() const;
142
146 agx::Real getTangentialForceUMagnitude() const;
147
151 agx::Real getTangentialForceVMagnitude() const;
152
156 agx::Real getTangentialForceMagnitude() const;
157
161 agx::Vec3 getTangentialForce() const;
162
167 agx::UInt32& faceIndex(size_t ith);
168
173 agx::UInt32 const& faceIndex(size_t ith) const;
174
179 agx::UInt8& faceFeature(size_t ith);
180
185 agx::UInt8 const& faceFeature(size_t ith) const;
186
191 agx::Physics::Geometry::ShapePtr& shape(size_t ith);
192
197 agx::Physics::Geometry::ShapePtr const& shape(size_t ith) const;
198
207 agx::Vec3 getWitnessPoint(size_t ith) const;
208
212 agx::Bool hasState( ContactPointState contactPointState ) const;
213
220 void setIsHolonomic( agx::Bool isHolonomic );
221
226 agx::Bool isHolonomic() const;
227
231 agx::Real getYoungsModulus() const;
232
238 void setYoungsModulus( agx::Real youngsModulus );
239
243 agx::Real getFrictionCoefficient(agx::ContactMaterial::FrictionDirection direction) const;
244
253
257 agx::Real getRestitution() const;
258
264 void setRestitution(agx::Real restitution);
265
269 agx::Real getTangentialRestitution(agx::ContactMaterial::FrictionDirection direction);
270
278 void setTangentialRestitution(agx::Real restitution, agx::ContactMaterial::FrictionDirection direction = agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY);
279
283 agx::Real getTangentialCohesion( agx::ContactMaterial::FrictionDirection direction ) const;
284
292 };
293
294
300 template<typename T1, typename T2>
301 void copyContactPoint(const T1& from, T2& to)
302 {
303 to.point() = from.point();
304 to.normal() = from.normal();
305 to.depth() = from.depth();
306 to.area() = from.area();
307
308 to.velocity() = from.velocity();
309 to.enabled() = from.enabled();
310
311 to.shape1() = from.shape1();
312 to.shape2() = from.shape2();
313
314 to.faceIndex1() = from.faceIndex1();
315 to.faceIndex2() = from.faceIndex2();
316 to.faceFeature1() = from.faceFeature1();
317 to.faceFeature2() = from.faceFeature2();
318 to.state() = from.state();
319 }
320
321#ifndef SWIG
326
327
329#endif
331
336 {
337 public:
339
340 public:
343 NO_CONTACT = 0,
344 IMPACT_STATE = 1,
345 CONTACT_STATE = 2,
346 SEPARATION_STATE = 3
347 };
348
349 public:
354
360
364 void clear();
365
373 agx::Vec3f calculateRelativeVelocity( size_t pointIndex = 0 ) const;
374
382 static bool calculateSurfaceVelocity( const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2, LocalContactPoint& p );
383
391 static bool calculateSurfaceVelocity( const agxCollide::Geometry* geometry1, const agxCollide::Geometry* geometry2, ContactPoint& p );
392
397 agxCollide::Geometry* geometry( size_t ith );
398
403 const agxCollide::Geometry* geometry( size_t ith ) const;
404
410 agx::RigidBody* rigidBody( size_t ith );
411
417 const agx::RigidBody* rigidBody( size_t ith ) const;
418
420 ContactPointVector& points();
421
423 const ContactPointVector& points() const;
424
426 void* getCustomData();
427
429 const void* getCustomData() const;
430
435 void setCustomData( void* customData );
436
443 agx::ContactMaterial* getMaterial();
444
451 const agx::ContactMaterial* getMaterial() const;
452
458 const agx::ContactMaterial* getMaterial( bool ) const;
459
461 agx::UInt8 state() const;
462
465
469 void setEnable(bool flag);
470
479 int contains(agx::RigidBody * body) const;
480
489 int contains(agxCollide::Geometry * geometry) const;
490
494 bool isEnabled() const;
495
503
504
506
507
508
513 void setGeometry( size_t ith, Geometry* geom );
514
515 /***
516 When called, this contact should be removed before entering the solver
517 NOTE: Contacts are never removed, only marked as disabled
518 \param immediately - Should the contact be removed immediately
519 */
520 void markForRemoval( bool immediately );
521
527 bool shouldBeCalled() const;
528
532 void setMaterial( agx::ContactMaterial* material );
533
534 void setHasSurfaceVelocity( bool flag );
535
536 GeometryPair getGeometryPair();
537
538 void setHasInternalMaterial( bool flag );
539 bool getHasInternalMaterial( ) const;
540
541 void setState( agx::UInt8 state );
543 };
544
545
546
547 inline int GeometryContact::contains(agx::RigidBody * body) const
548 {
549 if (this->rigidBody(0) == body) return 0;
550 if (this->rigidBody(1) == body) return 1;
551 return -1;
552 }
553
555 {
556 if (this->geometry(0) == geometry) return 0;
557 if (this->geometry(1) == geometry) return 1;
558 return -1;
559 }
560
561
562
563#ifndef SWIG
564 //AGX_STATIC_ASSERT(sizeof(GeometryContact) == sizeof(agx::Physics::GeometryContactPtr));
565#endif
566
567 /* Implementation */
568 inline ContactPoint::ContactPoint() : agx::Physics::ContactPointPtr( agx::Physics::ContactPointModel::createInstance() )
569 {
570 }
571
572 inline ContactPoint::ContactPoint(agx::Physics::ContactPointPtr contact) : agx::Physics::ContactPointPtr(contact)
573 {
574 }
575
576
578 {
579 depth() = agx::Real( 0 );
580 enabled() = true;
581 point().set(0, 0, 0);
582 normal().set(0, 0, 0);
583 state() = agx::UInt8( 0 );
584 tangentU().set(0, 0, 0);
585 tangentV().set(0, 0, 0);
586 localForce().set( 0, 0, 0 );
587 velocity().set(0, 0, 0);
588 faceIndex1() = 0;
589 faceIndex2() = 0;
590 faceFeature1() = 0;
591 faceFeature2() = 0;
592 area() = agx::Real( 0 );
595 }
596
597
599 {
600 agxAssert(idx < 3);
601 return localForce()[idx];
602 }
603
604
606 {
607 agxAssert(idx < 3);
608 return localForce()[idx];
609 }
610
611
612
614 {
616 }
617
618
620 {
621 agx::Real sqr =
625 return sqr > 0 ? std::sqrt( sqr ) : 0;
626 }
627
628
630 {
631 return agx::Vec3(normal()) * localForce()[ NORMAL_FORCE ];
632 }
633
634
636 {
637 return std::abs(localForce()[ NORMAL_FORCE ]);
638 }
639
640
642 {
645 return forceU + forceV;
646 }
647
648
650 {
651 return std::abs(localForce()[ TANGENTIAL_FORCE_U ]);
652 }
653
654
656 {
657 return std::abs(localForce()[ TANGENTIAL_FORCE_V ]);
658 }
659
660
662 {
664 return sqr > 0 ? std::sqrt( sqr ) : 0;
665 }
666
668 {
669 return ( state() & contactPointState ) != 0;
670 }
671
673 {
674 return !hasState( NONHOLONOMIC );
675 }
676
678 {
679 if ( isHolonomic )
680 {
681 // remove non-holonomic bit
682 state() = (agx::UInt8)( state() & ~NONHOLONOMIC );
683 }
684 else
685 {
686 // add non-holonomic bit
687 state() |= ( agx::UInt8 )( NONHOLONOMIC );
688 }
689 }
690
692 {
693
694 }
695
697 agx::Physics::GeometryContactPtr(contact)
698
699 {
700 }
701
703 {
704 agxAssert(ith < 2);
705 if(ith == 0)
706 return geometry1().model();
707 else
708 return geometry2().model();
709 }
710
712 {
713 agxAssert(ith < 2);
714 if(ith == 0)
715 return geometry1().model();
716 else
717 return geometry2().model();
718 }
719
720 AGX_FORCE_INLINE GeometryPair GeometryContact::getGeometryPair()
721 {
722 return GeometryPair(geometry(0), geometry(1));
723 }
724
725 AGX_FORCE_INLINE void GeometryContact::setGeometry( size_t ith, Geometry* geom )
726 {
727 agxAssert(ith < 2 );
728 if(ith == 0)
729 geometry1() = geom->getEntity();
730 else
731 geometry2() = geom->getEntity();
732 }
733
735 {
736 agx::Vec3 v1, v2;
737 if (pointIndex > points().size() - 1)
738 return agx::Vec3f();
739
740 const agx::RigidBody* rb1 = geometry(0)->getRigidBody();
741 const agx::RigidBody* rb2 = geometry(1)->getRigidBody();
742
743 if (rb1)
744 v1 = rb1->getVelocity() + (rb1->getAngularVelocity() ^ (points()[pointIndex].point() - rb1->getCmPosition()));
745 if (rb2)
746 v2 = rb2->getVelocity() + (rb2->getAngularVelocity() ^ (points()[pointIndex].point() - rb2->getCmPosition()));
747
748 return static_cast<agx::Vec3f>(v1 - v2);
749 }
750
751
753 {
755 lcp.point() = p.point();
757 p.velocity() = lcp.velocity();
758 return hasSurfaceVelocity;
759 }
760
761
763 {
764 agxAssert(ith < 2 );
765 return geometry(ith)->getRigidBody();
766 }
767
769 {
770 agxAssert(ith < 2 );
771 return geometry(ith)->getRigidBody();
772 }
773
774
776 {
778 }
779
781 {
782 return reinterpret_cast<const ContactPointVector&>(agx::Physics::GeometryContactPtr::points());
783 }
784
786 {
787 return customData();
788 }
789
791 {
792 return customData();
793 }
794
795 inline void GeometryContact::setCustomData( void* customData )
796 {
797 this->customData() = customData;
798 }
799
800
801 AGX_FORCE_INLINE void GeometryContact::markForRemoval( bool immediately )
802 {
803 this->immediately() = immediately;
804 this->enabled() = false;
805 }
806
808 {
809 this->enabled() = flag;
810 }
811
813 {
814 return this->enabled();
815 }
816
817
818 AGX_FORCE_INLINE bool GeometryContact::shouldBeCalled() const
819 {
820 return !immediately();
821 }
822
824 {
825 if ( material() && material().isExplicit() )
826 return material().model();
827 return nullptr;
828 }
829
831 {
832 if ( material() && material().isExplicit() )
833 return material().model();
834 return nullptr;
835 }
836
838 {
839 return material() ? material().model() : nullptr;
840 }
841
842 AGX_FORCE_INLINE void GeometryContact::setMaterial( agx::ContactMaterial* material )
843 {
844 agxAssert( material != nullptr );
845 if (material)
846 this->material() = material->getEntity();
847 }
848
849 AGX_FORCE_INLINE void GeometryContact::setHasSurfaceVelocity( bool flag )
850 {
851 hasSurfaceVelocity() = flag;
852 }
853
854
855 AGX_FORCE_INLINE void GeometryContact::setHasInternalMaterial( bool flag )
856 {
857 hasInternalMaterial() = flag;
858 }
859
860 AGX_FORCE_INLINE bool GeometryContact::getHasInternalMaterial( ) const
861 {
862 return hasInternalMaterial();
863 }
864
866 {
867 if ( broadPhasePair() )
868 return broadPhasePair().state();
869
871 }
872
873 AGX_FORCE_INLINE void GeometryContact::setState( agx::UInt8 state )
874 {
877 }
878
880 {
881 if (ith == 0) return faceIndex1(); else return faceIndex2();
882 }
883
884
886 {
887 if (ith == 0) return faceIndex1(); else return faceIndex2();
888 }
889
890
892 {
893 if (ith == 0) return faceFeature1(); else return faceFeature2();
894 }
895
896
898 {
899 if (ith == 0) return faceFeature1(); else return faceFeature2();
900 }
901
902
904 {
905 if (ith == 0) return shape1(); else return shape2();
906 }
907
908
910 {
911 if (ith == 0) return shape1(); else return shape2();
912 }
913
914
916 {
917 if (ith == 0)
918 return point() - agx::Vec3(normal()) * (depth() * agx::Real(0.5));
919 else
920 return point() + agx::Vec3(normal()) * (depth() * agx::Real(0.5));
921 }
922
923
924
926 {
927 return this->youngsModulus();
928 }
929
930
931
933 {
935 }
936
937
938
940 {
941 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
942 return friction()[d];
943 }
944
946 {
947 coefficient = agx::clamp(coefficient, 0.0, agx::Infinity);
948
950 friction() = agx::Vec2(coefficient);
951 }
952 else {
953 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
954 friction()[d] = coefficient;
955 }
956 }
957
959 {
960 return restitution()[0];
961 }
962
964 {
965 this->restitution()[0] = agx::clamp(restitution, 0.0, agx::Infinity);
966 }
967
969 {
970 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
971 return this->restitution()[1+d];
972 }
973
975 {
977
979 this->restitution()[1] = restitution;
980 this->restitution()[2] = restitution;
981 }
982 else {
983 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
984 this->restitution()[1+d] = restitution;
985 }
986 }
987
989 {
990 size_t d = agx::clamp<size_t>( direction, 0u, 1u );
991 return tangentialCohesion()[ d ];
992 }
993
995 {
996 tanCohesion = agx::clamp( tanCohesion, 0.0, agx::Infinity );
997
999 tangentialCohesion() = agx::Vec2( tanCohesion );
1000 }
1001 else {
1002 size_t d = agx::clamp<size_t>( direction, 0u, 1u );
1003 tangentialCohesion()[ d ] = tanCohesion;
1004 }
1005 }
1006}
1007
1008#ifdef _MSC_VER
1009# pragma warning(pop)
1010#endif
1011
#define AGXPHYSICS_EXPORT
A contact point in a contact data.
Definition: Contacts.h:56
agx::Real getForceMagnitude() const
Definition: Contacts.h:619
void clear()
Clear all values in this contact.
Definition: Contacts.h:577
agx::Real getRestitution() const
Definition: Contacts.h:958
agx::Real getNormalForceMagnitude() const
Definition: Contacts.h:635
agx::Real getTangentialForceVMagnitude() const
Definition: Contacts.h:655
agx::Bool isHolonomic() const
Definition: Contacts.h:672
ContactPoint(agx::Vec3 thePoint, agx::Vec3f theNormal, agx::Real theDepth)
Construct given point, normal and depth.
@ TANGENTIAL_FORCE_V
Tangential force V, orthogonal to the normal force and U.
Definition: Contacts.h:62
@ TANGENTIAL_FORCE_U
Tangential force U, orthogonal to the normal force and V.
Definition: Contacts.h:61
@ NORMAL_FORCE
Normal force.
Definition: Contacts.h:60
void setIsHolonomic(agx::Bool isHolonomic)
Set if contact point should be treated as a holonomic constraint ( regular contact constraint with de...
Definition: Contacts.h:677
void setTangentialRestitution(agx::Real restitution, agx::ContactMaterial::FrictionDirection direction=agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY)
Set the tangential restitution coeffcient for a given tangential direction, or both.
Definition: Contacts.h:974
agx::Real getTangentialForceUMagnitude() const
Definition: Contacts.h:649
void setYoungsModulus(agx::Real youngsModulus)
Set the per contact point Young's modulus parameter.
Definition: Contacts.h:932
agx::Real getTangentialCohesion(agx::ContactMaterial::FrictionDirection direction) const
Definition: Contacts.h:988
agx::UInt32 & faceIndex(size_t ith)
Definition: Contacts.h:879
agx::Physics::Geometry::ShapePtr & shape(size_t ith)
Definition: Contacts.h:903
agx::Bool hasState(ContactPointState contactPointState) const
Definition: Contacts.h:667
agx::Vec3 getWitnessPoint(size_t ith) const
Get witness point for ith geometry.
Definition: Contacts.h:915
agx::Vec3 getTangentialForce() const
Definition: Contacts.h:641
agx::Real getTangentialRestitution(agx::ContactMaterial::FrictionDirection direction)
Definition: Contacts.h:968
agx::Vec3 getNormalForce() const
Definition: Contacts.h:629
@ NONHOLONOMIC
This contact point is treated as a non-holonomic constraint in the normal direction - i....
Definition: Contacts.h:73
void setFrictionCoefficient(agx::Real coefficient, agx::ContactMaterial::FrictionDirection direction=agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY)
Set the per contact point friction coefficient.
Definition: Contacts.h:945
agx::Vec3 getForce() const
Definition: Contacts.h:613
agx::Real getTangentialForceMagnitude() const
Definition: Contacts.h:661
agx::Real getFrictionCoefficient(agx::ContactMaterial::FrictionDirection direction) const
Definition: Contacts.h:939
agx::UInt8 & faceFeature(size_t ith)
Definition: Contacts.h:891
void setRestitution(agx::Real restitution)
Set the per contact point restitution parameter.
Definition: Contacts.h:963
ContactPoint()
Default constructor.
Definition: Contacts.h:568
agx::Real getYoungsModulus() const
Definition: Contacts.h:925
void setTangentialCohesion(agx::Real tanCohesion, agx::ContactMaterial::FrictionDirection direction=agx::ContactMaterial::BOTH_PRIMARY_AND_SECONDARY)
Set the per contact point tangential cohesion.
Definition: Contacts.h:994
A contact between two geometries.
Definition: Contacts.h:336
void setCustomData(void *customData)
Store custom data for this Contact.
Definition: Contacts.h:795
agxCollide::Geometry * geometry(size_t ith)
Definition: Contacts.h:702
void setEnable(bool flag)
Set to false to disable the contact.
Definition: Contacts.h:807
agx::UInt8 state() const
Definition: Contacts.h:865
agx::RigidBody * rigidBody(size_t ith)
Returns access to rigid body data.
Definition: Contacts.h:762
agx::Vec3f calculateRelativeVelocity(size_t pointIndex=0) const
Calculate the relative velocity in a contact point.
Definition: Contacts.h:734
void removeContactPoint(ContactPoint &point)
remove the specified ContactPoint from the set of contact points.
void clear()
Clear contact points.
agx::ContactMaterial * getMaterial()
If the contact material for this geometry contact is explicit it can be accessed here.
Definition: Contacts.h:823
int contains(agx::RigidBody *body) const
Will return -1 if body does not exist in this GeometryContact, 0 if it is the first (index 0) and 1 i...
Definition: Contacts.h:547
ContactState
Specify the state of the contact.
Definition: Contacts.h:342
@ NO_CONTACT
! No contact yet
Definition: Contacts.h:343
ContactPointVector & points()
Definition: Contacts.h:775
static bool calculateSurfaceVelocity(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2, LocalContactPoint &p)
Calculate the relative velocity in a contact point between geometry1 and geometry2 Put result in p.
agx::Bool hasImpactingPoints() const
GeometryContact()
Default constructor.
Definition: Contacts.h:691
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
agx::RigidBody * getRigidBody()
Definition: Geometry.h:790
Type-specific Array used for fast access into the data held by a Buffer.
Definition: Array.h:107
This class store the combine material properties between two agx::Material's.
Definition: Material.h:516
FrictionDirection
Specifies the direction of friction.
Definition: Material.h:519
AGXPHYSICS_EXPORT agx::UInt8 & state()
AGXPHYSICS_EXPORT agx::ContactMaterial *& model()
Pointer to a entity instance of type Physics.ContactPoint.
AGXPHYSICS_EXPORT agx::Vec3 & localForce()
AGXPHYSICS_EXPORT agx::Vec3 & point()
AGXPHYSICS_EXPORT agx::Vec3f & normal()
AGXPHYSICS_EXPORT agx::Vec2 & friction()
AGXPHYSICS_EXPORT agx::Real & youngsModulus()
AGXPHYSICS_EXPORT agx::UInt8 & faceFeature1()
The face feature of shape 1 in contact (e.g. voronoi region on triangle for trimesh).
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr & shape1()
Shape number 1 in contact.
AGXPHYSICS_EXPORT agx::UInt8 & state()
Contact point state, such as impacting, resting etc.
AGXPHYSICS_EXPORT agx::UInt32 & faceIndex2()
The face index of shape 2 in contact (e.g. index of triangle for trimesh).
AGXPHYSICS_EXPORT agx::Physics::Geometry::ShapePtr & shape2()
Shape number 2 in contact.
AGXPHYSICS_EXPORT agx::Real & area()
AGXPHYSICS_EXPORT agx::Vec3 & restitution()
AGXPHYSICS_EXPORT agx::UInt32 & faceIndex1()
The face index of shape 1 in contact (e.g. index of triangle for trimesh).
AGXPHYSICS_EXPORT agx::Vec3f & velocity()
AGXPHYSICS_EXPORT agx::Bool & enabled()
AGXPHYSICS_EXPORT agx::Vec2 & tangentialCohesion()
AGXPHYSICS_EXPORT agx::Vec3f & tangentU()
AGXPHYSICS_EXPORT agx::Vec3f & tangentV()
AGXPHYSICS_EXPORT agx::Real & depth()
AGXPHYSICS_EXPORT agx::UInt8 & faceFeature2()
The face feature of shape 2 in contact (e.g. voronoi region on triangle for trimesh).
AGXPHYSICS_EXPORT agx::Physics::ContactMaterialPtr & material()
A geometry contact hold contact information between two geometries.
AGXPHYSICS_EXPORT agx::Bool & hasInternalMaterial()
AGXPHYSICS_EXPORT void *& customData()
AGXPHYSICS_EXPORT agx::Bool & hasSurfaceVelocity()
AGXPHYSICS_EXPORT agx::Bool & enabled()
AGXPHYSICS_EXPORT agxData::Array< agx::Physics::ContactPointPtr > & points()
The list of contact points.
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry2()
AGXPHYSICS_EXPORT agx::Physics::BroadPhasePairPtr & broadPhasePair()
AGXPHYSICS_EXPORT agx::Bool & immediately()
AGXPHYSICS_EXPORT agx::Physics::GeometryPtr & geometry1()
AGXPHYSICS_EXPORT agxCollide::Geometry *& model()
Pointer to a entity instance of type Physics.Geometry.Shape.
Definition: ShapeEntity.h:196
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:52
agx::Vec3 getAngularVelocity() const
Angular velocity in world coordinate frame.
Definition: RigidBody.h:1196
agx::Vec3 getVelocity() const
Velocity of center of mass frame origin, in world coordinate frame.
Definition: RigidBody.h:1191
agx::Vec3 getCmPosition() const
Definition: RigidBody.h:1206
void set(T x, T y, T z)
Definition: Vec3Template.h:459
#define agxAssert(expr)
Definition: debug.h:143
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define AGX_STATIC_ASSERT(X)
Definition: macros.h:23
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
#define AGX_FORCE_INLINE
Definition: macros.h:58
This namespace consists of a set of classes for handling geometric intersection tests including boole...
void copyContactPoint(const T1 &from, T2 &to)
Copy between the different kinds of contact points.
Definition: Contacts.h:301
agxData::Array< ContactPoint > ContactPointVector
Definition: Contacts.h:330
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint32_t UInt32
Definition: Integer.h:32
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
Definition: agx/Vec3.h:36
bool Bool
Definition: Integer.h:40
T1 clamp(T1 v, T2 minimum, T3 maximum)
Definition: Math.h:318
Vec2T< Real > Vec2
The object holding 2 dimensional vectors and providing basic arithmetic.
Definition: Vec2.h:35
double Real
Definition: Real.h:42
uint8_t UInt8
Definition: Integer.h:30
const Real Infinity
Definition: Math.h:72
Vec3T< Real32 > Vec3f
Definition: agx/Vec3.h:39