82 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2020-07-28 20:21:55 -07:00
[Planck.js API Doc](../README.md) › [Globals](../globals.md) › [ContactEdge](contactedge.md)
2020-07-27 00:12:01 -07:00
2020-07-28 20:21:55 -07:00
# Class: ContactEdge
2020-07-27 00:12:01 -07:00
2021-04-16 17:10:15 +02:00
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.
2020-07-27 00:12:01 -07:00
## Hierarchy
* **ContactEdge**
## Index
2021-04-16 17:10:15 +02:00
### Constructors
* [constructor](contactedge.md#constructor)
2020-07-27 00:12:01 -07:00
### Properties
* [contact](contactedge.md#contact)
* [next](contactedge.md#next)
* [other](contactedge.md#other)
* [prev](contactedge.md#prev)
2021-04-16 17:10:15 +02:00
## Constructors
### constructor
2021-05-11 18:30:36 -07:00
\+ **new ContactEdge**(`contact`: [Contact](contact.md)): *[ContactEdge](contactedge.md)*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:60](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L60)*
2021-04-16 17:10:15 +02:00
**Parameters:**
Name | Type |
------ | ------ |
2021-05-11 18:30:36 -07:00
`contact` | [Contact](contact.md) |
2021-04-16 17:10:15 +02:00
**Returns:** *[ContactEdge](contactedge.md)*
2020-07-27 00:12:01 -07:00
## Properties
### contact
• **contact**: *[Contact](contact.md)*
2021-04-16 17:10:15 +02:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:57](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L57)*
2020-07-27 00:12:01 -07:00
___
### next
• **next**: *[ContactEdge](contactedge.md) | undefined*
2020-07-27 00:12:01 -07:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:59](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L59)*
2020-07-27 00:12:01 -07:00
___
### other
• **other**: *[Body](body.md) | undefined*
2020-07-27 00:12:01 -07:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:60](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L60)*
2020-07-27 00:12:01 -07:00
___
### prev
• **prev**: *[ContactEdge](contactedge.md) | undefined*
2020-07-27 00:12:01 -07:00
2021-05-11 18:30:36 -07:00
*Defined in [src/dynamics/Contact.ts:58](https://github.com/shakiba/planck.js/blob/acc3bd8/src/dynamics/Contact.ts#L58)*