2021-05-11 18:30:36 -07:00

2.0 KiB
Raw Permalink Blame History

Planck.js API Doc › Globals › ContactEdge

Class: ContactEdge

A contact edge is used to connect bodies and contacts together in a contact graph where each body is a node and each contact is an edge. A contact edge belongs to a doubly linked list maintained in each attached body. Each contact has two contact nodes, one for each attached body.

prop {Contact} contact The contact

prop {ContactEdge} prev The previous contact edge in the body's contact list

prop {ContactEdge} next The next contact edge in the body's contact list

prop {Body} other Provides quick access to the other body attached.

Hierarchy

  • ContactEdge

Index

Constructors

Properties

Constructors

constructor

+ new ContactEdge(contact: Contact): ContactEdge

Defined in src/dynamics/Contact.ts:60

Parameters:

Name Type
contact Contact

Returns: ContactEdge

Properties

contact

• contact: Contact

Defined in src/dynamics/Contact.ts:57


next

• next: ContactEdge | undefined

Defined in src/dynamics/Contact.ts:59


other

• other: Body | undefined

Defined in src/dynamics/Contact.ts:60


prev

• prev: ContactEdge | undefined

Defined in src/dynamics/Contact.ts:58