unreal.GeometryScript_PointSetSampling

class unreal.GeometryScript_PointSetSampling(outer: Object | None = None, name: Name | str = 'None')

Bases: BlueprintFunctionLibrary

Geometry Script Library Point Set Sampling Functions

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: PointSetFunctions.h

classmethod downsample_points(points, options, keep_num_points=100, debug=None) GeometryScriptIndexList

Find a subset of the given Points of a specified size. Can optionally specify a priorty weighting and/or request uniform spacing for the downsampled points. Note: Ordering of the result will balance: (1) if weights are provided, higher weight points come earlier and (2) if uniform spacing is requested, points will be ordered to have an octree-style coverage –

so the first 8 points will cover the 8 octants (where samples are available) and the subsequent points will progressively fill in the space

Parameters:
Returns:

downsampled_indices (GeometryScriptIndexList):

Return type:

GeometryScriptIndexList

classmethod flatten_points(points_in3d, options) Array[Vector2D]

Convert an array of points from 3D to 2D, by transforming into the given ReferenceFrame and taking the X,Y coordinates Note that to transform into the ReferenceFrame, we apply the inverse of the ReferenceFrame’s transform.

Parameters:
Returns:

points_in2d (Array[Vector2D]):

Return type:

Array[Vector2D]

classmethod get_points_from_index_list(all_points, indices) Array[Vector]

Create an array of the subset of AllPoints indicated by the Indices list

Parameters:
Returns:

selected_points (Array[Vector]):

Return type:

Array[Vector]

classmethod k_means_cluster_to_arrays(points, options) Array[GeometryScriptIndexList]

Use K-Means clustering to cluster the given points into a target number of clusters, and return the clusters as an array of lists of point indices.

Parameters:
Returns:

cluster_id_to_lists (Array[GeometryScriptIndexList]):

Return type:

Array[GeometryScriptIndexList]

classmethod k_means_cluster_to_i_ds(points, options) Array[int32]

Use K-Means clustering to cluster the given points into a target number of clusters, and return an array with a cluster index per point.

Parameters:
Returns:

point_cluster_indices (Array[int32]):

Return type:

Array[int32]

classmethod make_bounding_box_from_points(points, expand_by=0.000000) Box

Make a Axis Aligned Bounding Box that bounds the given Points, optionally expanded by some additional amount on each side

Parameters:
Return type:

Box

classmethod offset_transforms(transforms, offset, direction=[0.000000, 0.000000, 1.000000], space=GeometryScriptCoordinateSpace.LOCAL) Array[Transform]

Offset the location of all Transforms by Offset in the given Direction, either locally in the space of the transform or in world space. For example, this can offset mesh surface samples along the surface normal direction.

Parameters:
Returns:

transforms (Array[Transform]):

Return type:

Array[Transform]

classmethod transforms_to_points(transforms) Array[Vector]

Create an array of the positions of the input Transforms

Parameters:

transforms (Array[Transform]) –

Returns:

points (Array[Vector]):

Return type:

Array[Vector]

classmethod unflatten_points(points_in2d, options, height=0.000000) Array[Vector]

Convert an array of points from 2D to 3D, by transforming out of the given ReferenceFrame, with the given Height for the non-flat axis (default Z).

Parameters:
Returns:

points_in3d (Array[Vector]):

Return type:

Array[Vector]