| Line 1: |
Line 1: |
| | + | |
| | A bounding box is a structure the contains the left, bottom, right, and top edges of a box. | | A bounding box is a structure the contains the left, bottom, right, and top edges of a box. |
| | | | |
| | Its type is TI.cpBB. | | Its type is TI.cpBB. |
| | + | |
| | + | |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== BB ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bb = physics.BB(l, b, r, t) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | l |
| | + | | '''in''' number |
| | + | | left |
| | + | |- |
| | + | | b |
| | + | | '''in''' number |
| | + | | bottom |
| | + | |- |
| | + | | r |
| | + | | '''in''' number |
| | + | | right |
| | + | |- |
| | + | | t |
| | + | | '''in''' number |
| | + | | top |
| | + | |- |
| | + | | bb |
| | + | | '''out''' physics.BB |
| | + | | A bounding box with boundaries left, bottom, right, and top |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns a new bounding box with the given initial edges. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== b ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bottom = physics.BB:b() |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | bottom |
| | + | | '''out''' number |
| | + | | The bottom edge of the bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns the bottom edge of the bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== clampVect ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">cvec = physics.BB:clampVect(vec) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | vec |
| | + | | '''in''' physics.Vect |
| | + | | A vector |
| | + | |- |
| | + | | cvec |
| | + | | '''out''' physics.Vect |
| | + | | A vector clamped to the bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns a copy of ''vec'' clamped to the bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== containsBB ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bool = physics.BB:containsBB(other) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | other |
| | + | | '''in''' physics.BB |
| | + | | The other bounding box |
| | + | |- |
| | + | | bool |
| | + | | '''out''' boolean |
| | + | | True if ''self'' completely contains the ''other'' bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Determines if a bouding box contains another bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== containsVect ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bool = physics.BB:containsVect(vec) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | vec |
| | + | | '''in''' physics.Vect |
| | + | | A vector |
| | + | |- |
| | + | | bool |
| | + | | '''out''' boolean |
| | + | | True if ''self'' contains vector ''vec'' |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Determines if a bounding box contains a vector. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== expand ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bb = phyics.BB:expand(vec) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | vec |
| | + | | '''in''' physics.Vect |
| | + | | A vector |
| | + | |- |
| | + | | bb |
| | + | | '''out''' physics.BB |
| | + | | The bounding box ''self'' expanded to include vector ''vec'' |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns the bounding box that contains both ''self'' and ''vec''. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== intersects ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bool = physics.BB:intersects(other) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | other |
| | + | | '''in''' physics.BB |
| | + | | The other bounding box |
| | + | |- |
| | + | | bool |
| | + | | '''out''' boolean |
| | + | | True if ''self'' intersects the ''other'' bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Determines if two bounding boxes intersect. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== l ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">left = physics.BB:l() |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | left |
| | + | | '''out''' number |
| | + | | The left edge of the bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns the left edge of the bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== merge ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">bb = physics.BB:merge(other) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | other |
| | + | | '''in''' physics.BB |
| | + | | The other bounding box |
| | + | |- |
| | + | | bb |
| | + | | '''out''' physics.BB |
| | + | | The bounding box that contains both ''self'' and the ''other'' bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns the bounding box that contains both ''self'' and the ''other'' bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== setb ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">self = physics.BB:setb(bottom) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | bottom |
| | + | | '''in''' number |
| | + | | The new value for the bottom edge of the bounding box |
| | + | |- |
| | + | | self |
| | + | | '''out''' physics.BB |
| | + | | The input bounding box is returned as the output |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Sets the bottom edge of the bounding box to a new ''value''. Returns ''self''. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== r ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">right = physics.BB:r() |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | right |
| | + | | '''out''' number |
| | + | | The right edge of the bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns the right edge of the bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== setl ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">self = physics.BB:setl(left) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | left |
| | + | | '''in''' number |
| | + | | The new value for the left edge of the bounding box |
| | + | |- |
| | + | | self |
| | + | | '''out''' physics.BB |
| | + | | The input bounding box is returned as the output |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Sets the left edge of the bounding box to a new ''value''. Returns ''self''. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== setr ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">self = physics.BB:setr(right) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | right |
| | + | | '''in''' number |
| | + | | The new value for the right edge of the bounding box |
| | + | |- |
| | + | | self |
| | + | | '''out''' physics.BB |
| | + | | The input bounding box is returned as the output |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Sets the right edge of the bounding box to a new ''value''. Returns ''self''. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== sett ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">self = physics.BB:sett(top) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | top |
| | + | | '''in''' number |
| | + | | The new value for the top edge of the bounding box |
| | + | |- |
| | + | | self |
| | + | | '''out''' physics.BB |
| | + | | The input bounding box is returned as the output |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Sets the top edge of the bounding box to a new ''value''. Returns ''self''. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== t ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">top = physics.BB:t() |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | top |
| | + | | '''out''' number |
| | + | | The top edge of the bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns the top edge of the bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | ---- |
| | + | |
| | + | ===== wrapVect ===== |
| | + | |
| | + | <!-- code start--> |
| | + | <pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">wvec = physics.BB:wrapVect(vec) |
| | + | </pre><!-- code end--> |
| | + | <!-- table start --> |
| | + | |
| | + | {| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable" |
| | + | |- |
| | + | ! Parameter |
| | + | ! Type |
| | + | ! Description <!-- header row end --> |
| | + | |- |
| | + | | self |
| | + | | '''in''' physics.BB |
| | + | | The input bounding box |
| | + | |- |
| | + | | vec |
| | + | | '''in''' physics.Vect |
| | + | | A vector |
| | + | |- |
| | + | | wvec |
| | + | | '''out''' physics.Vect |
| | + | | A vector wrapped to the bounding box |
| | + | |} |
| | + | <!-- table end --> |
| | + | <br> Returns a copy of ''vec'' wrapped to the bounding box. |
| | + | |
| | + | Introduced in platform.apiLevel = '2.0' |
| | + | |
| | + | |
| | | | |
| | [[Category:Physics_Engine]] | | [[Category:Physics_Engine]] |