unreal.GeometryScript_PolyPath
¶
- class unreal.GeometryScript_PolyPath(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibrary
Geometry Script Library Poly Path Functions
C++ Source:
Plugin: GeometryScripting
Module: GeometryScriptingCore
File: PolyPathFunctions.h
- classmethod conv_array_of_vector2d_to_geometry_script_poly_path(path_vertices) GeometryScriptPolyPath ¶
Conv Array Of Vector 2DTo Geometry Script Poly Path
- Parameters:
- Return type:
- classmethod conv_array_to_geometry_script_poly_path(path_vertices) GeometryScriptPolyPath ¶
Conv Array to Geometry Script Poly Path
- Parameters:
- Return type:
- classmethod conv_geometry_script_poly_path_to_array(poly_path) Array[Vector] ¶
Conv Geometry Script Poly Path to Array
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Return type:
- classmethod conv_geometry_script_poly_path_to_array_of_vector2d(poly_path) Array[Vector2D] ¶
Conv Geometry Script Poly Path to Array Of Vector 2D
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Return type:
- classmethod convert_array_of_vector2d_to_poly_path(vertex_array) GeometryScriptPolyPath ¶
Convert Array Of Vector 2DTo Poly Path
- Parameters:
- Returns:
poly_path (GeometryScriptPolyPath):
- Return type:
- classmethod convert_array_to_poly_path(vertex_array) GeometryScriptPolyPath ¶
Convert Array to Poly Path
- Parameters:
- Returns:
poly_path (GeometryScriptPolyPath):
- Return type:
- classmethod convert_poly_path_to_array(poly_path) Array[Vector] ¶
Convert Poly Path to Array
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Returns:
vertex_array (Array[Vector]):
- Return type:
- classmethod convert_poly_path_to_array_of_vector2d(poly_path) Array[Vector2D] ¶
Convert Poly Path to Array Of Vector 2D
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Returns:
vertex_array (Array[Vector2D]):
- Return type:
- classmethod convert_spline_to_poly_path(spline, sampling_options) GeometryScriptPolyPath ¶
Sample positions from a USplineComponent into a PolyPath, based on the given SamplingOptions
- Parameters:
spline (SplineComponent) –
sampling_options (GeometryScriptSplineSamplingOptions) –
- Returns:
poly_path (GeometryScriptPolyPath):
- Return type:
- classmethod create_arc_path2d(center=[0.000000, 0.000000], radius=10.000000, num_points=10, start_angle=0.000000, end_angle=90.000000) GeometryScriptPolyPath ¶
Create an open arc on the XY plane around the given Center. As it is an open path, the end vertex exactly hits the target EndAngle (so will be positioned on the start vertex if the end aligns to the start)
- Parameters:
- Return type:
- classmethod create_arc_path3d(transform, radius=10.000000, num_points=10, start_angle=0.000000, end_angle=90.000000) GeometryScriptPolyPath ¶
Create an open arc around the origin on the XY plane, then transformed by Transform. As it is an open path, the end vertex exactly hits the target EndAngle (so will be positioned on the start vertex if the end aligns to the start)
- Parameters:
- Return type:
- classmethod create_circle_path2d(center=[0.000000, 0.000000], radius=10.000000, num_points=10) GeometryScriptPolyPath ¶
Create a closed circle on the XY plane around the given Center. By our convention for closed paths, the end vertex is not a duplicate of the start vertex.
- Parameters:
- Return type:
- classmethod create_circle_path3d(transform, radius=10.000000, num_points=10) GeometryScriptPolyPath ¶
Create a closed circle around the origin on the XY plane, then transformed by Transform. By our convention for closed paths, the end vertex is not a duplicate of the start vertex.
- Parameters:
- Return type:
- classmethod flatten_to2d_on_axis(poly_path, drop_axis=GeometryScriptAxis.Z) GeometryScriptPolyPath ¶
Create a 2D, flattened copy of the path by dropping the given axis, and using the other two coordinates as the new X, Y coordinates.
- Parameters:
poly_path (GeometryScriptPolyPath) –
drop_axis (GeometryScriptAxis) –
- Return type:
- classmethod get_nearest_vertex_index(poly_path, point) int32 ¶
Find the index of the vertex closest to a given point. Returns -1 if path has no vertices.
- Parameters:
poly_path (GeometryScriptPolyPath) –
point (Vector) –
- Return type:
int32
- classmethod get_poly_path_arc_length(poly_path) double ¶
Get Poly Path Arc Length
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Return type:
double
- classmethod get_poly_path_last_index(poly_path) int32 ¶
Get Poly Path Last Index
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Return type:
int32
- classmethod get_poly_path_num_vertices(poly_path) int32 ¶
Get Poly Path Num Vertices
- Parameters:
poly_path (GeometryScriptPolyPath) –
- Return type:
int32
- classmethod get_poly_path_tangent(poly_path, index) -> (Vector, is_valid_index=bool)¶
Get Poly Path Tangent
- Parameters:
poly_path (GeometryScriptPolyPath) –
index (int32) –
- Returns:
is_valid_index (bool):
- Return type:
- classmethod get_poly_path_vertex(poly_path, index) -> (Vector, is_valid_index=bool)¶
Get Poly Path Vertex
- Parameters:
poly_path (GeometryScriptPolyPath) –
index (int32) –
- Returns:
is_valid_index (bool):
- Return type:
- classmethod sample_spline_to_transforms(spline, sampling_options, relative_transform, include_scale=True) -> (frames=Array[Transform], frame_times=Array[double])¶
Sample a USplineComponent into a list of FTransforms, based on the given SamplingOptions.
- Parameters:
spline (SplineComponent) –
sampling_options (GeometryScriptSplineSamplingOptions) –
relative_transform (Transform) – a constant Transform applied to each sample Transform in its local frame of reference. So, eg, an X Rotation will rotate each frame around the local spline Tangent vector
include_scale (bool) – if true, the Scale of each FTransform is taken from the Spline, otherwise the Transforms have unit scale
- Returns:
frames (Array[Transform]): Transforms are returned here, with X axis oriented along spline Tangent and Z as the ‘Up’ vector.
frame_times (Array[double]): the spline Time value used for each Frame
- Return type:
tuple