AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agxCollide Namespace Reference

agxCollide namespace consists of a set of classes for handling geometric intersection tests including boolean tests, penetration and contact sets. More...

Namespaces

 agxGeometryQueries
 Implementations.
 
 deprecated
 
 ElasticRestLengthCalculator
 

Classes

class  BoundingAABB
 Axis aligned bounding box implementation. More...
 
class  Box
 A box shape for geometric intersection tests. More...
 
class  Capsule
 Implements a Capsule shape for geometric intersection tests. More...
 
class  ColliderTable
 
class  ColliderTableCleanup
 
class  CollisionGroupManager
 
class  CollisionMeshData
 Class for data sharing only to be used by Mesh, its internal classes and children. More...
 
class  Cone
 A right circular cone shape for geometric intersection tests. More...
 
class  ContactPoint
 A contact point in a contact data. More...
 
class  ContactReducer
 Class for contact reduction. More...
 
class  ContactRegionManager
 Class for merging contact regions and computing their normals. More...
 
class  Convex
 A convex class for geometric intersection tests. More...
 
class  ConvexFactory
 Class for creating convex meshes from a set of vertices and indices. More...
 
class  Cylinder
 A cylinder shape for geometric intersection tests. More...
 
class  DisabledCollisionsState
 Complete disabled collisions state in a simulation including disabled given name, group id (integer) and geometry pair. More...
 
class  FallbackConvexCollider
 This template class can be instantiated to use Convex-Convex for shape pairs where no explicit collider exists. More...
 
class  Geometry
 The geometry representation used by the collision detection engine. More...
 
class  GeometryCollider
 The geometry collider is responsible for finding contacts between two geometries. More...
 
class  GeometryContact
 A contact between two geometries. More...
 
struct  GeometryPtrPair
 
class  GroupFooCollider
 
class  GroupIdCollection
 Collection of geometry group names and id's. More...
 
struct  GroupIdPair
 
class  HeightField
 A HeightField is a collision shape that can be created from a grid structure, like an image. More...
 
class  HeightFieldMeshData
 Class for data sharing only to be used by HeightField. More...
 
class  HierarchicalGrid
 
class  HollowCone
 A right circular hollow cone shape for geometric intersection tests. More...
 
class  HollowCylinder
 A hollow cylinder shape for geometric intersection tests. More...
 
class  Line
 A line shape for intersection tests, mostly for depth sensing and picking. More...
 
class  LineSegmentIntersectionFinder
 
class  LocalContactPoint
 
class  LocalGeometryContact
 
class  LocalParticleGeometryContact
 
class  LocalParticlePairContact
 
class  Mesh
 Mesh is a common base class for triangle meshes, such as Mesh or HeightField. More...
 
class  MeshData
 Stores triangle mesh data as triangle lists, i.e. More...
 
struct  NamePair
 
class  Plane
 
class  Polynomial
 
class  RegressionPlane
 A plane created from points using least squares minimization. More...
 
class  RenderData
 Class for storing rendering information for a Shape. More...
 
class  RenderMaterial
 Class for storing rendering material. More...
 
class  Shape
 Base class for a shape. More...
 
class  Space
 This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to calculate overlapping Geometry pairs. More...
 
class  SpaceListener
 Class for listening for add/remove geometry events for an associated Space. More...
 
class  Sphere
 A sphere class for geometric intersection tests. More...
 
class  SweepAndPrune
 
class  TriangleVoronoiRegion
 Class containing the Voronoi region of a triangle as an uint8_t. More...
 
class  Trimesh
 Triangle mesh for geometric intersection tests. More...
 
class  VoronoiGenerator
 
class  WireShape
 Internal class used by agxWire::Wire. More...
 

Typedefs

typedef agx::observer_ptr
< const Box > 
BoxConstObserver
 
typedef agx::ref_ptr< const Box > BoxConstRef
 
typedef agx::observer_ptr< Box > BoxObserver
 
typedef agx::ref_ptr< Box > BoxRef
 
typedef agx::Vector
< agx::Physics::BroadPhasePairPtr,
agxData::BufferProxyAllocator > 
BroadPhasePairVector
 
typedef agx::observer_ptr
< const Capsule > 
CapsuleConstObserver
 
