EdgeShape class

A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The connectivity information is used to ensure correct contact normals.

@author Daniel

Inheritance

Constructors

EdgeShape()

Properties

hasVertex0 bool
read / write
hasVertex3 bool
read / write
normal Vector2
final
vertex0 Vector2
optional adjacent vertex 1. Used for smooth collision
final
vertex1 Vector2
edge vertex 1
final
vertex2 Vector2
edge vertex 2
final
vertex3 Vector2
optional adjacent vertex 2. Used for smooth collision
final
hashCode int
The hash code for this object. [...]
read-only, inherited
radius double
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
shapeType ShapeType
final, inherited

Methods

clone() Shape
override
computeAABB(AABB aabb, Transform xf, int childIndex) → void
Given a transform, compute the associated axis aligned bounding box for a child shape. [...]
override
computeDistanceToOut(Transform xf, Vector2 p, int childIndex, Vector2 normalOut) double
Compute the distance from the current shape to the specified point. This only works for convex shapes. [...]
override
computeMass(MassData massData, double density) → void
Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin. [...]
override
getChildCount() int
Get the number of child primitives [...]
override
raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex) bool
Cast a ray against a child shape. [...]
override
set(Vector2 v1, Vector2 v2) → void
testPoint(Transform xf, Vector2 p) bool
Test a point for containment in this shape. This only works for convex shapes. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited