Contact

Introduction

Contact represents the relation between a body part and a contactable object.

Body parts can have multiple bones and sub-parts (e.g. a hand has 1 bone (wrist) and 5 fingers (sub-parts)). Contact stores which bones under this part (bones of part and its sub-parts) are touching or are close to touch (entered).

Variables

Name: Name of the contact. Useful for debugging.

Detector: ContactDetection module which is responsible for updating this contact. This ContactDetection module is linked (as child module) to a body part.

Contactable: ContactableView that represents the object that is being contacted.

Special Parts Touching: How many bones are touching the contactable object and are linked to a part or sub-part that is specially involved in grasping.

Hand, thumb finger and index finger are the 3 parts that are specially involved in grasping.

Type:

  • None: 0 bones are entered.

  • Entered: At least 1 bone is entered. 0 bones are touching touching.

  • Touching: At least 1 bone is touching. Grasping is not detected.

  • Grasped: At least 1 bone is touching. Grasping is detected.

Grasping is detected when:

  • There are at least 2 parts touching.

  • There are at least 2 parts touching that are specially involved in grasping.

  • Not all parts that are touching are parts specially involved in grasping.

Entered Time: Elapsed time since at least one bone entered the contactable object.

Touched Time: Elapsed time since at least one bone touched the contactable object.

Grasped Time: Elapsed time since Contact.type became Grasped.

Bones Entered: List of BoneModels that are near the contactable object.

Bones Touching: List of BoneCollisionModels that are touching the contactable object.

ContactDetectionView.contacts returns a list of ContactViews.

BoneCollisionModel

Bone: BoneModel which slave representation performed the contact.

Points: List of ContactPoints retrieved from the collision detection.

ContactView.bonesTouching return a list of BoneCollisionViews.

Last updated

Was this helpful?