typedef agx::ref_ptr< const
Capsule > 
CapsuleConstRef
 
typedef agx::observer_ptr
< Capsule > 
CapsuleObserver
 
typedef agx::ref_ptr< Capsule > CapsuleRef
 
typedef agx::observer_ptr
< const CollisionGroupManager > 
CollisionGroupManagerConstObserver
 
typedef agx::ref_ptr< const
CollisionGroupManager > 
CollisionGroupManagerConstRef
 
typedef agx::observer_ptr
< CollisionGroupManager > 
CollisionGroupManagerObserver
 
typedef agx::ref_ptr
< CollisionGroupManager > 
CollisionGroupManagerRef
 
typedef agx::ref_ptr
< CollisionMeshData > 
CollisionMeshDataRef
 
typedef agx::observer_ptr
< const Cone > 
ConeConstObserver
 
typedef agx::ref_ptr< const Cone > ConeConstRef
 
typedef agx::observer_ptr< Cone > ConeObserver
 
typedef agx::ref_ptr< Cone > ConeRef
 
typedef agx::ref_ptr< const
CollisionMeshData > 
ConstCollisionMeshDataRef
 
typedef agx::ref_ptr< const
HeightFieldMeshData > 
ConstHeightFieldMeshDataRef
 
typedef agx::ref_ptr< const
MeshData > 
ConstMeshDataRef
 
typedef agxData::Array
< ContactPoint > 
ContactPointVector
 
typedef agx::observer_ptr
< const Convex > 
ConvexConstObserver
 
typedef agx::ref_ptr< const
Convex > 
ConvexConstRef
 
typedef agx::observer_ptr
< const ConvexFactory > 
ConvexFactoryConstObserver
 
typedef agx::ref_ptr< const
ConvexFactory > 
ConvexFactoryConstRef
 
typedef agx::observer_ptr
< ConvexFactory > 
ConvexFactoryObserver
 
typedef agx::ref_ptr
< ConvexFactory > 
ConvexFactoryRef
 
typedef agx::observer_ptr< Convex > ConvexObserver
 
typedef agx::ref_ptr< Convex > ConvexRef
 
typedef agx::Vector
< agxCollide::ConvexRef > 
ConvexRefVector
 
typedef agx::observer_ptr
< const Cylinder > 
CylinderConstObserver
 
typedef agx::ref_ptr< const
Cylinder > 
CylinderConstRef
 
typedef agx::observer_ptr
< Cylinder > 
CylinderObserver
 
typedef agx::ref_ptr< Cylinder > CylinderRef
 
typedef agx::observer_ptr
< const Geometry > 
GeometryConstObserver
 
typedef agx::ref_ptr< const
Geometry > 
GeometryConstRef
 
typedef agx::VectorPOD
< GeometryContact * > 
GeometryContactPtrVector
 
typedef agx::Vector
< GeometryContact > 
GeometryContactVector
 
typedef agx::HashSet< const
Geometry * > 
GeometryHashSet
 
typedef agx::HashVector< const
Geometry *, agx::observer_ptr
< const Geometry > > 
GeometryHashVector
 
typedef agx::observer_ptr
< Geometry > 
GeometryObserver
 
typedef agx::Vector
< agxCollide::GeometryPair > 
GeometryPairVector
 
typedef agx::Vector
< GeometryPtrPair > 
GeometryPtrPairVector
 
typedef agx::VectorPOD
< Geometry * > 
GeometryPtrVector
 
typedef agx::ref_ptr< Geometry > GeometryRef
 
typedef agx::SetVector
< agx::ref_ptr
< agxCollide::Geometry > > 
GeometryRefSet
 
typedef agx::Vector
< agx::ref_ptr< Geometry > > 
GeometryRefVector
 
typedef agx::HashTable
< agxCollide::Geometry
*, agx::ref_ptr< Geometry > > 
GeometryTable
 
typedef agx::Vector< GroupIdPair > GroupIdPairVector
 
typedef agx::Vector< agx::Name > GroupNameVector
 
typedef agx::observer_ptr
< const HeightField > 
HeightFieldConstObserver
 
typedef agx::ref_ptr< const
HeightField > 
HeightFieldConstRef
 
