SkeletonBounds class

Collects each BoundingBoxAttachment that is visible and computes the world vertices for its polygon. The polygon vertices are provided along with convenience methods for doing hit detection.

Properties

boundingBoxes ArrayBoundingBoxAttachment
Returns all bounding boxes. Requires a call to update() first.
no setter
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the axis aligned bounding box.
no setter
maxX double
The right edge of the axis aligned bounding box.
no setter
maxY double
The top edge of the axis aligned bounding box.
no setter
minX double
The left edge of the axis aligned bounding box.
no setter
minY double
The bottom edge of the axis aligned bounding box.
no setter
nativePtr → Pointer<NativeType>
Get the native pointer for FFI calls
no setter
polygons ArrayPolygon
Returns all polygons or an empty array. Requires a call to update() first.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double
The width of the axis aligned bounding box.
no setter

Methods

aabbContainsPoint(double x, double y) bool
Returns true if the axis aligned bounding box contains the point.
aabbIntersectsSegment(double x1, double y1, double x2, double y2) bool
Returns true if the axis aligned bounding box intersects the line segment.
aabbIntersectsSkeleton(SkeletonBounds bounds) bool
Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds.
containsPoint(Polygon polygon, double x, double y) bool
Returns true if the polygon contains the point.
containsPoint2(double x, double y) BoundingBoxAttachment?
Returns the first bounding box attachment that contains the point, or null. When doing many checks, it is usually more efficient to only call this method if aabbContainsPoint(float, float) returns true.
dispose() → void
getBoundingBox(Polygon? polygon) BoundingBoxAttachment?
Returns the bounding box for the given polygon or null. Requires a call to update() first.
getPolygon(BoundingBoxAttachment? attachment) Polygon?
Returns the polygon for the given bounding box attachment or null if no polygon can be found for the attachment. Requires a call to update() first.
intersectsSegment(double x1, double y1, double x2, double y2) BoundingBoxAttachment?
Returns the first bounding box attachment that contains any part of the line segment, or null. When doing many checks, it is usually more efficient to only call this method if aabbIntersectsSegment(float, float, float, float) returns true.
intersectsSegment2(Polygon polygon, double x1, double y1, double x2, double y2) bool
Returns true if the polygon contains any part of the line segment.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(Skeleton skeleton, bool updateAabb) → void
Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding box's polygon.

Operators

operator ==(Object other) bool
The equality operator.
inherited