|
Chipmunk
6.0.3
Chipmunk API Reference for Kobold2D developers
|
Data Structures | |
| struct | cpBB |
| Chipmunk's axis-aligned 2D bounding box type. (left, bottom, right, top) More... | |
Functions | |
| static cpBB | cpBBNew (const cpFloat l, const cpFloat b, const cpFloat r, const cpFloat t) |
| Convenience constructor for cpBB structs. | |
| static cpBB | cpBBNewForCircle (const cpVect p, const cpFloat r) |
| Constructs a cpBB for a circle with the given position and radius. | |
| static cpBool | cpBBIntersects (const cpBB a, const cpBB b) |
Returns true if a and b intersect. | |
| static cpBool | cpBBContainsBB (const cpBB bb, const cpBB other) |
Returns true if other lies completely within bb. | |
| static cpBool | cpBBContainsVect (const cpBB bb, const cpVect v) |
Returns true if bb contains v. | |
| static cpBB | cpBBMerge (const cpBB a, const cpBB b) |
| Returns a bounding box that holds both bounding boxes. | |
| static cpBB | cpBBExpand (const cpBB bb, const cpVect v) |
Returns a bounding box that holds both bb and v. | |
| static cpFloat | cpBBArea (cpBB bb) |
| Returns the area of the bounding box. | |
| static cpFloat | cpBBMergedArea (cpBB a, cpBB b) |
Merges a and b and returns the area of the merged bounding box. | |
| static 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. | |
| static cpBool | cpBBIntersectsSegment (cpBB bb, cpVect a, cpVect b) |
Return true if the bounding box intersects the line segment with ends a and b. | |
| cpVect | cpBBClampVect (const cpBB bb, const cpVect v) |
| Clamp a vector to a bounding box. | |
| cpVect | cpBBWrapVect (const cpBB bb, const cpVect v) |
| Wrap a vector to a bounding box. | |
Chipmunk's axis-aligned 2D bounding box type along with a few handy routines.
Returns true if other lies completely within bb.
Returns true if bb contains v.
Returns a bounding box that holds both bb and v.
Returns true if a and b intersect.
Return true if the bounding box intersects the line segment with ends a and b.
Returns a bounding box that holds both bounding boxes.
Merges a and b and returns the area of the merged bounding box.
| static cpBB cpBBNew | ( | const cpFloat | l, |
| const cpFloat | b, | ||
| const cpFloat | r, | ||
| const cpFloat | t | ||
| ) | [inline, static] |
Convenience constructor for cpBB structs.
Constructs a cpBB for a circle with the given position and radius.
Returns the fraction along the segment query the cpBB is hit. Returns INFINITY if it doesn't hit.