Box3D

From SDK
Jump to navigation Jump to search
Back.jpg

This object represents a 3D bounding box for objects.

Properties

.BLC

Interaction: Read Only

Returns: (Point3D) a point representing the bottom left corner of the bounding box


.BRC

Interaction: Read Only

Returns: (Point3D) a point representing the bottom right corner of the bounding box


.Centre

Interaction: Read Only

Returns: (Point3D) a point representing the centre of the bounding box (British spelling)


.Center

Interaction: Read Only

Returns: (Point3D) a point representing the centre of the bounding box (U.S spelling)


.IsInvalid

Interaction: Read Only

Returns: (bool) true if the box is in an invalid state (Note: not initialised or SetInvalid called)


.MaxLength

Interaction: Read Only

Returns: (double) the length of the longest side for the bounding box


.MaxX

Interaction: Read Only

Returns: (double) the maximum X value for the bounding box


.MaxY

Interaction: Read Only

Returns: (double) the maximum Y value for the bounding box


.MaxZ

Interaction: Read Only

Returns: (double) the maximum Z value for the bounding box


.MinLength

Interaction: Read Only

Returns: (double) the length of the shortest side for the bounding box


.MinX

Interaction: Read Only

Returns: (double) the minimum X value for the bounding box


.MinY

Interaction: Read Only

Returns: (double) the minimum Y value for the bounding box


.MinZ

Interaction: Read Only Returns: (double) the minimum Z value for the bounding box


.TRC

Interaction: Read Only

Returns: (Point3D) a point representing the top right corner of the bounding box


.TLC

Interaction: Read Only

Returns: (Point3D) a point representing the top left corner of the bounding box


.XLength

Interaction: Read Only

Returns: (double) the length in X for the bounding box


.YLength

Interaction: Read Only

Returns: (double) the length in Y for the bounding box


.ZLength

Interaction: Read Only

Returns: (double) the length in Z for the bounding box


Methods

:Expand( double offset_dist)

Expand this box on all sides by passed amount ::offset_dist (double) distance to offset box by


:IsInside( Point3D point, double tol)

Returns: (bool) true if passed point is inside this box within passed tolerance (which may be 0.0). ::point (Point3D) point to test to see if inside box

tol(double) tolerance value to use when checking if inside box


:IsInsideOrOn( Point3D point, double tol)

Returns: (bool) true if passed point is inside or on the edge of this box within passed tolerance (which may be 0.0).

point (Point3D) point to test to see if inside or on box
tol(double) tolerance value to use when checking if inside box


:IsInside(Box3D box, bool on_counts_as_int, double tol)

Returns: (bool) true if passed box intersects this box within passed tolerance (which may be 0.0).

box (Box2D) box to test to see if intersects this box
on_counts_as_int (bool) if true boxes with shared edges count as intersections
tol(double) tolerance value to use when checking if inside box


:Intersects(Box3D box, double tol)

Returns: (bool) true if passed box is inside this box within passed tolerance (which may be 0.0).

box (Box3D) box to test to see if inside this box
tol(double) tolerance value to use when checking if inside box


:Merge(double x, double y, double z)

Merge a point with the passed values into the box updating limits

x(double) x value for point being merged
y(double) y value for point being merged
z(double) z value for point being merged


:Merge(Point3D point)

Merge a point into the box updating limits

point (Point3D) point being merged


:Merge(Box3D box)

Merge another box into this box, updating the limits ::box (Box3D) box being merged


:SetInvalid()

Set the box to invalid state


Back.jpg

References

Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information