unreal.GeometryScript_MeshSampling
¶
- class unreal.GeometryScript_MeshSampling(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Geometry Script Library Mesh Sampling Functions
C++ Source:
Plugin: GeometryScripting
Module: GeometryScriptingCore
File: MeshSamplingFunctions.h
- classmethod compute_non_uniform_point_sampling(target_mesh, options, non_uniform_options, debug=None) -> (DynamicMesh, samples=Array[Transform], sample_radii=Array[double], triangle_i_ds=GeometryScriptIndexList)¶
Compute a set of sample points lying on the surface of TargetMesh based on the provided sampling Options and NonUniformOptions. The sample points have radii in the range [Options.SamplingRadius, NonUniformOptions.MaxSamplingRadius], and are non-overlapping, ie the distance between two points is always larger than the sum of their respective radii.
- Parameters:
target_mesh (DynamicMesh) –
options (GeometryScriptMeshPointSamplingOptions) –
non_uniform_options (GeometryScriptNonUniformPointSamplingOptions) –
debug (GeometryScriptDebug) –
- Returns:
samples (Array[Transform]):
sample_radii (Array[double]):
triangle_i_ds (GeometryScriptIndexList):
- Return type:
tuple
- classmethod compute_point_sampling(target_mesh, options, debug=None) -> (DynamicMesh, samples=Array[Transform], triangle_i_ds=GeometryScriptIndexList)¶
Compute a set of sample points lying on the surface of TargetMesh based on the provided sampling Options. Samples are approximately uniformly distributed, and non-overlapping relative to the provided Options.SamplingRadius, ie the distance between any pair of samples if >= 2*SamplingRadius.
- Parameters:
target_mesh (DynamicMesh) –
options (GeometryScriptMeshPointSamplingOptions) –
debug (GeometryScriptDebug) –
- Returns:
samples (Array[Transform]): output list of sample points. Transform Location is sample position, Rotation orients Z with the triangle normal
triangle_i_ds (GeometryScriptIndexList): TriangleID that contains each sample point. Length is the same as Samples array.
- Return type:
tuple
- classmethod compute_vertex_weighted_point_sampling(target_mesh, options, non_uniform_options, vertex_weights, debug=None) -> (DynamicMesh, samples=Array[Transform], sample_radii=Array[double], triangle_i_ds=GeometryScriptIndexList)¶
Compute a set of sample points lying on the surface of TargetMesh based on the provided sampling Options and NonUniformOptions. The sample points have radii in the range [Options.SamplingRadius, NonUniformOptions.MaxSamplingRadius], and are non-overlapping, ie the distance between two points is always larger than the sum of their respective radii.
- Parameters:
target_mesh (DynamicMesh) –
options (GeometryScriptMeshPointSamplingOptions) –
non_uniform_options (GeometryScriptNonUniformPointSamplingOptions) –
vertex_weights (GeometryScriptScalarList) – defines a per-vertex weight in range [0,1], these are interpolated to create a scalar field over the mesh triangles which is used to weight the sampling radii
debug (GeometryScriptDebug) –
- Returns:
samples (Array[Transform]):
sample_radii (Array[double]):
triangle_i_ds (GeometryScriptIndexList):
- Return type:
tuple