# Struct ncollide3d::query::ContactKinematic[−][src]

`pub struct ContactKinematic<N: Real> { /* fields omitted */ }`

Local contact kinematic of a pair of solids around two given points.

This is used to update the localization of contact points between two solids from one frame to another. To achieve this, the local shape of the solids around the given points are approximated by either dilated lines (unbounded cylinders), planes, dilated points (spheres).

## Methods

### `impl<N: Real> ContactKinematic<N>`[src]

#### `pub fn new() -> Self`[src]

Initializes an empty contact kinematic.

All the contact kinematic information must be filled using methods prefixed by `set_`.

#### `pub fn transform1(&mut self, m: &Isometry<N>)`[src]

Applies the given transformation to the first set of contact information.

#### `pub fn transform2(&mut self, m: &Isometry<N>)`[src]

Applies the given transformation to the second set of contact information.

#### `pub fn dilation1(&self) -> N`[src]

The dilation of the first solid.

#### `pub fn dilation2(&self) -> N`[src]

The dilation of the second solid.

#### `pub fn local1(&self) -> Point<N>`[src]

The tracked point in local space of the first solid.

This may not correspond to the contact point in the local space of the first since it does not takes the dilation into account.

#### `pub fn local2(&self) -> Point<N>`[src]

The tracked point in local space of the second solid.

This may not correspond to the contact point in the local space of the second solid since it does not takes the dilation into account.

#### `pub fn feature1(&self) -> FeatureId`[src]

The shape-dependent identifier of the feature of the first solid on which lies the contact point.

#### `pub fn feature2(&self) -> FeatureId`[src]

The shape-dependent identifier of the feature of the second solid on which lies the contact point.

#### `pub fn set_dilation1(&mut self, margin: N)`[src]

Sets the dilation of the first solid.

#### `pub fn set_dilation2(&mut self, margin: N)`[src]

Sets the dilation of the second solid.

#### `pub fn set_plane1(    &mut self,     fid: FeatureId,     pt: Point<N>,     normal: Unit<Vector<N>>)`[src]

Define as a plane the local approximation of the shape of the first solid.

#### `pub fn set_plane2(    &mut self,     fid: FeatureId,     pt: Point<N>,     normal: Unit<Vector<N>>)`[src]

Define as a plane the local approximation of the shape of the second solid.

#### `pub fn set_line1(    &mut self,     fid: FeatureId,     pt: Point<N>,     dir: Unit<Vector<N>>,     normals: PolyhedralCone<N>)`[src]

Define as a line the local approximation of the shape of the second solid.

#### `pub fn set_line2(    &mut self,     fid: FeatureId,     pt: Point<N>,     dir: Unit<Vector<N>>,     normals: PolyhedralCone<N>)`[src]

Define as a line the local approximation of the shape of the second solid.

#### `pub fn set_point1(    &mut self,     fid: FeatureId,     pt: Point<N>,     normals: PolyhedralCone<N>)`[src]

Define as a point the local approximation of the shape of the second solid.

#### `pub fn set_point2(    &mut self,     fid: FeatureId,     pt: Point<N>,     normals: PolyhedralCone<N>)`[src]

Define as a point the local approximation of the shape of the second solid.

#### `pub fn contact(    &self,     m1: &Isometry<N>,     m2: &Isometry<N>,     default_normal1: &Unit<Vector<N>>) -> Option<Contact<N>>`[src]

Computes the updated contact points with the new positions of the solids.

The vector `default_normal1` is the normal of the resulting contactc in the rare case where the contact normal cannot be determined by the update. Typically, this should be set to the latest contact normal known.

## Trait Implementations

### `impl<N: Clone + Real> Clone for ContactKinematic<N>`[src]

#### `fn clone(&self) -> ContactKinematic<N>`[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`1.0.0[src]

Performs copy-assignment from `source`. Read more

### `impl<N: Debug + Real> Debug for ContactKinematic<N>`[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`[src]

Formats the value using the given formatter. Read more