dchip.cpBB

Undocumented in source.

Members

Aliases

cpBBNew
alias cpBBNew = cpBB

Convenience constructor for cpBB structs.

Functions

cpBBArea
cpFloat cpBBArea(cpBB bb)

Returns the area of the bounding box.

cpBBCenter
cpVect cpBBCenter(cpBB bb)

Returns the center of a bounding box.

cpBBClampVect
cpVect cpBBClampVect(cpBB bb, cpVect v)

Clamp a vector to a bounding box.

cpBBContainsBB
cpBool cpBBContainsBB(cpBB bb, cpBB other)

Returns true if @c other lies completely within @c bb.

cpBBContainsVect
cpBool cpBBContainsVect(cpBB bb, cpVect v)

Returns true if @c bb contains @c v.

cpBBExpand
cpBB cpBBExpand(cpBB bb, cpVect v)

Returns a bounding box that holds both @c bb and @c v.

cpBBIntersects
cpBool cpBBIntersects(cpBB a, cpBB b)

Returns true if @c a and @c b intersect.

cpBBIntersectsSegment
cpBool cpBBIntersectsSegment(cpBB bb, cpVect a, cpVect b)

Return true if the bounding box intersects the line segment with ends @c a and @c b.

cpBBMerge
cpBB cpBBMerge(cpBB a, cpBB b)

Returns a bounding box that holds both bounding boxes.

cpBBMergedArea
cpFloat cpBBMergedArea(cpBB a, cpBB b)

Merges @c a and @c b and returns the area of the merged bounding box.

cpBBNewForCircle
cpBB cpBBNewForCircle(cpVect p, cpFloat r)

Constructs a cpBB for a circle with the given position and radius.

cpBBSegmentQuery
cpFloat cpBBSegmentQuery(cpBB bb, cpVect a, cpVect b)

Returns the fraction along the segment query the cpBB is hit. Returns INFINITY if it doesn't hit.

cpBBWrapVect
cpVect cpBBWrapVect(cpBB bb, cpVect v)

Wrap a vector to a bounding box.

Structs

cpBB
struct cpBB

Chipmunk's axis-aligned 2D bounding box type along with a few handy routines. Chipmunk's axis-aligned 2D bounding box type. (left, bottom, right, top)

Meta