PointContact Class Reference

#include <Contact.h>

Inheritance diagram for PointContact:

Contact

List of all members.


Detailed Description

This subclass of Contact represents a symmetric contact centered at a single point, such as between two spheres or a sphere and a half space.

It characterizes the contact by the center location and radius of the contact patch, the normal vector, and the penetration depth.

Public Member Functions

 PointContact (int body1, int body2, Vec3 &location, Vec3 &normal, Real radius, Real depth)
 Create a PointContact object.
Vec3 getLocation () const
 The location where the two bodies touch, specified in the ground frame.
Vec3 getNormal () const
 Get the surface normal at the contact location.
Real getRadius () const
 Get the radius of the contact patch.
Real getDepth () const
 Get the penetration depth.

Static Public Member Functions

static bool isInstance (const Contact &contact)
 Determine whether a Contact object is a PointContact.


Constructor & Destructor Documentation

PointContact ( int  body1,
int  body2,
Vec3 location,
Vec3 normal,
Real  radius,
Real  depth 
)

Create a PointContact object.

Parameters:
body1 the index of the first body involved in the contact, specified by its index within its contact set
body2 the index of the second body involved in the contact, specified by its index within its contact set
location the location where the two bodies touch, specified in the ground frame
normal the surface normal at the contact location. This is specified in the ground frame, and points outward from body1
radius the radius of the contact patch
depth the penetration depth


Member Function Documentation

Vec3 getLocation (  )  const

The location where the two bodies touch, specified in the ground frame.

More precisely, the contact region is represented as a circular patch centered at this point and perpendicular to the normal vector.

Vec3 getNormal (  )  const

Get the surface normal at the contact location.

This is specified in the ground frame, and points outward from the first body.

Real getRadius (  )  const

Get the radius of the contact patch.

Real getDepth (  )  const

Get the penetration depth.

This is defined as the minimum distance you would need to translate one body along the normal vector to make them no longer overlap.

static bool isInstance ( const Contact contact  )  [static]

Determine whether a Contact object is a PointContact.


The documentation for this class was generated from the following file:

Generated on Fri Sep 26 07:44:31 2008 for SimTKcore by  doxygen 1.5.6