pwu:: Extents

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

Summary
Utility functions for extent boxes, which are represented as a list of two vectors (the min and max of the box).
Create an empty extents box
Get the minimum point of an extents box
Get the maximum point of an extents box
Check if an extents box is empty
Get the length of the diagonal of an extents box
Return an extents box that is the target extents with the given point or extents box enclosed within it
Translate the given extents box by an offset
Rotate 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

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

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 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 translate ext offset
Translate the given extents box by an offset
pwu::Extents rotate ext quat
Rotate the given extents box by a quaternion