Create a new rock block
Create a new rock block
Cartesian coordinates for the center of the rock block. The individual components can be accessed as 'centerX', 'centerY', and 'centerZ'.
The faces that define the boundaries of the rock block.
An integer identifying the joint that caused this rock block to be cut from its parent. The generation is used to avoid unnecessary checks for geometrically redundant faces, but it can be safely left as its default value of 0.
Compare this block and input block for approximate equality within specified tolerance
Compare this block and input block for approximate equality within specified tolerance
Input block
True if blocks are equal, otherwise false
Calculate the vertices of each face of the block
Calculate the vertices of each face of the block
A mapping from each face of the block to a Seq of vertices for that face This function should only be called once all redundant faces have been removed.
Cartesian coordinates for the center of the rock block.
Cartesian coordinates for the center of the rock block. The individual components can be accessed as 'centerX', 'centerY', and 'centerZ'.
Calculates the centroid of the block using simplex integration.
Calculates the centroid of the block using simplex integration.
The centroid of the block, (centerX, centerY, centerZ).
Divide this block into two child blocks if a joint intersects this block.
Divide this block into two child blocks if a joint intersects this block.
A joint that may or may not divide this block.
The minimum radius of a sphere that can be inscribed in the child blocks. If either child block falls below this minimum, no cut is performed.
The maximum ratio of a child block's bounding sphere to the radius of the largest sphere that can be inscribed in the block. If either child falls above this minimum, no cut is performed.
The generation of any child blocks cut from this joint (see Block constructor documentation for a description of the generation field).
A Seq of Block objects, containing the two child blocks divided by the joint if it intersects this block and any minimum requirements for radius or aspect ratio are met. Otherwise, returns a one-item Seq containing only this block.
The faces that define the boundaries of the rock block.
An integer identifying the joint that caused this rock block to be cut from its parent.
An integer identifying the joint that caused this rock block to be cut from its parent. The generation is used to avoid unnecessary checks for geometrically redundant faces, but it can be safely left as its default value of 0.
Determine whether or not a joint intersects this rock block.
Determine whether or not a joint intersects this rock block.
The joint to check for intersection.
None if the joint does not intersect this block, or Some((x,y,z)) where (x,y,z) is the point of intersection.
Compute the faces of the rock block that are not geometrically redundant.
Compute the faces of the rock block that are not geometrically redundant.
A list of faces that uniquely determine this rock block and are not geometrically redundant.
Get the counter-clockwise oriented vertices of each face of the block
Get the counter-clockwise oriented vertices of each face of the block
A mapping from each face of the block to a Seq of vertices for that face in a counter-clockwise orientation. This function should only be called once all redundant faces have been removed.
Calculates the distances of the joints relative to a new origin
Calculates the distances of the joints relative to a new origin
List of faces with updated distances
A rock block.
Cartesian coordinates for the center of the rock block. The individual components can be accessed as 'centerX', 'centerY', and 'centerZ'.
The faces that define the boundaries of the rock block.
An integer identifying the joint that caused this rock block to be cut from its parent. The generation is used to avoid unnecessary checks for geometrically redundant faces, but it can be safely left as its default value of 0.