FreeBox Type
A class containing a flat array of 24 floats representing an arbitrary 3D box-like topology. The 8 corner points are stored interleaved as x0, y0, z0, x1, y1, z1, ... x7, y7, z7. The points can be in arbitrary position in space.
7 6
+---------------+
/| /|
/ | / |
4 / | 5 / |
+---------------+ |
| | | |
| +-----------|---+
| / 3 | / 2
| / | /
|/ |/
+---------------+
0 1
Instance members
| Instance member |
Description
|
Full Usage:
this.AsFSharpCode
Returns: string
|
Format FreeBox into an F# code string that can be used to recreate the box.
|
|
Converts the flat float buffer of the FreeBox into an array of the 8 corner points. Use .XYZs to access the live internal buffer.
|
Full Usage:
this.AsString
Returns: string
|
Nicely formatted string representation of the box including Pt0.
|
|
Returns a new FreeBox that is a copy of this one, with its own flat array of 24 floats.
|
|
Returns the edge between point 0 and point 1.
|
|
Returns the edge between point 0 and point 3.
|
|
Returns the edge between point 0 and point 4.
|
|
Returns the edge between point 1 and point 0. This is the reverse of Edge01.
|
|
Returns the edge between point 1 and point 2.
|
|
Returns the edge between point 1 and point 5.
|
|
Returns the edge between point 2 and point 1. This is the reverse of Edge12.
|
|
Returns the edge between point 2 and point 3. This is the reverse of Edge32.
|
|
Returns the edge between point 2 and point 6.
|
|
Returns the edge between point 3 and point 0. This is the reverse of Edge03.
|
|
Returns the edge between point 3 and point 2.
|
|
Returns the edge between point 3 and point 7.
|
|
Returns the edge between point 4 and point 0. This is the reverse of Edge04.
|
|
Returns the edge between point 4 and point 5.
|
|
Returns the edge between point 4 and point 7.
|
|
Returns the edge between point 5 and point 1. This is the reverse of Edge15.
|
|
Returns the edge between point 5 and point 4. This is the reverse of Edge45.
|
|
Returns the edge between point 5 and point 6.
|
|
Returns the edge between point 6 and point 2. This is the reverse of Edge26.
|
|
Returns the edge between point 6 and point 5. This is the reverse of Edge56.
|
|
Returns the edge between point 6 and point 7. This is the reverse of Edge76.
|
|
Returns the edge between point 7 and point 3. This is the reverse of Edge37.
|
|
Returns the edge between point 7 and point 4. This is the reverse of Edge47.
|
|
Returns the edge between point 7 and point 6.
|
|
Returns the 12 box edges. Pairs in this order: 0-1, 1-2, 3-2, 0-3, 0-4, 1-5, 2-6, 3-7, 4-5, 5-6, 7-6, 4-7
|
|
Get the point at the given point index. The index must be between 0 and 7. (this gets Pnt(XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1], XYZs.[pointIndex * 3 + 2]) from the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.GetX
Parameters:
int
Returns: float
|
Get the x coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3] from the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.GetY
Parameters:
int
Returns: float
|
Get the y coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 1] from the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.GetZ
Parameters:
int
Returns: float
|
Get the z coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 2] from the internal flat array of x, y, and z coordinates)
|
|
Moves the point 0 of the box by a vector. All other points stay where they are.
|
|
Moves the point 1 of the box by a vector. All other points stay where they are.
|
|
Moves the point 2 of the box by a vector. All other points stay where they are.
|
|
Moves the point 3 of the box by a vector. All other points stay where they are.
|
|
Moves the point 4 of the box by a vector. All other points stay where they are.
|
|
Moves the point 5 of the box by a vector. All other points stay where they are.
|
|
Moves the point 6 of the box by a vector. All other points stay where they are.
|
|
Moves the point 7 of the box by a vector. All other points stay where they are.
|
|
Moves the point at the given point index by a vector. The index must be between 0 and 7. All other points stay where they are.
|
|
Returns a new FreeBox moved by a given distance in world X direction.
|
|
Returns a new FreeBox moved by a given distance in world Y direction.
|
|
Returns a new FreeBox moved by a given distance in world Z direction.
|
Gets or sets the point 0 of the box. (this gets or sets XYZs.[0], XYZs.[1] and XYZs.[2] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt0X
Returns: float
|
Gets or sets the X coordinate of the point 0 of the box. (this gets or sets XYZs.[0] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt0Y
Returns: float
|
Gets or sets the Y coordinate of the point 0 of the box. (this gets or sets XYZs.[1] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt0Z
Returns: float
|
Gets or sets the Z coordinate of the point 0 of the box. (this gets or sets XYZs.[2] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 1 of the box. (this gets or sets XYZs.[3], XYZs.[4] and XYZs.[5] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt1X
Returns: float
|
Gets or sets the X coordinate of the point 1 of the box. (this gets or sets XYZs.[3] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt1Y
Returns: float
|
Gets or sets the Y coordinate of the point 1 of the box. (this gets or sets XYZs.[4] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt1Z
Returns: float
|
Gets or sets the Z coordinate of the point 1 of the box. (this gets or sets XYZs.[5] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 2 of the box. (this gets or sets XYZs.[6], XYZs.[7] and XYZs.[8] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt2X
Returns: float
|
Gets or sets the X coordinate of the point 2 of the box. (this gets or sets XYZs.[6] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt2Y
Returns: float
|
Gets or sets the Y coordinate of the point 2 of the box. (this gets or sets XYZs.[7] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt2Z
Returns: float
|
Gets or sets the Z coordinate of the point 2 of the box. (this gets or sets XYZs.[8] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 3 of the box. (this gets or sets XYZs.[9], XYZs.[10] and XYZs.[11] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt3X
Returns: float
|
Gets or sets the X coordinate of the point 3 of the box. (this gets or sets XYZs.[9] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt3Y
Returns: float
|
Gets or sets the Y coordinate of the point 3 of the box. (this gets or sets XYZs.[10] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt3Z
Returns: float
|
Gets or sets the Z coordinate of the point 3 of the box. (this gets or sets XYZs.[11] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 4 of the box. (this gets or sets XYZs.[12], XYZs.[13] and XYZs.[14] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt4X
Returns: float
|
Gets or sets the X coordinate of the point 4 of the box. (this gets or sets XYZs.[12] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt4Y
Returns: float
|
Gets or sets the Y coordinate of the point 4 of the box. (this gets or sets XYZs.[13] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt4Z
Returns: float
|
Gets or sets the Z coordinate of the point 4 of the box. (this gets or sets XYZs.[14] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 5 of the box. (this gets or sets XYZs.[15], XYZs.[16] and XYZs.[17] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt5X
Returns: float
|
Gets or sets the X coordinate of the point 5 of the box. (this gets or sets XYZs.[15] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt5Y
Returns: float
|
Gets or sets the Y coordinate of the point 5 of the box. (this gets or sets XYZs.[16] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt5Z
Returns: float
|
Gets or sets the Z coordinate of the point 5 of the box. (this gets or sets XYZs.[17] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 6 of the box. (this gets or sets XYZs.[18], XYZs.[19] and XYZs.[20] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt6X
Returns: float
|
Gets or sets the X coordinate of the point 6 of the box. (this gets or sets XYZs.[18] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt6Y
Returns: float
|
Gets or sets the Y coordinate of the point 6 of the box. (this gets or sets XYZs.[19] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt6Z
Returns: float
|
Gets or sets the Z coordinate of the point 6 of the box. (this gets or sets XYZs.[20] of the internal flat array of x, y, and z coordinates)
|
Gets or sets the point 7 of the box. (this gets or sets XYZs.[21], XYZs.[22] and XYZs.[23] of the internal flat array of x, y, and z coordinates)
|
|
Full Usage:
this.Pt7X
Returns: float
|
Gets or sets the X coordinate of the point 7 of the box. (this gets or sets XYZs.[21] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt7Y
Returns: float
|
Gets or sets the Y coordinate of the point 7 of the box. (this gets or sets XYZs.[22] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.Pt7Z
Returns: float
|
Gets or sets the Z coordinate of the point 7 of the box. (this gets or sets XYZs.[23] of the internal flat array of x, y, and z coordinates)
|
|
Returns a new FreeBox rotated by a Quaternion. The box is rotated around the World Origin.
|
|
Returns a new FreeBox rotated by a Quaternion around a given center point.
|
|
Returns a new FreeBox scaled by a given factor on the world origin (0, 0, 0).
|
|
|
|
Sets the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)
|
Full Usage:
this.SetPtXYZ
Parameters:
int
x : float
y : float
z : float
|
Sets the x, y, and z coordinates of the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)
|
|
|
|
|
Full Usage:
this.XYZs
Returns: float[]
|
Gets the X, Y and Z interleaved array of 24 floats of the box: x0, y0, z0, x1, y1, z1, ... x7, y7, z7. This is the live internal buffer, so changes to the array will be reflected in the FreeBox.
|
Static members
| Static member |
Description
|
|
Format FreeBox into an F# code string that can be used to recreate the box.
|
|
|
|
|
|
Creates a FreeBox from a flat array of 24 floats: x0, y0, z0, x1, y1, z1, ... x7, y7, z7. The array is used directly as the internal buffer, it is not copied.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
FreeBox.getX pointIndex b
Parameters:
int
b : FreeBox
Returns: float
Modifiers: inline |
Get the x coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3] from the internal flat array of x, y, and z coordinates)
|
|
Gets the X, Y and Z interleaved array of 24 floats of the box: x0, y0, z0, x1, y1, z1, ... x7, y7, z7. This is the live internal buffer, so changes to the array will be reflected in the FreeBox.
|
Full Usage:
FreeBox.getY pointIndex b
Parameters:
int
b : FreeBox
Returns: float
Modifiers: inline |
Get the y coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 1] from the internal flat array of x, y, and z coordinates)
|
Full Usage:
FreeBox.getZ pointIndex b
Parameters:
int
b : FreeBox
Returns: float
Modifiers: inline |
Get the z coordinate of the point at the given point index. The index must be between 0 and 7. (this gets XYZs.[pointIndex * 3 + 2] from the internal flat array of x, y, and z coordinates)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
FreeBox.rotate q b
Parameters:
Quaternion
b : FreeBox
Returns: FreeBox
Modifiers: inline |
Returns a new FreeBox rotated by a Quaternion. The box is rotated around the World Origin.
|
Full Usage:
FreeBox.rotateWithCenter cen q b
Parameters:
Pnt
q : Quaternion
b : FreeBox
Returns: FreeBox
Modifiers: inline |
Returns a new FreeBox rotated by a Quaternion around a given center point.
|
|
|
|
|
|
|
Full Usage:
FreeBox.setPtXYZ pointIndex x y z b
Parameters:
int
x : float
y : float
z : float
b : FreeBox
Modifiers: inline |
Sets the x, y, and z coordinates of the point at the given point index. The index must be between 0 and 7. (this sets XYZs.[pointIndex * 3], XYZs.[pointIndex * 3 + 1] and XYZs.[pointIndex * 3 + 2] of the internal flat array of x, y, and z coordinates)
|
|
|
Full Usage:
FreeBox.transformRigid m b
Parameters:
RigidMatrix
b : FreeBox
Returns: FreeBox
Modifiers: inline |
Returns a new FreeBox with a RigidMatrix applied to it.
|
|
Euclid