21# pragma warning( disable : 4275 )
44 class MaterialManager;
120 agx::Real localForce(
size_t idx )
const;
141 agx::Real getNormalForceMagnitude()
const;
146 agx::Real getTangentialForceUMagnitude()
const;
151 agx::Real getTangentialForceVMagnitude()
const;
156 agx::Real getTangentialForceMagnitude()
const;
185 agx::UInt8 const& faceFeature(
size_t ith)
const;
207 agx::Vec3 getWitnessPoint(
size_t ith)
const;
220 void setIsHolonomic(
agx::Bool isHolonomic );
238 void setYoungsModulus(
agx::Real youngsModulus );
264 void setRestitution(
agx::Real restitution);
300 template<
typename T1,
typename T2>
303 to.point() = from.point();
304 to.normal() = from.normal();
305 to.depth() = from.depth();
306 to.area() = from.area();
308 to.velocity() = from.velocity();
309 to.enabled() = from.enabled();
311 to.shape1() = from.shape1();
312 to.shape2() = from.shape2();
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();
373 agx::Vec3f calculateRelativeVelocity(
size_t pointIndex = 0 )
const;
426 void* getCustomData();
429 const void* getCustomData()
const;
435 void setCustomData(
void* customData );
469 void setEnable(
bool flag);
494 bool isEnabled()
const;
513 void setGeometry(
size_t ith,
Geometry* geom );
520 void markForRemoval(
bool immediately );
527 bool shouldBeCalled() const;
532 void setMaterial(
agx::ContactMaterial* material );
534 void setHasSurfaceVelocity(
bool flag );
536 GeometryPair getGeometryPair();
538 void setHasInternalMaterial(
bool flag );
539 bool getHasInternalMaterial( ) const;
541 void setState(
agx::UInt8 state );
549 if (this->rigidBody(0) == body)
return 0;
550 if (this->rigidBody(1) == body)
return 1;
556 if (this->
geometry(0) == geometry)
return 0;
557 if (this->
geometry(1) == geometry)
return 1;
625 return sqr > 0 ? std::sqrt( sqr ) : 0;
645 return forceU + forceV;
664 return sqr > 0 ? std::sqrt( sqr ) : 0;
669 return (
state() & contactPointState ) != 0;
697 agx::Physics::GeometryContactPtr(contact)
725 AGX_FORCE_INLINE void GeometryContact::setGeometry(
size_t ith, Geometry* geom )
737 if (pointIndex >
points().size() - 1)
846 this->
material() = material->getEntity();
941 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
953 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
970 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
983 size_t d = agx::clamp<size_t>(direction, 0u, 1u);
990 size_t d = agx::clamp<size_t>( direction, 0u, 1u );
1002 size_t d = agx::clamp<size_t>( direction, 0u, 1u );
1009# pragma warning(pop)
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
agx::RigidBody * getRigidBody()
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.