typedef agx::ref_ptr
< HeightFieldMeshData > 
HeightFieldMeshDataRef
 
typedef agx::observer_ptr
< HeightField > 
HeightFieldObserver
 
typedef agx::ref_ptr< HeightField > HeightFieldRef
 
typedef agx::observer_ptr
< const HierarchicalGrid > 
HierarchicalGridConstObserver
 
typedef agx::ref_ptr< const
HierarchicalGrid > 
HierarchicalGridConstRef
 
typedef agx::observer_ptr
< HierarchicalGrid > 
HierarchicalGridObserver
 
typedef agx::ref_ptr
< HierarchicalGrid > 
HierarchicalGridRef
 
typedef agx::observer_ptr
< const HollowCone > 
HollowConeConstObserver
 
typedef agx::ref_ptr< const
HollowCone > 
HollowConeConstRef
 
typedef agx::observer_ptr
< HollowCone > 
HollowConeObserver
 
typedef agx::ref_ptr< HollowCone > HollowConeRef
 
typedef agx::observer_ptr
< const HollowCylinder > 
HollowCylinderConstObserver
 
typedef agx::ref_ptr< const
HollowCylinder > 
HollowCylinderConstRef
 
typedef agx::observer_ptr
< HollowCylinder > 
HollowCylinderObserver
 
typedef agx::ref_ptr
< HollowCylinder > 
HollowCylinderRef
 
typedef agx::observer_ptr
< const Line > 
LineConstObserver
 
typedef agx::ref_ptr< const Line > LineConstRef
 
typedef agx::observer_ptr< Line > LineObserver
 
typedef agx::ref_ptr< Line > LineRef
 
typedef agx::VectorPOD
< LocalContactPoint > 
LocalContactPointVector
 
typedef agx::Vector
< LocalGeometryContact > 
LocalGeometryContactVector
 
typedef agx::Vector
< LocalParticleGeometryContact > 
LocalParticleGeometryContactVector
 
typedef agx::Vector
< LocalParticlePairContact > 
LocalParticlePairContactVector
 
typedef agx::Vector
< agx::Physics::GeometryPairPtr > 
LocalSeparationPairVector
 
typedef agx::observer_ptr
< const Mesh > 
MeshConstObserver
 
typedef agx::ref_ptr< const Mesh > MeshConstRef
 
typedef agx::ref_ptr< MeshData > MeshDataRef
 
typedef agx::observer_ptr< Mesh > MeshObserver
 
typedef agx::ref_ptr< Mesh > MeshRef
 
typedef agx::Vector< NamePair > NamePairVector
 
typedef agx::Vector
< agx::Physics::ParticleGeometryContactPtr > 
ParticleGeometryContactVector
 
typedef std::pair
< agx::Physics::ParticlePtr,
agx::Physics::GeometryPtr > 
ParticleGeometryPair
 
typedef agx::Vector
< ParticleGeometryPair > 
ParticleGeometryPairVector
 
typedef agx::Vector
< agx::Physics::ParticlePairContactPtr > 
ParticlePairContactVector
 
typedef agx::observer_ptr
< const Plane > 
PlaneConstObserver
 
typedef agx::ref_ptr< const Plane > PlaneConstRef
 
typedef agx::observer_ptr< Plane > PlaneObserver
 
typedef agx::ref_ptr< Plane > PlaneRef
 
typedef agx::observer_ptr
< const RenderData > 
RenderDataConstObserver
 
typedef agx::ref_ptr< const
RenderData > 
RenderDataConstRef
 
typedef agx::observer_ptr
< RenderData > 
RenderDataObserver
 
typedef agx::ref_ptr< RenderData > RenderDataRef
 
typedef agx::observer_ptr
< const RenderMaterial > 
RenderMaterialConstObserver
 
typedef agx::ref_ptr< const
RenderMaterial > 
RenderMaterialConstRef
 
typedef agx::observer_ptr
< RenderMaterial > 
RenderMaterialObserver
 
typedef agx::ref_ptr
< RenderMaterial > 
RenderMaterialRef
 
typedef agx::HashTable
< agx::UInt32,
RenderMaterialRef > 
RenderMaterialValueHashTable
 
