cloudViewer.geometry.BoundingBox#

class cloudViewer.geometry.BoundingBox#

Class that defines an axis_aligned box that can be computed from 3D geometries, The axis aligned bounding box uses the coordinate axes for bounding box generation.

__init__(*args, **kwargs)#

Overloaded function.

  1. __init__(self: cloudViewer.geometry.BoundingBox) -> None

Default constructor

  1. __init__(self: cloudViewer.geometry.BoundingBox, arg0: cloudViewer.geometry.BoundingBox) -> None

Copy constructor

  1. __init__(self: cloudViewer.geometry.BoundingBox, bbMinCorner: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 1]”], bbMaxCorner: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 1]”]) -> None

Create an BoundingBox from min bounds and max bounds in x, y and z

add(self, point)#

‘Enlarges’ the bounding box with a point.

Parameters:

point (Annotated[numpy.typing.ArrayLike, numpy.float64,) –

Returns:

None

clear(self)#

Resets the bounding box.

Returns:

None

compute_volume(self)#

Returns the bounding-box volume

Returns:

float

contains(self, point)#

Returns whether a points is inside the box or not

Parameters:

point (Annotated[numpy.typing.ArrayLike, numpy.float64,) –

Returns:

bool

get_bounds(self, bounds)#

Returns the bounding-box bounds

Parameters:

bounds (SupportsFloat) – the output bounds with six double values.

Returns:

None

get_color(self)#

float64 array of shape (3, )

Returns:

typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]

get_diag_norm(self)#

Returns diagonal length (double precision)

Returns:

float

get_max_box_dim(self)#

Returns maximal box dimension

Returns:

float

get_min_box_dim(self)#

Returns minimal box dimension

Returns:

float

get_point_indices_within_boundingbox(self, points)#

Returns point indices Within bounding box.

Parameters:

points (cloudViewer.utility.Vector3dVector) – A list of points.

Returns:

list[int]

get_x_percentage(self, x)#

Returns x Percentage.

Parameters:

x (SupportsFloat) –

Returns:

float

get_y_percentage(self, y)#

Returns y Percentage.

Parameters:

y (SupportsFloat) –

Returns:

float

get_z_percentage(self, z)#

Returns z Percentage.

Parameters:

z (SupportsFloat) –

Returns:

float

is_valid(self)#

Returns whether bounding box is valid or not

Returns:

bool

min_distance_to(self, box)#

Computes min gap (absolute distance) between this bounding-box and another one; return min gap (>=0) or -1 if at least one of the box is not valid

Parameters:

box (cloudViewer.geometry.BoundingBox) –

Returns:

float

set_color(self, color)#

float64 array of shape (3, )

Parameters:

color (Annotated[numpy.typing.ArrayLike, numpy.float64,) –

Returns:

None

set_validity(self, state)#

Sets bonding box validity.

Parameters:

state (bool) –

Returns:

None

volume(self)#

Returns the bounding box volume.

Returns:

float