unreal.PCGPolyLineData

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

Bases: PCGSpatialDataWithPointCache

PCGPoly Line Data

C++ Source:

  • Plugin: PCG

  • Module: PCG

  • File: PCGPolyLineData.h

Editor Properties: (see get_editor_property/set_editor_property)

  • keep_zero_density_points (bool): [Read-Write]

  • target_actor (Actor): [Read-Write] Recipient of any artifacts generated using this data.

get_alpha_at_distance(segment_index, distance) float

Get a value [0,1] representing how far along the point is to the end of the line. Each segment on the line represents a same-size interval. For example, if there are three segments, each segment will take up 0.333… of the interval.

Parameters:
  • segment_index (int32)

  • distance (double)

Return type:

float

get_curvature_at_distance(segment_index, distance) double

Get the curvature at a distance along the line.

Parameters:
  • segment_index (int32)

  • distance (double)

Return type:

double

get_distance_at_segment_start(segment_index) double

Get the cumulative distance along the line to the start of a segment.

Parameters:

segment_index (int32)

Return type:

double

get_input_key_at_alpha(alpha) float

Get the input key from the normalized distance of [0, 1] across the entire the poly line.

Parameters:

alpha (float)

Return type:

float

get_input_key_at_distance(segment_index, distance) float

Get the input key at a distance along the line. InputKey is a float value in [0, N], where N is the number of control points. Each range [i, i+1] represents an interpolation from 0 to 1 across spline segment i.

Parameters:
  • segment_index (int32)

  • distance (double)

Return type:

float

get_length() double

Get the total length of the line.

Return type:

double

get_location_at_alpha(alpha) Vector

Get the location of the point at the normalized [0, 1] parameter across the entire the poly line.

Parameters:

alpha (float)

Return type:

Vector

get_location_at_distance(segment_index, distance, world_space=True) Vector

Get the location at a distance along the line.

Parameters:
  • segment_index (int32)

  • distance (double)

  • world_space (bool)

Return type:

Vector

get_num_segments() int32

Get the number of segments in this line. If the line is closed, this will be the same as the number of control points in the line.

Return type:

int32

get_num_vertices() int32

Get Num Vertices

Return type:

int32

get_segment_length(segment_index) double

Get the length of a specific segment of the line.

Parameters:

segment_index (int32)

Return type:

double

get_tangents_at_segment_start(segment_index) -> (out_arrive_tangent=Vector, out_leave_tangent=Vector)

Get the arrive and leave tangents for a control point via its segment index.

Parameters:

segment_index (int32)

Returns:

out_arrive_tangent (Vector):

out_leave_tangent (Vector):

Return type:

tuple

get_transform() Transform

Get the world-space transform of the entire line.

Return type:

Transform

get_transform_at_alpha(alpha) Transform

Get the full transform at the normalized [0, 1] parameter across the entire the poly line.

Parameters:

alpha (float)

Return type:

Transform

is_closed() bool

True if the line is a closed loop.

Return type:

bool

k2_get_transform_at_distance(segment_index, distance, out_bounds, world_space=True) -> (Transform, out_bounds=Box)

Get the location at a distance along the line.

Parameters:
  • segment_index (int32)

  • distance (double)

  • out_bounds (Box)

  • world_space (bool)

Returns:

out_bounds (Box):

Return type:

Box

write_metadata_to_point(input_key, out_metadata) PCGPoint

This function should be called in the Sample/Project point function, but can also be called if the sampling is done manually. This is meant for each child class to write its metadata given the InputKey, so interpolation can also be done.

Parameters:
Returns:

out_point (PCGPoint):

Return type:

PCGPoint