typedef agx::Vector
< agx::Physics::GeometryPairPtr,
agxData::BufferProxyAllocator > 
SeparationPairVector
 
typedef agx::observer_ptr
< const Shape > 
ShapeConstObserver
 
typedef agx::ref_ptr< const Shape > ShapeConstRef
 
typedef agx::observer_ptr
< const ShapeGroup > 
ShapeGroupConstObserver
 
typedef agx::ref_ptr< const
ShapeGroup > 
ShapeGroupConstRef
 
typedef agx::observer_ptr
< ShapeGroup > 
ShapeGroupObserver
 
typedef agx::ref_ptr< ShapeGroup > ShapeGroupRef
 
typedef agx::observer_ptr< Shape > ShapeObserver
 
typedef agx::ref_ptr< Shape > ShapeRef
 
typedef agx::Vector
< agx::ref_ptr< Shape > > 
ShapeRefVector
 
typedef agx::observer_ptr
< const Space > 
SpaceConstObserver
 
typedef agx::ref_ptr< const Space > SpaceConstRef
 
typedef agx::observer_ptr< Space > SpaceObserver
 
typedef agx::ref_ptr< Space > SpaceRef
 
typedef agx::observer_ptr
< const Sphere > 
SphereConstObserver
 
typedef agx::ref_ptr< const
Sphere > 
SphereConstRef
 
typedef agx::observer_ptr< Sphere > SphereObserver
 
typedef agx::ref_ptr< Sphere > SphereRef
 
typedef agx::observer_ptr
< const SweepAndPrune > 
SweepAndPruneConstObserver
 
typedef agx::ref_ptr< const
SweepAndPrune > 
SweepAndPruneConstRef
 
typedef agx::observer_ptr
< SweepAndPrune > 
SweepAndPruneObserver
 
typedef agx::ref_ptr
< SweepAndPrune > 
SweepAndPruneRef
 
typedef agx::observer_ptr
< const Trimesh > 
TrimeshConstObserver
 
typedef agx::ref_ptr< const
Trimesh > 
TrimeshConstRef
 
typedef agx::observer_ptr
< Trimesh > 
TrimeshObserver
 
typedef agx::ref_ptr< Trimesh > TrimeshRef
 
typedef agx::observer_ptr
< const VoronoiGenerator > 
VoronoiGeneratorConstObserver
 
typedef agx::ref_ptr< const
VoronoiGenerator > 
VoronoiGeneratorConstRef
 
typedef agx::observer_ptr
< VoronoiGenerator > 
VoronoiGeneratorObserver
 
typedef agx::ref_ptr
< VoronoiGenerator > 
VoronoiGeneratorRef
 
typedef agx::observer_ptr
< const WireShape > 
WireShapeConstObserver
 
typedef agx::ref_ptr< const
WireShape > 
WireShapeConstRef
 
typedef agx::observer_ptr
< WireShape > 
WireShapeObserver
 
typedef agx::ref_ptr< WireShape > WireShapeRef
 

Enumerations

enum  ShapeDistanceResult : std::uint8_t { ShapeDistanceResult::SUCCESS, ShapeDistanceResult::OVERLAPPING_SHAPES, ShapeDistanceResult::UNSUPPORTED_SHAPE_TYPES, ShapeDistanceResult::FAILURE }
 Status values that can be returned when performing shape-shape distance computation. More...
 

Functions

 AGX_DECLARE_POINTER_TYPES (SpaceListener)
 
 AGX_DECLARE_VECTOR_TYPES (Shape)
 
 AGX_DECLARE_VECTOR_TYPES (Geometry)
 
 AGX_STATIC_ASSERT (sizeof(ContactPoint)==sizeof(agx::Physics::ContactPointPtr))
 
AGXPHYSICS_EXPORT void collideConvexConvex (const Shape *convexShape1, const Shape *convexShape2, const agx::AffineMatrix4x4 &transform1, const agx::AffineMatrix4x4 &transform2, ShapeCollider::LocalContactPointVector &result, const agx::Real epaAccuracy=agx::AGX_EQUIVALENT_EPSILON)
 Collides two convex shapes (Box, Capsule, Convex, Cylinder, Sphere). More...
 
