Box Type
An immutable 3D Box with any rotation in 3D space. Described by an Origin and three Edge vectors. Similar to PPlane, however the three vectors are not unitized. This implementation guarantees the box to be always valid. That means the Min X, Y and Z axes cannot be flipped individually. However the length of one of these axes might still be zero. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
Record fields
Record Field |
Description
|
The Origin Corner of the Box.
|
|
The Edge vector representing the X-axis of the Box.
|
|
The Edge vector representing the Y-axis of the Box.
|
|
The Edge vector representing the Z-axis of the Box.
|
Instance members
Instance member |
Description
|
Full Usage:
this.AreaSq
Returns: float
Modifiers: inline |
Calculates the squared volume of the Box. by using the squared lengths of the X , Y and Z axis. This is a bit faster than calculating the area and good enough for relative comparisons or sorting by size.
|
Full Usage:
this.AsString
Returns: string
|
Format Box into string with nice floating point number formatting of X, Y and Z size only. But without type name as in v.ToString()
|
Gets the axis aligned 3D Bounding Box of the Box.
|
|
|
Returns the back face of the Box in Counter-Clockwise order, looking from front. Returns Origin at point 3, X-Axis to point 2, Y-Axis to point 7. The normal of the Rect3D points into the Box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns the bottom face of the Box in Counter-Clockwise order, looking from above. Returns Origin at point 0, X-Axis to point 1, Y-Axis to point 3. The normal of the Rect3D points into the Box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
The center of the Box.
|
|
Check for point containment in the Box. By doing 6 dot products with the sides of the rectangle. A point exactly on the edge of the Box is considered inside.
|
|
The diagonal vector of the Box.
|
Full Usage:
this.EvaluateAt
Parameters:
float
yParameter : float
zParameter : float
Returns: Pnt
Modifiers: inline |
Evaluate a X, Y and Z parameter of the Box. 0.0, 0.0, 0.0 returns the Origin. 1.0, 1.0, 1.0 returns the FarCorner.
|
|
The corner diagonally opposite of corner from Origin.
|
|
Returns the front face of the Box in Counter-Clockwise order, looking from front. Returns Origin at point 0, X-Axis to point 1, Y-Axis to point 4. The normal of the Rect3D points away from the Box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns the left face of the Box in Counter-Clockwise order, looking from right. Returns Origin at point 0, X-Axis to point 3, Y-Axis to point 4. The normal of the Rect3D points into the Box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Gets the Plane that this box is based on.
|
|
Returns the bottom corners of the Box in Counter-Clockwise order, starting at Origin. Then the top corners staring above Origin. Returns an array of 8 Points. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
Returns point 0 of the box, same box.Origin. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 1 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 2 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 3 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 4 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 5 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 6 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
Returns point 7 of the box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
|
Returns the right face of the Box in Counter-Clockwise order, looking from right. Returns Origin at point 1, X-Axis to point 2, Y-Axis to point 5. The normal of the Rect3D points away from the Box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
Full Usage:
this.SizeX
Returns: float
Modifiers: inline |
The size in X direction.
|
Full Usage:
this.SizeXSq
Returns: float
Modifiers: inline |
The size in X direction squared.
|
Full Usage:
this.SizeY
Returns: float
Modifiers: inline |
The size in Y direction.
|
Full Usage:
this.SizeYSq
Returns: float
Modifiers: inline |
The size in Y direction squared.
|
Full Usage:
this.SizeZ
Returns: float
Modifiers: inline |
The size in Z direction.
|
Full Usage:
this.SizeZSq
Returns: float
Modifiers: inline |
The size in Z direction squared.
|
|
Returns the top face of the Box in Counter-Clockwise order, looking from above. Returns Origin at point 4, X-Axis to point 5, Y-Axis to point 7. The normal of the Rect3D points away from the Box. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
Full Usage:
this.Volume
Returns: float
Modifiers: inline |
Calculates the volume of the Box.
|
|
Creates a unitized version of the local X-Axis.
|
|
Creates a unitized version of the local Y-Axis.
|
|
Creates a unitized version of the local Z-Axis.
|
Static members
Static member |
Description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Transform the Box by the given RigidMatrix. The returned Box is guaranteed to have still orthogonal vectors.
|
|
|
|
|
|