SurgSim::Physics::ContactConstraintData Class Reference

Class for Frictionless contact (only needs a plane equation) More...

`#include <SurgSim/Physics/ContactConstraintData.h>`

Inheritance diagram for SurgSim::Physics::ContactConstraintData:

## Public Member Functions

| ContactConstraintData ()
| Default constructor. More...
virtual | ~ContactConstraintData ()
| Destructor. More...
void | setPlaneEquation (const SurgSim::Math::Vector3d &n, double d)
| Sets the plane equation of the frictionless contact. More...
const SurgSim::Math::Vector3d & | getNormal () const
| Gets the plane normal vector. More...
double | getDistance () const
| Gets the plane distance to the origin. More...
double | getContactTime () const
| Gets the time of contact for the collision. More...
std::shared_ptr< Collision::Contact > | getContact ()
void | setContact (const std::shared_ptr< Collision::Contact > &contacts)
Public Member Functions inherited from SurgSim::Physics::ConstraintData
| ConstraintData ()
| Default Constructor. More...
virtual | ~ConstraintData ()
| Destructor. More...

## Private Attributes

SurgSim::Math::Vector3d | m_normal
| Plane equation normal vector (normalized vector) More...
double | m_distance
| Plane equation distance to origin. More...
std::shared_ptr< Collision::Contact > | m_contact
| The contact that uses this constraint data. More...

## Detailed Description

Class for Frictionless contact (only needs a plane equation)

## Constructor & Destructor Documentation

## ContactConstraintData()

SurgSim::Physics::ContactConstraintData::ContactConstraintData | ( |  | ) |

inline

Default constructor.

## ~ContactConstraintData()

virtual SurgSim::Physics::ContactConstraintData::~ContactConstraintData | ( |  | ) |

inline virtual

Destructor.

## Member Function Documentation

## getContact()

std::shared_ptr<Collision::Contact> SurgSim::Physics::ContactConstraintData::getContact | ( |  | ) |

inline

Returns
  The contact that uses this constraint data.

## getContactTime()

double SurgSim::Physics::ContactConstraintData::getContactTime | ( |  | ) | const

inline

Gets the time of contact for the collision.

Returns
  The time of contact for the collision

## getDistance()

double SurgSim::Physics::ContactConstraintData::getDistance | ( |  | ) | const

inline

Gets the plane distance to the origin.

Returns
  The plane equation's distance to the origin

## getNormal()

const SurgSim::Math::Vector3d& SurgSim::Physics::ContactConstraintData::getNormal | ( |  | ) | const

inline

Gets the plane normal vector.

Returns
  The plane equation's normal vector (normalized vector)

## setContact()

void SurgSim::Physics::ContactConstraintData::setContact | ( | const std::shared_ptr< Collision::Contact > & | contacts | ) |

inline

Parameters

  contacts | The contacts that use this constraint data.

## setPlaneEquation()

void SurgSim::Physics::ContactConstraintData::setPlaneEquation | ( | const SurgSim::Math::Vector3d & | n,
|  | double | d
| ) |  |

inline

Sets the plane equation of the frictionless contact.

Parameters

  n | The plane normal (normalized vector)
  d | The plane distance to the origin

Note
  The plane is defined by { P | n.P + d = 0 }

## Member Data Documentation

## m_contact

std::shared_ptr<Collision::Contact> SurgSim::Physics::ContactConstraintData::m_contact

private

The contact that uses this constraint data.

## m_distance

double SurgSim::Physics::ContactConstraintData::m_distance

private

Plane equation distance to origin.

## m_normal

SurgSim::Math::Vector3d SurgSim::Physics::ContactConstraintData::m_normal

private

Plane equation normal vector (normalized vector)

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

- SurgSim/Physics/ContactConstraintData.h