pwu::Extents

Utility functions for extent boxes, which are represented as a list of two vectors (the min and max of the box).

Summary
pwu::ExtentsUtility functions for extent boxes, which are represented as a list of two vectors (the min and max of the box).
Static Actions
emptyCreate an empty extents box
minimumGet the minimum point of an extents box
maximumGet the maximum point of an extents box
centerGet the center point of an extents box
minimumSideGet the length of the minimum side of an extents box
maximumSideGet the length of the maximum side of an extents box
isEmptyCheck if an extents box is empty
diagonalGet the length of the diagonal of an extents box
encloseReturn an extents box that is the target extents with the given point or extents box enclosed within it
expandReturn an extents box that is the target extents expanded by the given amount at both minimum and maximum
isIntersectingReturn true if two given extents boxes intersect
isInsideReturn true if a point lies within the extents
translateTranslate the given extents box by an offset
rotateRotate the given extents box by a quaternion

Static Actions

empty

pwu::Extents empty

Create an empty extents box

Parameters

none

Returns

an empty extents box

minimum

pwu::Extents minimum ext

Get the minimum point of an extents box

Parameters

extthe extents box

Returns

the minimum point

maximum

pwu::Extents maximum ext

Get the maximum point of an extents box

Parameters

extthe extents box

Returns

the maximum point

center

pwu::Extents center ext

Get the center point of an extents box

Parameters

extthe extents box

Returns

the center point

minimumSide

pwu::Extents minimumSide ext

Get the length of the minimum side of an extents box

Parameters

extthe extents box

Returns

the minimum side length

maximumSide

pwu::Extents maximumSide ext

Get the length of the maximum side of an extents box

Parameters

extthe extents box

Returns

the maximum side length

isEmpty

pwu::Extents isEmpty ext

Check if an extents box is empty

Parameters

extthe extents box

Returns

true if the extents box is empty

diagonal

pwu::Extents diagonal ext

Get the length of the diagonal of an extents box

Parameters

extthe extents box

Returns

the length of the diagonal

enclose

pwu::Extents enclose target < pt | ext >

Return an extents box that is the target extents with the given point or extents box enclosed within it

Parameters

targetthe extents box to enclose into
ptthe point to enclose
extthe extents box to enclose

Returns

an extents box

expand

pwu::Extents expand ext value

Return an extents box that is the target extents expanded by the given amount at both minimum and maximum

Parameters

targetthe extents box to expand
valuethe amount to expand

Returns

an extents box

isIntersecting

pwu::Extents isIntersecting ext1 ext2

Return true if two given extents boxes intersect

Parameters

bbox1the 1st extents box to test
bbox2the 2nd extents box to test

Returns

True if intersecting

isInside

pwu::Extents isInside ext pt

Return true if a point lies within the extents

Parameters

extthe extents box
ptthe point to test

Returns

True if point is inside the extents

translate

pwu::Extents translate ext offset

Translate the given extents box by an offset

Parameters

extthe extents box
offsetthe offset vector

Returns

the translated extents box

rotate

pwu::Extents rotate ext quat

Rotate the given extents box by a quaternion

Parameters

extthe bounding box
quatthe rotation quaternion

Returns

the rotated extents box

pwu::Extents empty
Create an empty extents box
pwu::Extents minimum ext
Get the minimum point of an extents box
pwu::Extents maximum ext
Get the maximum point of an extents box
pwu::Extents center ext
Get the center point of an extents box
pwu::Extents minimumSide ext
Get the length of the minimum side of an extents box
pwu::Extents maximumSide ext
Get the length of the maximum side of an extents box
pwu::Extents isEmpty ext
Check if an extents box is empty
pwu::Extents diagonal ext
Get the length of the diagonal of an extents box
pwu::Extents enclose target < pt | ext >
Return an extents box that is the target extents with the given point or extents box enclosed within it
pwu::Extents expand ext value
Return an extents box that is the target extents expanded by the given amount at both minimum and maximum
pwu::Extents isIntersecting ext1 ext2
Return true if two given extents boxes intersect
pwu::Extents isInside ext pt
Return true if a point lies within the extents
pwu::Extents translate ext offset
Translate the given extents box by an offset
pwu::Extents rotate ext quat
Rotate the given extents box by a quaternion
Close