Header menu logo Nu

SkeletonBounds Type

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.

Constructors

Constructor Description

SkeletonBounds()

Full Usage: SkeletonBounds()

Instance members

Instance member Description

this.AabbContainsPoint

Full Usage: this.AabbContainsPoint

Parameters:
    x : float32
    y : float32

Returns: bool

Returns true if the axis aligned bounding box contains the point.

x : float32
y : float32
Returns: bool

this.AabbIntersectsSegment

Full Usage: this.AabbIntersectsSegment

Parameters:
    x1 : float32
    y1 : float32
    x2 : float32
    y2 : float32

Returns: bool

Returns true if the axis aligned bounding box intersects the line segment.

x1 : float32
y1 : float32
x2 : float32
y2 : float32
Returns: bool

this.AabbIntersectsSkeleton

Full Usage: this.AabbIntersectsSkeleton

Parameters:
Returns: bool

Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds.

bounds : SkeletonBounds
Returns: bool

this.BoundingBoxes

Full Usage: this.BoundingBoxes

this.ContainsPoint

Full Usage: this.ContainsPoint

Parameters:
    polygon : Polygon
    x : float32
    y : float32

Returns: bool

Returns true if the polygon contains the point.

polygon : Polygon
x : float32
y : float32
Returns: bool

this.ContainsPoint

Full Usage: this.ContainsPoint

Parameters:
    x : float32
    y : float32

Returns: 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 SkeletonBounds.AabbContainsPoint returns true.

x : float32
y : float32
Returns: BoundingBoxAttachment

this.GetPolygon

Full Usage: this.GetPolygon

Parameters:
Returns: Polygon
attachment : BoundingBoxAttachment
Returns: Polygon

this.Height

Full Usage: this.Height

Returns: float32
Returns: float32

this.IntersectsSegment

Full Usage: this.IntersectsSegment

Parameters:
    x1 : float32
    y1 : float32
    x2 : float32
    y2 : float32

Returns: BoundingBoxAttachment

Returns the first bounding box attachment that contains 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.

x1 : float32
y1 : float32
x2 : float32
y2 : float32
Returns: BoundingBoxAttachment

this.IntersectsSegment

Full Usage: this.IntersectsSegment

Parameters:
    polygon : Polygon
    x1 : float32
    y1 : float32
    x2 : float32
    y2 : float32

Returns: bool

Returns true if the polygon contains the line segment.

polygon : Polygon
x1 : float32
y1 : float32
x2 : float32
y2 : float32
Returns: bool

this.MaxX

Full Usage: this.MaxX

this.MaxY

Full Usage: this.MaxY

this.MinX

Full Usage: this.MinX

this.MinY

Full Usage: this.MinY

this.Polygons

Full Usage: this.Polygons

this.Update

Full Usage: this.Update

Parameters:
    skeleton : Skeleton - The skeleton.
    updateAabb : bool - If true, the axis aligned bounding box containing all the polygons is computed. If false, the SkeletonBounds AABB methods will always return true.

Clears any previous polygons, finds all visible bounding box attachments, and computes the world vertices for each bounding box's polygon.

skeleton : Skeleton

The skeleton.

updateAabb : bool

If true, the axis aligned bounding box containing all the polygons is computed. If false, the SkeletonBounds AABB methods will always return true.

this.Width

Full Usage: this.Width

Returns: float32
Returns: float32

Type something to start searching.