Simbody
Public Member Functions | Static Public Member Functions

SimTK::PointContact Class Reference

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. More...

#include <Contact.h>

Inheritance diagram for SimTK::PointContact:

List of all members.

Public Member Functions

 PointContact (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2, Vec3 &location, Vec3 &normal, Real radius1, Real radius2, Real depth)
 Create a PointContact object representing a general (elliptical) contact.
 PointContact (ContactSurfaceIndex surf1, ContactSurfaceIndex surf2, Vec3 &location, Vec3 &normal, Real radius, Real depth)
 Create a PointContact object representing a circularly symmetric contact.
Vec3 getLocation () const
 The location where the two surfaces touch, specified in the ground frame.
Vec3 getNormal () const
 Get the surface normal at the contact location.
Real getRadiusOfCurvature1 () const
 Get the first principal relative radius of curvature of the contact surface.
Real getRadiusOfCurvature2 () const
 Get the second principal relative radius of curvature of the contact surface.
Real getEffectiveRadiusOfCurvature () const
 Get the effective relative radius of curvature of the contact surface.
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.
static ContactTypeId classTypeId ()
 Obtain the unique small-integer id for the PointContact class.

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.


Constructor & Destructor Documentation

SimTK::PointContact::PointContact ( ContactSurfaceIndex  surf1,
ContactSurfaceIndex  surf2,
Vec3 location,
Vec3 normal,
Real  radius1,
Real  radius2,
Real  depth 
)

Create a PointContact object representing a general (elliptical) contact.

Parameters:
surf1the index of the first surface involved in the contact, specified by its index within its contact set
surf2the index of the second surface involved in the contact, specified by its index within its contact set
locationthe location where the two surfaces touch, specified in the ground frame
normalthe surface normal at the contact location. This is specified in the ground frame, and points outward from surface1 towards surface2
radius1the first principal relative radius of curvature of the contact surface
radius2the second principal relative radius of curvature of the contact surface
depththe penetration depth
SimTK::PointContact::PointContact ( ContactSurfaceIndex  surf1,
ContactSurfaceIndex  surf2,
Vec3 location,
Vec3 normal,
Real  radius,
Real  depth 
)

Create a PointContact object representing a circularly symmetric contact.

Parameters:
surf1the index of the first surface involved in the contact, specified by its index within its contact set
surf2the index of the second surface involved in the contact, specified by its index within its contact set
locationthe location where the two surfaces touch, specified in the ground frame
normalthe surface normal at the contact location. This is specified in the ground frame, and points outward from surface1 towards surface2
radiusthe relative radius of curvature of the contact surface
depththe penetration depth

Member Function Documentation

Vec3 SimTK::PointContact::getLocation ( ) const

The location where the two surfaces 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 SimTK::PointContact::getNormal ( ) const

Get the surface normal at the contact location.

This is specified in the ground frame, and points outward from surface1 towards surface2.

Real SimTK::PointContact::getRadiusOfCurvature1 ( ) const

Get the first principal relative radius of curvature of the contact surface.

Real SimTK::PointContact::getRadiusOfCurvature2 ( ) const

Get the second principal relative radius of curvature of the contact surface.

Real SimTK::PointContact::getEffectiveRadiusOfCurvature ( ) const

Get the effective relative radius of curvature of the contact surface.

This is equal to sqrt(R1*R2), where R1 and R2 are the principal relative radii of curvature.

Real SimTK::PointContact::getDepth ( ) const

Get the penetration depth.

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

static bool SimTK::PointContact::isInstance ( const Contact contact) [static]

Determine whether a Contact object is a PointContact.

static ContactTypeId SimTK::PointContact::classTypeId ( ) [static]

Obtain the unique small-integer id for the PointContact class.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines