cloudViewer.geometry.ccBBox#
- class cloudViewer.geometry.ccBBox#
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.
- class Type#
Enum class for Geometry types.
- BBOX = <Type.BBOX: 35184372088835>#
- BOX = <Type.BOX: 524809>#
- CAMERA_SENSOR = <Type.CAMERA_SENSOR: 4294975489>#
- CONE = <Type.CONE: 262665>#
- CUSTOM_H_OBJECT = <Type.CUSTOM_H_OBJECT: 129>#
- CYLINDER = <Type.CYLINDER: 393737>#
- DISH = <Type.DISH: 1049097>#
- EXTRU = <Type.EXTRU: 2097673>#
- FACET = <Type.FACET: 8388609>#
- GBL_SENSOR = <Type.GBL_SENSOR: 134225921>#
- IMAGE = <Type.IMAGE: 4097>#
- IMAGE2 = <Type.IMAGE2: 562949953421315>#
- LABEL_2D = <Type.LABEL_2D: 35>#
- LINESET = <Type.LINESET: 2251799813685249>#
- MATERIAL_SET = <Type.MATERIAL_SET: 16777222>#
- MESH = <Type.MESH: 513>#
- MESH_GROUP = <Type.MESH_GROUP: 517>#
- OLD_CYLINDER_ID = <Type.OLD_CYLINDER_ID: 131593>#
- ORIENTED_BBOX = <Type.ORIENTED_BBOX: 70368744177667>#
- PLANE = <Type.PLANE: 16905>#
- POINT_CLOUD = <Type.POINT_CLOUD: 257>#
- POINT_KDTREE = <Type.POINT_KDTREE: 4194307>#
- POINT_OCTREE = <Type.POINT_OCTREE: 1027>#
- POINT_OCTREE2 = <Type.POINT_OCTREE2: 140737488355331>#
- POLY_LINE = <Type.POLY_LINE: 2049>#
- PRIMITIVE = <Type.PRIMITIVE: 521>#
- QUADRIC = <Type.QUADRIC: 8589935113>#
- RGBD_IMAGE = <Type.RGBD_IMAGE: 1125899906842627>#
- SENSOR = <Type.SENSOR: 8193>#
- SPHERE = <Type.SPHERE: 33289>#
- SUB_MESH = <Type.SUB_MESH: 515>#
- TETRA_MESH = <Type.TETRA_MESH: 27021597764222977>#
- TORUS = <Type.TORUS: 66057>#
- VIEWPORT_2D_LABEL = <Type.VIEWPORT_2D_LABEL: 99>#
- VIEWPORT_2D_OBJECT = <Type.VIEWPORT_2D_OBJECT: 67>#
- VOXEL_GRID = <Type.VOXEL_GRID: 281474976710657>#
- property name#
- property value#
- static New(*args, **kwargs)#
Overloaded function.
New(objectType: typing.SupportsInt, name: str = None) -> cloudViewer.geometry.ccHObject
New(pluginId: QString, classId: QString, name: str = None) -> cloudViewer.geometry.ccHObject
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: cloudViewer.geometry.ccBBox) -> None
Default constructor
__init__(self: cloudViewer.geometry.ccBBox, arg0: cloudViewer.geometry.ccBBox) -> None
Copy constructor
__init__(self: cloudViewer.geometry.ccBBox, min_bound: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 1]”], max_bound: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, “[3, 1]”], name: str = ‘ccBBox’) -> None
Create an ccBBox 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
- add_child(self, child, dependencyFlags=24, insertIndex=-1)#
Adds a child.
- Parameters:
child (cloudViewer.geometry.ccHObject) – child instance geometry
dependencyFlags (SupportsInt, optional, default=24) – dependency flags
insertIndex (SupportsInt, optional, default=-1) – insertion index (if <0, child is simply appended to the children list)
- Returns:
bool
- clear(self)#
Resets the bounding box.
- Returns:
None
- colors_shown(self)#
Returns whether colors are shown or not.
- Returns:
bool
- 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
- static create_from_points(points)#
Creates the bounding box that encloses the set of points.
- Parameters:
points (cloudViewer.utility.Vector3dVector) – A list of points.
- Returns:
cloudViewer.geometry.ccBBox
- enable_gl_transformation(self, state)#
Enables/disables associated GL transformation.
- Parameters:
state (bool) –
- Returns:
None
- enable_temp_color(self, state)#
Set temporary color activation state.
- Parameters:
state (bool) –
- Returns:
None
- filter_children(self, recursive=False, filter=<Type.???: 0>, strict=False)#
Collects the children corresponding to a certain pattern.
- Parameters:
recursive (bool, optional, default=False) – specifies if the search should be recursive
(typing.SupportsInt (filter) – 0>): pattern for children selection
optional – 0>): pattern for children selection
default=<Type.??? – 0>): pattern for children selection
strict (bool, optional, default=False) – whether the search is strict on the type (i.e ‘isA’) or not (i.e. ‘isKindOf’)
- Returns:
list[cloudViewer.geometry.ccHObject]
- find(self, unique_id)#
Finds an entity in this object hierarchy.
- Parameters:
unique_id (SupportsInt) –
- Returns:
cloudViewer.geometry.ccHObject
- from_file(self, filename, dataVersion, flags)#
Loads data from binary stream.
- Parameters:
filename (str) –
dataVersion (SupportsInt) – file version
flags (SupportsInt) – deserialization flags (see ccSerializableObject::DeserializationFlags)
- Returns:
bool
- get_axis_aligned_bounding_box(self)#
Returns an axis-aligned bounding box of the geometry.
- Returns:
ccBBox
- get_bounds(self, bounds)#
Returns the bounding-box bounds
- Parameters:
bounds (SupportsFloat) – the output bounds with six double values.
- Returns:
None
- get_box_points(self)#
Returns the eight points that define the bounding box.
- Returns:
cloudViewer.utility.Vector3dVector
- get_center(self)#
Returns the center of the geometry coordinates.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_child(self, childPos)#
Returns the ith child.
- Parameters:
childPos (SupportsInt) – child position
- Returns:
cloudViewer.geometry.ccHObject
- get_children_number(self)#
Returns the number of children.
- Returns:
int
- get_class_id(self)#
Returns class ID.
- Returns:
int
- get_color(self)#
float64array 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_extent(self)#
Get the extent/length of the bounding box in x, y, and z dimension.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_glTransformation_history(self)#
Returns the transformation ‘history’ matrix.
- Returns:
ccGLMatrix
- get_gl_transformation(self)#
Returns associated GL transformation.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float32], “[4, 4]”]
- get_half_extent(self)#
Returns the half extent of the bounding box.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_max_2Dbound(self)#
Returns max 2d bounds for geometry coordinates.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[2, 1]”]
- get_max_bound(self)#
Returns max bounds for geometry coordinates.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_max_box_dim(self)#
Returns maximal box dimension
- Returns:
float
- get_max_extent(self)#
Returns the maximum extent, i.e. the maximum of X, Y and Z axis
- Returns:
float
- get_min_2Dbound(self)#
Returns min 2d bounds for geometry coordinates.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[2, 1]”]
- get_min_bound(self)#
Returns min bounds for geometry coordinates.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_min_box_dim(self)#
Returns minimal box dimension
- Returns:
float
- get_name(self)#
Returns object name.
- Returns:
str
- get_opacity(self)#
Get opacity.
- Returns:
float
- get_oriented_bounding_box(self)#
Returns an oriented bounding box of the geometry.
- Returns:
ecvOrientedBBox
- get_own_bounding_box(self, withGLFeatures=False)#
Returns an axis-aligned bounding box of the geometry.
- Parameters:
withGLFeatures (bool, optional, default=False) – whether use openGL features.
- Returns:
ccBBox
- get_parent(self)#
Returns parent object.
- Returns:
cloudViewer.geometry.ccHObject
- 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_print_info(self)#
Returns the 3D dimensions of the bounding box in string format.
- Returns:
str
- static get_rotation_matrix_from_axis_angle(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_euler_angle(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_quaternion(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[4, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_xyz(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_xzy(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_yxz(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_yzx(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_zxy(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- static get_rotation_matrix_from_zyx(rotation: Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']) Annotated[numpy.typing.NDArray[numpy.float64], '[3, 3]']#
- get_temp_color(self)#
Returns current temporary (unique) color.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_unique_id(self)#
Returns object unique ID.
- Returns:
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
- has_colors(self)#
Returns whether colors are enabled or not.
- Returns:
bool
- has_displayed_scalar_field(self)#
Returns whether an active scalar field is available or not.
- Returns:
bool
- has_normals(self)#
Returns whether normals are enabled or not.
- Returns:
bool
- has_scalar_fields(self)#
Returns whether one or more scalar fields are instantiated.
- Returns:
bool
- is_a(self, type)#
Returns whether the geometry is a type pointed.
- Parameters:
type (SupportsInt) –
- Returns:
bool
- is_color_overriden(self)#
Returns whether colors are currently overridden by a temporary (unique) color.
- Returns:
bool
- is_custom(self)#
Returns whether the geometry is custom.
- Returns:
bool
- is_empty(self)#
Returns
Trueif the geometry is empty.- Returns:
bool
- is_gl_trans_enabled(self)#
Returns whether a GL transformation is enabled or not.
- Returns:
bool
- is_group(self)#
Returns whether the instance is a group.
- Returns:
bool
- is_hierarchy(self)#
Returns whether the geometry is hierarchy.
- Returns:
bool
- is_kind_of(self, type)#
Returns whether the geometry is kind of the type pointed.
- Parameters:
type (SupportsInt) –
- Returns:
bool
- is_leaf(self)#
Returns whether the geometry is leaf.
- Returns:
bool
- is_selected(self)#
Returns whether entity is selected or not.
- Returns:
bool
- is_serializable(self)#
Returns whether the instance is a serializable.
- Returns:
bool
- is_valid(self)#
Returns whether bounding box is valid or not
- Returns:
bool
- is_visible(self)#
Returns whether entity is visible or not.
- Returns:
bool
- is_visiblity_locked(self)#
Returns whether visibility is locked 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
- minimum_file_version(self: cloudViewer.geometry.ccHObject) int#
Returns the minimum file version required to save this object
- name_3d_shown(self)#
Returns whether name is displayed in 3D or not.
- Returns:
bool
- normals_shown(self)#
Returns whether normals are shown or not.
- Returns:
bool
- remove_all_children(self)#
Clear all children in the geometry.
- Returns:
None
- remove_child(*args, **kwargs)#
Overloaded function.
remove_child(self: cloudViewer.geometry.ccHObject, child: cloudViewer.geometry.ccHObject) -> None
Removes a specific child.
remove_child(self: cloudViewer.geometry.ccHObject, pos: typing.SupportsInt) -> None
Removes a specific child given its index.
- reset_glTransformation_history(self)#
Resets the transformation ‘history’ matrix.
- Returns:
None
- reset_gl_transformation(self)#
Resets associated GL transformation.
- Returns:
None
- rotate(*args, **kwargs)#
Overloaded function.
- rotate(self, R)
Apply rotation to the geometry coordinates and normals.
- Parameters:
R (Annotated[numpy.typing.ArrayLike, numpy.float64,) – The rotation matrix
- Returns:
cloudViewer.geometry.ccHObject
- rotate(self, R, center)
Apply rotation to the geometry coordinates and normals.
- rotate_gl(self, rotation)#
Multiplies (left) current GL transformation by a rotation matrix.
- Parameters:
rotation (Annotated[numpy.typing.ArrayLike, numpy.float64,) –
- Returns:
None
- scale(*args, **kwargs)#
Overloaded function.
- scale(self, scale)
Apply scaling to the geometry coordinates.
- Parameters:
scale (SupportsFloat) –
- Returns:
cloudViewer.geometry.ccHObject
- scale(self, scale, center)
Apply scaling to the geometry coordinates.
- Parameters:
scale (SupportsFloat) –
center (Annotated[numpy.typing.ArrayLike, numpy.float64,) – Scale center used for transformation
- Returns:
cloudViewer.geometry.ccHObject
- set_color(self, color)#
float64array of shape(3, )- Parameters:
color (Annotated[numpy.typing.ArrayLike, numpy.float64,) –
- Returns:
None
- set_glTransformation_history(self, mat)#
Sets the transformation ‘history’ matrix (handle with care!).
- Parameters:
mat (ccGLMatrix) – transformation ‘history’ matrix
- Returns:
None
- set_gl_transformation(self, transformation)#
Associates entity with a GL transformation (rotation + translation).
- Parameters:
transformation (Annotated[numpy.typing.ArrayLike, numpy.float64,) –
- Returns:
None
- set_lineWidth_recursive(self, width)#
Sets the line width.
- Parameters:
width (SupportsFloat) – line width
- Returns:
None
- set_max_bound(self, maxBound)#
float64array of shape(3, )- Parameters:
maxBound (Annotated[numpy.typing.ArrayLike, numpy.float64,) – The maximum corner coordinate.
- Returns:
None
- set_min_bound(self, minBound)#
float64array of shape(3, )- Parameters:
minBound (Annotated[numpy.typing.ArrayLike, numpy.float64,) – The minimum corner coordinate.
- Returns:
None
- set_opacity(self, opacity)#
Set opacity activation state.
- Parameters:
opacity (SupportsFloat) –
- Returns:
None
- set_pointSize_recursive(self, pSize)#
Sets the point size.
- Parameters:
pSize (SupportsInt) – point size
- Returns:
None
- set_temp_color(self, color, auto_activate=True)#
Sets current temporary (unique).
- set_unique_id(self, ID)#
Changes unique ID.
- Parameters:
ID (SupportsInt) –
- Returns:
None
- sf_shown(self)#
Returns whether active scalar field is visible.
- Returns:
bool
- show_3d_name(self, state)#
Sets whether name should be displayed in 3D.
- Parameters:
state (bool) –
- Returns:
None
- to_file(self, filename, data_version)#
Saves data to binary stream.
- Parameters:
filename (str) –
data_version (SupportsInt) –
- Returns:
bool
- toggle_colors(self)#
Toggles colors display state.
- Returns:
None
- toggle_materials(self)#
Toggles material display state.
- Returns:
None
- toggle_normals(self)#
Toggles normals display state.
- Returns:
None
- toggle_sf(self)#
Toggles SF display state.
- Returns:
None
- toggle_show_name(self)#
Toggles name in 3D display state.
- Returns:
None
- toggle_visibility(self)#
Toggles visibility.
- Returns:
None
- transform(self, arg0)#
Apply transformation (4x4 matrix) to the geometry coordinates.
- Parameters:
arg0 (Annotated[numpy.typing.ArrayLike, numpy.float64,) –
- Returns:
cloudViewer.geometry.ccHObject
- translate(self, translation, relative=True)#
Apply translation to the geometry coordinates.
- Parameters:
- Returns:
cloudViewer.geometry.ccHObject
- translate_gl(self, translation)#
Translates current GL transformation by a rotation matrix.
- Parameters:
translation (Annotated[numpy.typing.ArrayLike, numpy.float64,) –
- Returns:
None
- volume(self)#
Returns the bounding box volume.
- Returns:
float
- BBOX = <Type.BBOX: 35184372088835>#
- BOX = <Type.BOX: 524809>#
- CAMERA_SENSOR = <Type.CAMERA_SENSOR: 4294975489>#
- CONE = <Type.CONE: 262665>#
- CUSTOM_H_OBJECT = <Type.CUSTOM_H_OBJECT: 129>#
- CYLINDER = <Type.CYLINDER: 393737>#
- DISH = <Type.DISH: 1049097>#
- EXTRU = <Type.EXTRU: 2097673>#
- FACET = <Type.FACET: 8388609>#
- GBL_SENSOR = <Type.GBL_SENSOR: 134225921>#
- IMAGE = <Type.IMAGE: 4097>#
- IMAGE2 = <Type.IMAGE2: 562949953421315>#
- LABEL_2D = <Type.LABEL_2D: 35>#
- LINESET = <Type.LINESET: 2251799813685249>#
- MATERIAL_SET = <Type.MATERIAL_SET: 16777222>#
- MESH = <Type.MESH: 513>#
- MESH_GROUP = <Type.MESH_GROUP: 517>#
- OLD_CYLINDER_ID = <Type.OLD_CYLINDER_ID: 131593>#
- ORIENTED_BBOX = <Type.ORIENTED_BBOX: 70368744177667>#
- PLANE = <Type.PLANE: 16905>#
- POINT_CLOUD = <Type.POINT_CLOUD: 257>#
- POINT_KDTREE = <Type.POINT_KDTREE: 4194307>#
- POINT_OCTREE = <Type.POINT_OCTREE: 1027>#
- POINT_OCTREE2 = <Type.POINT_OCTREE2: 140737488355331>#
- POLY_LINE = <Type.POLY_LINE: 2049>#
- PRIMITIVE = <Type.PRIMITIVE: 521>#
- QUADRIC = <Type.QUADRIC: 8589935113>#
- RGBD_IMAGE = <Type.RGBD_IMAGE: 1125899906842627>#
- SENSOR = <Type.SENSOR: 8193>#
- SPHERE = <Type.SPHERE: 33289>#
- SUB_MESH = <Type.SUB_MESH: 515>#
- TETRA_MESH = <Type.TETRA_MESH: 27021597764222977>#
- TORUS = <Type.TORUS: 66057>#
- VIEWPORT_2D_LABEL = <Type.VIEWPORT_2D_LABEL: 99>#
- VIEWPORT_2D_OBJECT = <Type.VIEWPORT_2D_OBJECT: 67>#
- VOXEL_GRID = <Type.VOXEL_GRID: 281474976710657>#