unreal.LidarPointCloud
¶
- class unreal.LidarPointCloud(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
Represents the Point Cloud asset
C++ Source:
Plugin: LidarPointCloud
Module: LidarPointCloudRuntime
File: LidarPointCloud.h
Editor Properties: (see get_editor_property/set_editor_property)
collision_accuracy
(float): [Read-Write] deprecated: Use MaxCollisionError instead.max_collision_error
(float): [Read-Write] Determines the maximum error (in cm) of the collision for this point cloud. NOTE: Lower values will require more time to build. Rebuild collision for the changes to take effect.normals_noise_tolerance
(float): [Read-Write] Higher values are less susceptible to noise, but will most likely lose finer details, especially around hard edges. Lower values retain more detail, at the expense of time. NOTE: setting this too low will cause visual artifacts and geometry holes in noisier datasets.normals_quality
(int32): [Read-Write] Higher values will generally result in more accurate calculations, at the expense of timeoptimized_for_dynamic_data
(bool): [Read-Write] Disables the LOD pipeline, allowing for much faster data operations (insert/remove/set) at a potential expense of runtime performance. The whole asset will be treated as a single, large asset with no granular density control, nor occlusion culling.Recommended for assets, which have their data updated per-frame (such as live streaming).
original_coordinates
(Vector): [Read-Write] Stores the original offset as a double.source_path
(FilePath): [Read-Write] Stores the path to the original source file. Empty if dynamically created.
- apply_color_to_first_point_by_ray(new_color, origin, direction, radius, visible_only) None ¶
Applies the given color to the first point hit by the given ray
- apply_color_to_points_by_ray(new_color, origin, direction, radius, visible_only) None ¶
Applies the given color to all points hit by the given ray
- apply_color_to_points_in_box(new_color, center, extent, visible_only) None ¶
Applies the given color to all points within the box
- apply_color_to_points_in_sphere(new_color, center, radius, visible_only) None ¶
Applies the given color to all points within the sphere
- build_collision_with_callback(world_context_object, latent_info) bool ¶
Build Collision with Callback
- Parameters:
world_context_object (Object) –
latent_info (LatentActionInfo) –
- Returns:
success (bool):
- Return type:
- calculate_normals(latent_info) None ¶
Calculates Normals for this point cloud
- Parameters:
latent_info (LatentActionInfo) –
- property collision_accuracy: float¶
[Read-Write] deprecated: Use MaxCollisionError instead.
- Type:
(float)
- export(filename) bool ¶
Exports this Point Cloud to the given filename. Consult supported export formats. Returns true if successful
- get_collider_polys() int32 ¶
Returns the number of polygons in the collider or 0 if no collider is built
- Return type:
int32
- get_data_size() int32 ¶
Returns the amount of memory in MB used to store the point cloud.
- Return type:
int32
- get_num_lo_ds() int32 ¶
End UObject Interface.
- Return type:
int32
- get_num_nodes() int32 ¶
Get Num Nodes
- Return type:
int32
- get_num_points() int64 ¶
Get Num Points
- Return type:
int64
- get_num_visible_points() int64 ¶
Get Num Visible Points
- Return type:
int64
- get_points_as_copies(return_world_space, start_index=0, count=-1) Array[LidarPointCloudPoint] ¶
Returns an array with copies of points from the tree If ReturnWorldSpace is selected, the points’ locations will be converted into absolute value, otherwise they will be relative to the center of the cloud.
- Parameters:
return_world_space (bool) –
start_index (int32) –
count (int32) –
- Return type:
- get_points_in_box_as_copies(center, extent, visible_only, return_world_space) Array[LidarPointCloudPoint] ¶
Returns an array with copies of points within the given box If ReturnWorldSpace is selected, the points’ locations will be converted into absolute value, otherwise they will be relative to the center of the cloud.
- get_points_in_sphere_as_copies(center, radius, visible_only, return_world_space) Array[LidarPointCloudPoint] ¶
Returns an array with copies of points within the given sphere If ReturnWorldSpace is selected, the points’ locations will be converted into absolute value, otherwise they will be relative to the center of the cloud.
- has_points_by_ray(origin, direction, radius, visible_only) bool ¶
Returns true if there are any points hit by the given ray.
- has_points_in_box(center, extent, visible_only) bool ¶
Returns true if there are any points within the given box.
- has_points_in_sphere(center, radius, visible_only) bool ¶
Returns true if there are any points within the given sphere.
- initialize(new_bounds) None ¶
Re-initializes the asset with new bounds. Warning: Will erase all currently held data!
- Parameters:
new_bounds (Box) –
- insert_point(point, duplicate_handling, refresh_points_bounds, translation) None ¶
Inserts the given point into the Octree structure. If bRefreshPointsBounds is set to false, make sure you call RefreshBounds() manually or cloud centering may not work correctly.
- Parameters:
point (LidarPointCloudPoint) –
duplicate_handling (LidarPointCloudDuplicateHandling) –
refresh_points_bounds (bool) –
translation (Vector) –
- insert_points(points, duplicate_handling, refresh_points_bounds, translation) None ¶
Inserts group of points into the Octree structure, multi-threaded. If bRefreshPointsBounds is set to false, make sure you call RefreshBounds() manually or cloud centering may not work correctly.
- Parameters:
points (Array[LidarPointCloudPoint]) –
duplicate_handling (LidarPointCloudDuplicateHandling) –
refresh_points_bounds (bool) –
translation (Vector) –
- line_trace_multi(origin, direction, radius, visible_only, return_world_space) Array[LidarPointCloudPoint] or None ¶
Performs a raycast test against the point cloud. Populates OutHits array with the results. If ReturnWorldSpace is selected, the points’ locations will be converted into absolute value, otherwise they will be relative to the center of the cloud. Returns true it anything has been hit.
- line_trace_single(origin, direction, radius, visible_only) LidarPointCloudPoint or None ¶
Performs a raycast test against the point cloud. Returns the pointer if hit or nullptr otherwise.
- Parameters:
- Returns:
point_hit (LidarPointCloudPoint):
- Return type:
LidarPointCloudPoint or None
- mark_point_visibility_dirty() None ¶
This should to be called if any manual modification to individual points’ visibility has been made. If not marked dirty, the rendering may work sub-optimally.
- property max_collision_error: float¶
[Read-Write] Determines the maximum error (in cm) of the collision for this point cloud. NOTE: Lower values will require more time to build. Rebuild collision for the changes to take effect.
- Type:
(float)
- merge(point_clouds_to_merge) None ¶
Merges this point cloud with the ones provided
- Parameters:
point_clouds_to_merge (Array[LidarPointCloud]) –
- merge_single(point_cloud_to_merge) None ¶
Merges this point cloud with the one provided
- Parameters:
point_cloud_to_merge (LidarPointCloud) –
- property normals_noise_tolerance: float¶
[Read-Write] Higher values are less susceptible to noise, but will most likely lose finer details, especially around hard edges. Lower values retain more detail, at the expense of time. NOTE: setting this too low will cause visual artifacts and geometry holes in noisier datasets.
- Type:
(float)
- property normals_quality: int¶
[Read-Write] Higher values will generally result in more accurate calculations, at the expense of time
- Type:
(int32)
- property original_coordinates: Vector¶
[Read-Only] Stores the original offset as a double.
- Type:
(Vector)
- reimport(world_context_object, use_async, latent_info) -> (async_mode=LidarPointCloudAsyncMode, progress=float)¶
Re-imports the cloud from it’s original source file, overwriting any current point information.
- Parameters:
world_context_object (Object) –
use_async (bool) –
latent_info (LatentActionInfo) –
- Returns:
async_mode (LidarPointCloudAsyncMode):
progress (float):
- Return type:
tuple
- remove_first_point_by_ray(origin, direction, radius, visible_only) None ¶
Removes the first point hit by the given ray
Removes all hidden points
- remove_point(point) None ¶
Attempts to remove the given point.
- Parameters:
point (LidarPointCloudPoint) –
- remove_points_by_ray(origin, direction, radius, visible_only) None ¶
Removes all points hit by the given ray
- remove_points_in_sphere(center, radius, visible_only) None ¶
Removes all points within the given sphere
- set_data(points) bool ¶
Reinitializes the cloud with the new set of data.
- Parameters:
points (Array[LidarPointCloudPoint]) –
- Return type:
- set_location_offset(offset) None ¶
Applies given offset to this point cloud.
- Parameters:
offset (Vector) –
- set_optimized_for_dynamic_data(new_optimized_for_dynamic_data) None ¶
Set Optimized for Dynamic Data
- Parameters:
new_optimized_for_dynamic_data (bool) –
- set_visibility_of_first_point_by_ray(new_visibility, origin, direction, radius) None ¶
Sets visibility of the first point hit by the given ray.
- set_visibility_of_points_by_ray(new_visibility, origin, direction, radius) None ¶
Sets visibility of points hit by the given ray.
- set_visibility_of_points_in_box(new_visibility, center, extent) None ¶
Sets visibility of points within the given box.