Instantiates new Wall
- Source
Extends
Methods
(abstract) applyCorrection(particles)
Applies positional corrections on particles (walls do not move)
Parameters:
Name | Type | Description |
---|---|---|
particles | Array.<Particle> |
- Source
(abstract) getHashDimensions() → {Array.<Number>}
Computes the dimensions of the item for the HashGrid
.
- Overrides
- Source
Returns:
rectangular dimensions in [width, height]
- Type:
- Array.<Number>
(abstract) getHashPos() → {Array.<Number>}
Computes the coordinate position for the item within the HashGrid
, expects center position.
- Overrides
- Source
Returns:
- Type:
- Array.<Number>
(abstract) resolveCollisions(particles, timeStep)
Resolve the collisions between the surrounding particles and the Wall itself.
Parameters:
Name | Type | Description |
---|---|---|
particles | Array.<Particle> | surrounding particles that interact with the wall |
timeStep | Number |
- Source
(abstract) vertices() → {Array.<Vector2D>}
Calculates the vertices of the wall
- Source
Returns:
- Type:
- Array.<Vector2D>