unreal.GeometryScriptPolyPath
¶
- class unreal.GeometryScriptPolyPath¶
Bases:
StructBase
Geometry Script Poly Path
C++ Source:
Plugin: GeometryScripting
Module: GeometryScriptingCore
File: GeometryScriptTypes.h
Editor Properties: (see get_editor_property/set_editor_property)
closed_loop
(bool): [Read-Write]
- convert_poly_path_to_array() Array[Vector] ¶
Populates an array of 3D vectors with the PolyPath vertex locations.
- convert_poly_path_to_array_of_vector2d() Array[Vector2D] ¶
Creates an array of 2D Vectors with the PolyPath vertex locations projected onto the XY plane.
- flatten_to2d_on_axis(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:
drop_axis (GeometryScriptAxis) –
- Return type:
- get_nearest_vertex_index(point) int32 ¶
Find the index of the vertex closest to a given point. Returns -1 if the PolyPath has no vertices.
- Parameters:
point (Vector) –
- Return type:
int32
- get_poly_path_arc_length() double ¶
Returns the length of the PolyPath.
- Return type:
double
- get_poly_path_last_index() int32 ¶
Returns the index of the last vertex in the PolyPath.
- Return type:
int32
- get_poly_path_num_vertices() int32 ¶
Returns the number of vertices in the the PolyPath.
- Return type:
int32
- get_poly_path_tangent(index) -> (Vector, is_valid_index=bool)¶
Returns the local tangent vector of the PolyPath at the specified vertex index. If the Index does not correspond to a vertex in the PolyPath, a Zero Vector (0,0,0) will be returned.
- Parameters:
index (int32) – specifies a vertex in the PolyPath
- Returns:
is_valid_index (bool): will be false on return if the Index is not included in the PolyPath
- Return type:
- get_poly_path_vertex(index) -> (Vector, is_valid_index=bool)¶
Returns the 3D position of the requested vertex in the PolyPath. If the Index does not correspond to a vertex in the PolyPath, a Zero Vector (0,0,0) will be returned.
- Parameters:
index (int32) – specifies a vertex in the PolyPath.
- Returns:
is_valid_index (bool): will be false on return if the Index is not included in the PolyPath.
- Return type: