SurgSim::Physics::SlidingConstraintData Class Reference

Class for Frictionless sliding constraint (stores two planes, the intersection of which, is the sliding direction) More...

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

Inheritance diagram for SurgSim::Physics::SlidingConstraintData:

## Public Member Functions

| SlidingConstraintData ()
| Default constructor. More...
| SlidingConstraintData (const SurgSim::Math::Vector3d &point, const SurgSim::Math::Vector3d &direction)
| Constructor. More...
virtual | ~SlidingConstraintData ()
| Destructor. More...
void | setSlidingDirection (const SurgSim::Math::Vector3d &point, const SurgSim::Math::Vector3d &direction)
| Calculate the two plane equations based on the given sliding direction. More...
void | setFrictionCoefficient (double mu)
| Set the friction coefficient for a frictional sliding constraint. More...
double | getFrictionCoefficient () const
const std::array< Math::Vector3d, 2 > & | getNormals () const
const Math::RigidTransform3d | getPose ()
| /return The pose of constraint More...
const Math::Vector3d & | getTangent () const
const double | getDistanceTangent () const
Public Member Functions inherited from SurgSim::Physics::ConstraintData
| ConstraintData ()
| Default Constructor. More...
virtual | ~ConstraintData ()
| Destructor. More...

## Private Attributes

std::array< Math::Vector3d, 2 > | m_normals
| The normals of the two planes. More...
Math::Vector3d | m_point
| The point of constraint. More...
Math::Vector3d | m_slidingDirection
| The sliding direction (intersection of the two planes). More...
Math::Vector3d | m_tangent
| The tangent of the two planes. More...
double | m_distanceTangent
| The distance from origin of the tangential plane. More...
double | m_mu
| Friction coefficient for frictional constraint (unused for frictionless constraint). More...

## Detailed Description

Class for Frictionless sliding constraint (stores two planes, the intersection of which, is the sliding direction)

## Constructor & Destructor Documentation

## SlidingConstraintData() [1/2]

SurgSim::Physics::SlidingConstraintData::SlidingConstraintData | ( |  | ) |

Default constructor.

## SlidingConstraintData() [2/2]

SurgSim::Physics::SlidingConstraintData::SlidingConstraintData | ( | const SurgSim::Math::Vector3d & | point,
|  | const SurgSim::Math::Vector3d & | direction
| ) |  |

Constructor.

Parameters

  point | The point through which the sliding direction vector passes.
  direction | The sliding direction vector.

## ~SlidingConstraintData()

SurgSim::Physics::SlidingConstraintData::~SlidingConstraintData | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## getDistanceTangent()

const double SurgSim::Physics::SlidingConstraintData::getDistanceTangent | ( |  | ) | const

Returns
  The distance from origin of the planes direction (tangent).

## getFrictionCoefficient()

double SurgSim::Physics::SlidingConstraintData::getFrictionCoefficient | ( |  | ) | const

Returns
  The friction coefficient (default is 0.5)

Note
  The friction coefficient is only used for frictional constraint, it is discarded othersise.

## getNormals()

const std::array< Math::Vector3d, 2 > & SurgSim::Physics::SlidingConstraintData::getNormals | ( |  | ) | const

Returns
  The normals of the two planes.

## getPose()

const Math::RigidTransform3d SurgSim::Physics::SlidingConstraintData::getPose | ( |  | ) |

/return The pose of constraint

## getTangent()

const Math::Vector3d & SurgSim::Physics::SlidingConstraintData::getTangent | ( |  | ) | const

Returns
  The tangent (direction defined by the two planes).

## setFrictionCoefficient()

void SurgSim::Physics::SlidingConstraintData::setFrictionCoefficient | ( | double | mu | ) |

Set the friction coefficient for a frictional sliding constraint.

Parameters

  mu | The friction coefficient

## setSlidingDirection()

void SurgSim::Physics::SlidingConstraintData::setSlidingDirection | ( | const SurgSim::Math::Vector3d & | point,
|  | const SurgSim::Math::Vector3d & | direction
| ) |  |

Calculate the two plane equations based on the given sliding direction.

Parameters

  point | The point through which the sliding direction vector passes.
  direction | The sliding direction vector.

## Member Data Documentation

## m_distanceTangent

double SurgSim::Physics::SlidingConstraintData::m_distanceTangent

private

The distance from origin of the tangential plane.

## m_mu

double SurgSim::Physics::SlidingConstraintData::m_mu

private

Friction coefficient for frictional constraint (unused for frictionless constraint).

## m_normals

std::array<Math::Vector3d, 2> SurgSim::Physics::SlidingConstraintData::m_normals

private

The normals of the two planes.

## m_point

Math::Vector3d SurgSim::Physics::SlidingConstraintData::m_point

private

The point of constraint.

## m_slidingDirection

Math::Vector3d SurgSim::Physics::SlidingConstraintData::m_slidingDirection

private

The sliding direction (intersection of the two planes).

## m_tangent

Math::Vector3d SurgSim::Physics::SlidingConstraintData::m_tangent

private

The tangent of the two planes.

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

- SurgSim/Physics/SlidingConstraintData.h
- SurgSim/Physics/SlidingConstraintData.cpp