AGXPHYSICS_EXPORT
agxCollide::ShapeDistanceResult 
computeGeometryDistance (const agxCollide::Geometry *geometry1, const agx::AffineMatrix4x4 &transform1, const agxCollide::Geometry *geometry2, const agx::AffineMatrix4x4 &transform2, agx::Vec3 &point1, agx::Vec3 &point2)
 Utility method to perform shape-shape minimum distance test between all compatible shape pairs, where one shape is taken from each geometry. More...
 
AGXPHYSICS_EXPORT
agxCollide::ShapeDistanceResult 
computeShapeDistance (const agxCollide::Shape *shape1, const agx::AffineMatrix4x4 &transform1, const agxCollide::Shape *shape2, const agx::AffineMatrix4x4 &transform2, agx::Vec3 &point1, agx::Vec3 &point2)
 Utility function to compute the minimum distance between two shapes. More...
 
template<typename T1 , typename T2 >
void copyContactPoint (const T1 &from, T2 &to)
 Copy between the different kinds of contact points. More...
 
template void copyContactPoint (const ContactPoint &, LocalContactPoint &)
 
template void copyContactPoint (const LocalContactPoint &, ContactPoint &)
 
template void copyContactPoint (const LocalContactPoint &, agx::Physics::ContactPointPtr &)
 
template void copyContactPoint (const agx::Physics::ContactPointPtr &, LocalContactPoint &)
 
AGXPHYSICS_EXPORT void createSupportContactPoints (const agxCollide::Shape *shape1, const agxCollide::Shape *shape2, const agx::AffineMatrix4x4 &transform1, const agx::AffineMatrix4x4 &transform2, const agx::Vec3 &point, const agx::Vec3 &normal, const agx::Real deepestDepth, agxCollide::ShapeCollider::LocalContactPointVector &result, bool &keepOriginalPoint)
 Given 2 convex shapes and 1 contact point (which is assumed to be the deepest possible point) this function will create extra contact points. More...
 
AGXPHYSICS_EXPORT bool isPointInsideConvex (const agx::Vec3 &point, const agxCollide::Convex *convex)
 Check if a point in world coordinates is inside a given convex. More...
 
std::ostream & operator<< (std::ostream &output, const DisabledCollisionsState &state)
 
std::ostream & operator<< (std::ostream &output, const BoundingAABB &bound)
 
std::ostream & operator<< (std::ostream &output, const agx::Physics::CollisionGroupSetPtr &set)
 
std::ostream & operator<< (std::ostream &output, const agx::Physics::CollisionGroupPtr &group)
 

Detailed Description

agxCollide namespace consists of a set of classes for handling geometric intersection tests including boolean tests, penetration and contact sets.

Typedef Documentation

Definition at line 26 of file Box.h.

Definition at line 26 of file Box.h.

Definition at line 26 of file Box.h.

Definition at line 26 of file Box.h.

Definition at line 27 of file Capsule.h.

Definition at line 27 of file Capsule.h.

Definition at line 27 of file Capsule.h.

Definition at line 27 of file Capsule.h.

Definition at line 29 of file Cone.h.

Definition at line 29 of file Cone.h.

Definition at line 29 of file Cone.h.

Definition at line 29 of file Cone.h.

Definition at line 71 of file MeshData.h.

Definition at line 32 of file Convex.h.

Definition at line 32 of file Convex.h.

Definition at line 32 of file ConvexFactory.h.

Definition at line 32 of file Convex.h.

Definition at line 32 of file Convex.h.

Definition at line 31 of file Cylinder.h.

Definition at line 31 of file Cylinder.h.

Definition at line 31 of file Cylinder.h.

Definition at line 31 of file Cylinder.h.

Definition at line 75 of file Geometry.h.

Definition at line 75 of file Geometry.h.

Definition at line 78 of file Geometry.h.

Definition at line 77 of file Geometry.h.

Definition at line 75 of file Geometry.h.

typedef agx::Vector<agxCollide::GeometryPair > agxCollide::GeometryPairVector

Definition at line 37 of file agxcollide_vector_types.h.

Definition at line 75 of file Geometry.h.

Definition at line 29 of file HollowCone.h.

Definition at line 29 of file HollowCone.h.

Definition at line 29 of file HollowCone.h.

Definition at line 28 of file ollide/Line.h.

Definition at line 28 of file ollide/Line.h.

Definition at line 28 of file ollide/Line.h.

Definition at line 28 of file ollide/Line.h.

Definition at line 35 of file Mesh.h.

Definition at line 35 of file Mesh.h.

Definition at line 70 of file MeshData.h.

Definition at line 35 of file Mesh.h.

Definition at line 35 of file Mesh.h.

Definition at line 33 of file ollide/Plane.h.

Definition at line 33 of file ollide/Plane.h.

Definition at line 33 of file ollide/Plane.h.

Definition at line 33 of file ollide/Plane.h.

Definition at line 31 of file RenderData.h.

Definition at line 31 of file RenderData.h.

Definition at line 31 of file RenderData.h.

Definition at line 46 of file Shape.h.

Definition at line 46 of file Shape.h.

Definition at line 48 of file Shape.h.

typedef agx::ref_ptr< const ShapeGroup > agxCollide::ShapeGroupConstRef

Definition at line 48 of file Shape.h.

Definition at line 48 of file Shape.h.

typedef agx::ref_ptr< ShapeGroup > agxCollide::ShapeGroupRef

Definition at line 48 of file Shape.h.

Definition at line 46 of file Shape.h.

Definition at line 46 of file Shape.h.

Definition at line 74 of file Space.h.

Definition at line 74 of file Space.h.

Definition at line 74 of file Space.h.

Definition at line 74 of file Space.h.

Definition at line 27 of file Sphere.h.

Definition at line 27 of file Sphere.h.

Definition at line 27 of file Sphere.h.

Definition at line 27 of file Sphere.h.

Definition at line 35 of file SweepAndPrune.h.

Definition at line 36 of file Trimesh.h.

Definition at line 36 of file Trimesh.h.

Definition at line 36 of file Trimesh.h.

Definition at line 36 of file Trimesh.h.

Definition at line 28 of file WireShape.h.

Definition at line 28 of file WireShape.h.

Definition at line 28 of file WireShape.h.

Enumeration Type Documentation

enum agxCollide::ShapeDistanceResult : std::uint8_t
strong

Status values that can be returned when performing shape-shape distance computation.

Enumerator
SUCCESS 
OVERLAPPING_SHAPES 
UNSUPPORTED_SHAPE_TYPES 
FAILURE 

Definition at line 35 of file ShapeDistance.h.

Function Documentation

agxCollide::AGX_DECLARE_POINTER_TYPES ( SpaceListener  )
agxCollide::AGX_DECLARE_VECTOR_TYPES ( Shape  )
agxCollide::AGX_DECLARE_VECTOR_TYPES ( Geometry  )
agxCollide::AGX_STATIC_ASSERT ( sizeof(ContactPoint)  = =sizeof(agx::Physics::ContactPointPtr))
AGXPHYSICS_EXPORT void agxCollide::collideConvexConvex ( const Shape *  convexShape1,
const Shape *  convexShape2,
const agx::AffineMatrix4x4 &  transform1,
const agx::AffineMatrix4x4 &  transform2,
ShapeCollider::LocalContactPointVector &  result,
const agx::Real  epaAccuracy = agx::AGX_EQUIVALENT_EPSILON 
)

Collides two convex shapes (Box, Capsule, Convex, Cylinder, Sphere).

Parameters
convexShape1The first convex shape.
convexShape2The second convex shape.
transform1The transformation matrix from the first convex shape's local frame to world frame.
transform2The transformation matrix from the second convex shape's local frame to world frame.
resultThe contact point vector (probably non-empty from start) where resulting contact points get added.
epaAccuracyWhich accuracy does EPA have to reach in order to accept the found point as the deepest one?

Referenced by agxCollide::FallbackConvexCollider< ShapeType1, ShapeType2 >::_calculateContacts().

AGXPHYSICS_EXPORT agxCollide::ShapeDistanceResult agxCollide::computeGeometryDistance ( const agxCollide::Geometry *  geometry1,
const agx::AffineMatrix4x4 &  transform1,
const agxCollide::Geometry *  geometry2,
const agx::AffineMatrix4x4 &  transform2,
agx::Vec3 &  point1,
agx::Vec3 &  point2 
)

Utility method to perform shape-shape minimum distance test between all compatible shape pairs, where one shape is taken from each geometry.

The tests will use compuateShapeDistance and the smallest distance will be returned in point1 and point2 if the return status is SUCCESS.

AGXPHYSICS_EXPORT agxCollide::ShapeDistanceResult agxCollide::computeShapeDistance ( const agxCollide::Shape *  shape1,
const agx::AffineMatrix4x4 &  transform1,
const agxCollide::Shape *  shape2,
const agx::AffineMatrix4x4 &  transform2,
agx::Vec3 &  point1,
agx::Vec3 &  point2 
)

Utility function to compute the minimum distance between two shapes.

This method supports convex shapes for which shape::hasSupportFunction() returns true. The function works directly on the shapes and does not need for the shapes to be part of agxCollide::Space or that e.g. BoundingBoxes are updated.

When the shapes do not overlap, SUCCESS IS returned and the position on each shape in global coordinates are written to point1 and point2. The distance is the magnitude of the vector between point1 and point2.

If the shapes do overlap, OVERLAPPING_SHAPES is returned and point1 and point2 are unchanged. More detailed contact information for this case, use the regular collision detection via Space.

For unsupported shape types or an unspecified error, two other return codes are also possible.

template<typename T1 , typename T2 >
void agxCollide::copyContactPoint ( const T1 &  from,
T2 &  to 
)

Copy between the different kinds of contact points.

Note that only the common members between all 3 classes are copied (so not e.g. material or localForce).

Definition at line 236 of file Contacts.h.

template void agxCollide::copyContactPoint ( const ContactPoint &  ,
LocalContactPoint &   
)
template void agxCollide::copyContactPoint ( const LocalContactPoint &  ,
ContactPoint &   
)
template void agxCollide::copyContactPoint ( const LocalContactPoint &  ,
agx::Physics::ContactPointPtr &   
)
template void agxCollide::copyContactPoint ( const agx::Physics::ContactPointPtr &  ,
LocalContactPoint &   
)
AGXPHYSICS_EXPORT void agxCollide::createSupportContactPoints ( const agxCollide::Shape *  shape1,
const agxCollide::Shape *  shape2,
const agx::AffineMatrix4x4 &  transform1,
const agx::AffineMatrix4x4 &  transform2,
const agx::Vec3 &  point,
const agx::Vec3 &  normal,
const agx::Real  deepestDepth,
agxCollide::ShapeCollider::LocalContactPointVector &  result,
bool &  keepOriginalPoint 
)

Given 2 convex shapes and 1 contact point (which is assumed to be the deepest possible point) this function will create extra contact points.

Parameters
shape1The first convex shape.
shape2The second convex shape.
transform1The transformation matrix from the first convex shape's local frame to world frame.
transform2The transformation matrix from the second convex shape's local frame to world frame.
pointThe first, deepest contact point.
normalThe contact normal belonging to the first, deepest contact point.
deepestDepthThe depth belonging to the first, deepest contact point.
resultThe contact point vector (probably non-empty from start) where resulting contact points get added.
keepOriginalPointResult: Should the original point be kept, or have we found better ones?
AGXPHYSICS_EXPORT bool agxCollide::isPointInsideConvex ( const agx::Vec3 &  point,
const agxCollide::Convex *  convex 
)

Check if a point in world coordinates is inside a given convex.

Parameters
pointThe point in world coordinates.
convexThe convex.
std::ostream& agxCollide::operator<< ( std::ostream &  output,
const DisabledCollisionsState &  state 
)
std::ostream& agxCollide::operator<< ( std::ostream &  output,
const BoundingAABB &  bound 
)
inline

Definition at line 224 of file BoundingAABB.h.

References agx::BoundT< T >::max(), and agx::BoundT< T >::min().

std::ostream& agxCollide::operator<< ( std::ostream &  output,
const agx::Physics::CollisionGroupSetPtr &  set 
)
std::ostream& agxCollide::operator<< ( std::ostream &  output,
const agx::Physics::CollisionGroupPtr &  group 
)