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.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.
|
Full Usage:
this.CountZeroSides
Returns: int
Modifiers: inline |
Counts the amount of sides that are smaller than the zeroLength tolerance. This is 0, 1, 2 or 3.
|
|
The diagonal vector of the Box.
|
|
Returns edge 1 (of the 12 box edges.) The returned line is parallel to and oriented with the X-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 1 (of the 12 box edges.) The returned line is parallel to and oriented with the Y-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 10 (of the 12 box edges.) The returned line is parallel to and oriented with the Z-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 11 (of the 12 box edges.) The returned line is parallel to and oriented with the Z-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 2 (of the 12 box edges.) The returned line is parallel to and oriented with the X-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 3 (of the 12 box edges.) The returned line is parallel to and oriented with the Y-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 4 (of the 12 box edges.) The returned line is parallel to and oriented with the X-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 5 (of the 12 box edges.) The returned line is parallel to and oriented with the Y-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 6 (of the 12 box edges.) The returned line is parallel to and oriented with the X-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 7 (of the 12 box edges.) The returned line is parallel to and oriented with the Y-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 8 (of the 12 box edges.) The returned line is parallel to and oriented with the Z-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns edge 9 (of the 12 box edges.) The returned line is parallel to and oriented with the Z-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
|
Returns the 12 box edges. The returned line is parallel to and oriented with the X-Axis, Y-Axis or Z-Axis. local local Z-Axis Y-Axis ^ / | / | +--------E6-----+ | /| / /| |E7 E11 / E5| |/ | / / | +--------E4-----+ E10 | |/ E9 | E8 +-----E2----|---+ | / | / | E3 | E1 |/ |/ local +------E0 ------+------> X-Axis
|
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.
|
|
Returns 6 face of the Box in The normal of the Rect3Ds are oriented with the X-Axis, Y-Axis or Z-Axis. The order of the Rect3D is: BottomFace, FrontFace, RightFace, BackFace, LeftFace, TopFace. local local Z-Axis Y-Axis ^ / | 7 / 6 | +---------------+ | /| / /| | / | / / | 4 |/ | / 5 / | +---------------+ | | |/ | | | +-----------|---+ | / 3 | / 2 | / | / |/ |/ local +---------------+----> X-Axis 0 1
|
|
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
|
Full Usage:
this.HasVolume
Returns: bool
Modifiers: inline |
Tests if none of the X, Y and Z axis is smaller than the zeroLength tolerance. Same as .IsValid
|
Full Usage:
this.IsFlat
Returns: bool
Modifiers: inline |
Tests if one of the X, Y and Z axis is smaller than the zeroLength tolerance.
|
Full Usage:
this.IsLine
Returns: bool
Modifiers: inline |
Tests if two of the X, Y and Z axis is smaller than the zeroLength tolerance.
|
Full Usage:
this.IsPoint
Returns: bool
Modifiers: inline |
Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsZero.
|
Full Usage:
this.IsValid
Returns: bool
Modifiers: inline |
Tests if no sides of the X, Y and Z axis is smaller than the zeroLength tolerance. Same as .HasVolume
|
Full Usage:
this.IsZero
Returns: bool
Modifiers: inline |
Tests if all sides are smaller than the zeroLength tolerance. This is the same as IsPoint.
|
|
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
|
Full Usage:
this.LongestEdge
Returns: float
Modifiers: inline |
Returns the longest edge of the Box.
|
Full Usage:
this.LongestEdgeSq
Returns: float
Modifiers: inline |
Returns the square of longest edge of the Box.
|
|
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.ShortestEdge
Returns: float
Modifiers: inline |
Returns the shortest edge of the Box.
|
Full Usage:
this.ShortestEdgeSq
Returns: float
Modifiers: inline |
Returns the square of longest shortest edge of the Box.
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the 3D box expanded by a relative factor on all six sides, separately for X, Y, Z. Values between 0.0 and 1.0 shrink the box. Values larger than 1.0 expand the box. Does check for underflow if any factor is negative and raises EuclidException.
|
|
|
|
|
|
|
|
|
|
Transform the Box by the given RigidMatrix. The returned Box is guaranteed to have still orthogonal vectors.
|
|
|
|
|
|