Skip to content

box2

Define a 2D Box structure

Members

Type Name Description
float2 center the center position of the box read only
float2 size the current size of the box in his own X & Y axes read only

Functions

Return Name Description
float2 getCenter() Returns the center position of the Box.
float2 getSize() return the X and Y dimensions of the Box.
matrix2 getToCenterTransfo() Returns a transformation matrix contained within the Box. The origin is placed at the center of the Box.
float2 toCenter( in float2 p ) Return the transformed position in Box space. The origin is placed at the center of the Box.
float getDistance( in float2 p ) Return the signed difference between the given point and the Box.