cloudViewer.geometry.Polyline#
- class cloudViewer.geometry.Polyline#
The polyline is considered as a cloud of points (in a specific order) with a open closed state information..
- __init__(self: cloudViewer.geometry.Polyline, associated_cloud: cloudViewer.geometry.GenericIndexedCloudPersist) None#
Polyline constructor
- add(self, cloud)#
Add another reference cloud.
- Parameters:
cloud (cloudViewer.geometry.ReferenceCloud) –
- Returns:
bool
- add_point_index(*args, **kwargs)#
Overloaded function.
- add_point_index(self, global_index)
Point global index insertion mechanism.
- Parameters:
global_index (SupportsInt) –
- Returns:
bool
- add_point_index(self, first_index, last_index)
Point global index insertion mechanism (range).
- Parameters:
first_index (SupportsInt) –
last_index (SupportsInt) –
- Returns:
bool
- capacity(self)#
Reserves some memory for hosting the point references.
- Returns:
int
- clear(self, release_memory=False)#
Clears the cloud.
- Parameters:
release_memory (bool, optional, default=False) –
- Returns:
None
- enable_scalar_field(self)#
Enables the scalar field associated to the cloud.
- Returns:
bool
- forward_iterator(self)#
Forwards the local element iterator.
- Returns:
None
- get_associated_cloud(*args, **kwargs)#
Overloaded function.
- get_associated_cloud(self)
Returns the associated (source) cloud.
- Returns:
cloudViewer.geometry.GenericIndexedCloudPersist
- get_associated_cloud(self)
Returns the associated (source) cloud (const version).
- Returns:
cloudViewer.geometry.GenericIndexedCloudPersist
- get_bounding_box(self)#
Returns the cloud bounding box.
- Returns:
tuple[typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”], typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]]
- get_cur_point_coordinates(self)#
Returns the coordinates of the point pointed by the current element.
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_cur_point_global_index(self)#
Returns the global index of the point pointed by the current element.
- Returns:
int
- get_cur_point_scalar(self)#
Returns the current point associated scalar value.
- Returns:
float
- get_next_point(self)#
Returns the next point (relatively to the global iterator position).
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_point(self, index)#
Returns the ith point(virtual method to request a point with a specific index).
- Parameters:
index (SupportsInt) –
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_point_global_index(self, local_index)#
Returns global index (i.e. relative to the associated cloud) of a given element.
- Parameters:
local_index (SupportsInt) –
- Returns:
int
- get_point_persistent(self, index)#
Returns the ith point as a persistent point).
- Parameters:
index (SupportsInt) –
- Returns:
typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]
- get_scalar_value(self, point_index)#
Returns the ith point associated scalar value.
- Parameters:
point_index (SupportsInt) –
- Returns:
float
- has_points(self)#
Returns whether has points.
- Returns:
bool
- invalidate_boundingBox(self)#
Invalidates the bounding-box
- Returns:
None
- is_closed(self)#
Returns whether the polyline is closed or not.
- Returns:
bool
- is_scalar_field_enabled(self)#
Returns true if the scalar field is enabled, false otherwise.
- Returns:
bool
- place_iterator_at_beginning(self)#
Sets the cloud iterator at the beginning.
- Returns:
None
- remove_cur_point_global_index(self, WARNING)#
Removes current global element, WARNING: this method changes the cloud size!.
- Parameters:
WARNING (this method changes the cloud size) –
- Returns:
None
- remove_point_global_index(self, local_ndex)#
Removes a given element.
- Parameters:
local_ndex (SupportsInt) –
- Returns:
None
- reserve(self, n)#
Reserves some memory for hosting the point references.
- Parameters:
n (SupportsInt) –
- Returns:
bool
- resize(self, n)#
Presets the size of the vector used to store point references.
- Parameters:
n (SupportsInt) –
- Returns:
bool
- set_associated_cloud(self, arg0)#
Sets the associated (source) cloud.
- Parameters:
- Returns:
None
- set_closed(self, state)#
Sets whether the polyline is closed or not.
- Parameters:
state (bool) –
- Returns:
None
- set_cur_point_scalar(self, value)#
Sets the current point associated scalar value.
- Parameters:
value (SupportsFloat) –
- Returns:
None
- set_point_index(self, local_index, global_index)#
Sets global index for a given element.
- Parameters:
local_index (SupportsInt) –
global_index (SupportsInt) –
- Returns:
None
- set_scalar_value(self, point_index, value)#
Sets the ith point associated scalar value.
- Parameters:
point_index (SupportsInt) –
value (SupportsFloat) –
- Returns:
None
- size(self)#
Returns the number of points.
- Returns:
int
- swap(self, first_index, second_index)#
Swaps two point references.
- Parameters:
first_index (SupportsInt) –
second_index (SupportsInt) –
- Returns:
None
- test_visibility(self, point)#
Returns a given point visibility state (relatively to a sensor for instance).
- Parameters:
point (Annotated[numpy.typing.ArrayLike, numpy.float64,) – the 3D point to test, return visibility (default: POINT_VISIBLE)Generic method to request a point visibility (should be overloaded if this functionality is required).The point visibility is such as defined in Daniel Girardeau - Montaut’s PhD manuscript (see Chapter 2, section 2 - 3 - 3).In this case, a ground based laser sensor model should be used to determine it.This method is called before performing any point - to - cloud comparison.If the result is notPOINT_VISIBLE, then the comparison won’t be performed and the scalar field value associatedto this point will be this visibility value.
- Returns:
int