21# pragma warning( disable : 4275 )
44 class MaterialManager;
73 NONHOLONOMIC = 1 << 1,
137 agx::Real localForce(
size_t idx )
const;
158 agx::Real getNormalForceMagnitude()
const;
163 agx::Real getTangentialForceUMagnitude()
const;
168 agx::Real getTangentialForceVMagnitude()
const;
173 agx::Real getTangentialForceMagnitude()
const;
202 agx::UInt8 const& faceFeature(
size_t ith)
const;
224 agx::Vec3 getWitnessPoint(
size_t ith)
const;
237 void setIsHolonomic(
agx::Bool isHolonomic );
255 void setYoungsModulus(
agx::Real youngsModulus );
281 void setRestitution(
agx::Real restitution);
317 template<
typename T1,
typename T2>
320 to.point() = from.point();
321 to.normal() = from.normal();
322 to.depth() = from.depth();
323 to.area() = from.area();
324 to.volume() = from.volume();
326 to.velocity() = from.velocity();
327 to.enabled() = from.enabled();
329 to.shape1() = from.shape1();
330 to.shape2() = from.shape2();
332 to.faceIndex1() = from.faceIndex1();
333 to.faceIndex2() = from.faceIndex2();
334 to.faceFeature1() = from.faceFeature1();
335 to.faceFeature2() = from.faceFeature2();
336 to.state() = from.state();
391 agx::Vec3f calculateRelativeVelocity(
size_t pointIndex = 0 )
const;
444 void* getCustomData();
447 const void* getCustomData()
const;
453 void setCustomData(
void* customData );
487 void setEnable(
bool flag);
512 bool isEnabled()
const;
531 void setGeometry(
size_t ith,
Geometry* geom );
538 void markForRemoval(
bool immediately );
545 bool shouldBeCalled() const;
550 void setMaterial(
agx::ContactMaterial* material );
552 void setHasSurfaceVelocity(
bool flag );
554 GeometryPair getGeometryPair();
556 void setHasInternalMaterial(
bool flag );
557 bool getHasInternalMaterial( ) const;
559 void setState(
agx::UInt8 state );
567 if (this->rigidBody(0) == body)
return 0;
568 if (this->rigidBody(1) == body)
return 1;
574 if (this->
geometry(0) == geometry)
return 0;
575 if (this->
geometry(1) == geometry)
return 1;
644 return sqr > 0 ? std::sqrt( sqr ) : 0;
664 return forceU + forceV;
683 return sqr > 0 ? std::sqrt( sqr ) : 0;
688 return (
state() & contactPointState ) != 0;
716 agx::Physics::GeometryContactPtr(contact)
744 AGX_FORCE_INLINE void GeometryContact::setGeometry(
size_t ith, Geometry* geom )
756 if (pointIndex >
points().size() - 1)
787 return body ? body.model() :
nullptr;
793 const auto body = ith == 0u ?
body1() :
body2();
794 return body ? body.model() :
nullptr;
869 this->
material() = material->getEntity();
964 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
976 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
993 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
1006 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
1013 size_t d = agx::clamp<size_t>( direction, 0u, 1u );
1025 size_t d = agx::clamp<size_t>( direction, 0u, 1u );
1032# pragma warning(pop)
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Type-specific Array used for fast access into the data held by a Buffer.
AGXPHYSICS_EXPORT agx::UInt8 & state()
AGXPHYSICS_EXPORT agxCollide::Geometry *& model()
Pointer to a entity instance of type Physics.Geometry.Shape.
The rigid body class, combining a geometric model and a frame of reference.
agx::Vec3 getAngularVelocity() const
Angular velocity in world coordinate frame.
agx::Vec3 getVelocity() const
Velocity of center of mass frame origin, in world coordinate frame.
agx::Vec3 getCmPosition() const
#define DOXYGEN_END_INTERNAL_BLOCK()
#define AGX_STATIC_ASSERT(X)
#define DOXYGEN_START_INTERNAL_BLOCK()
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.
agxData::Array< ContactPoint > ContactPointVector
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec3T< Real > Vec3
The object holding 3 dimensional vectors and providing basic arithmetic.
T1 clamp(T1 v, T2 minimum, T3 maximum)
Vec2T< Real > Vec2
The object holding 2 dimensional vectors and providing basic arithmetic.