unreal.GeometryScriptVectorList

class unreal.GeometryScriptVectorList

Bases: StructBase

Geometry Script Vector List

C++ Source:

  • Plugin: GeometryScripting

  • Module: GeometryScriptingCore

  • File: GeometryScriptTypes.h

clear_vector_list(clear_value=[0.000000, 0.000000, 0.000000]) None

Resets all the items in the Vector List to the Clear Value.

Parameters:

clear_value (Vector)

convert_vector_list_to_array() Array[Vector]

Converts Vector List to an array of FVectors (Vector Array).

Returns:

vector_array (Array[Vector]):

Return type:

Array[Vector]

duplicate_vector_list() GeometryScriptVectorList

Copies the contents of Vector List into Duplicate Vector List.

Returns:

duplicate_list (GeometryScriptVectorList):

Return type:

GeometryScriptVectorList

extract_vector_list_component(component_index=0) GeometryScriptScalarList

Populates a Scalar List with values that correspond to the X Y or Z component of a Vector List.

Parameters:

component_index (int32)

Returns:

scalar_list (GeometryScriptScalarList):

Return type:

GeometryScriptScalarList

extract_vector_list_components_as_u_vs(u_component_index=0, v_component_index=1) GeometryScriptUVList

Populates a UV List with values that correspond to the X Y or Z components of a Vector List.

Parameters:
  • u_component_index (int32)

  • v_component_index (int32)

Returns:

uv_list (GeometryScriptUVList):

Return type:

GeometryScriptUVList

get_vector_list_item(index) -> (Vector, is_valid_index=bool)

Returns the FVector stored in the VectorList at the specified location. if the Index is not valid for this Vector List, the Zero Vector will be returned and bIsValidIndex set to false.

Parameters:

index (int32)

Returns:

is_valid_index (bool):

Return type:

bool

get_vector_list_last_index() int32

Returns the index of the last item in the Vector List. If Vector List is empty or invalid, the value -1 will be returned.

Return type:

int32

get_vector_list_length() int32

Returns the number of items in the Vector List.

Return type:

int32

set_vector_list_component_from_scalars(scalar_list, vector_component=0, default_vector=[0.000000, 0.000000, 0.000000]) None

Sets the specified Component of the Vector List from the corresponding values in the Scalar List, resizing Vector List as needed

Parameters:
set_vector_list_components_from_u_vs(uv_list, u_to_vector_component=0, v_to_vector_component=1, default_vector=[0.000000, 0.000000, 0.000000]) None

Sets the specified Components of the Vector List from the corresponding values in the UV List, resizing Vector List as needed

Parameters:
set_vector_list_item(index, new_value) bool

Updates the value of the FVector stored in the Vector List at the specified location. If the Index is invalid, the operation will fail and bValidIndex will be set to false.

Parameters:
  • index (int32)

  • new_value (Vector)

Returns:

is_valid_index (bool):

Return type:

bool

vector_blend(vector_list_b, constant_a=1.000000, constant_b=1.000000) GeometryScriptVectorList

Compute (ConstantA * A) + (ConstantB * B) for each pair of vectors in VectorListA and VectorListB and return in new VectorList. By default (constants = 1) this just adds the two vectors. Set ConstantB = -1 to subtract B from A. Can also be used to Linear Interpolate, by setting ConstantB = (1-ConstantA)

Parameters:
Return type:

GeometryScriptVectorList

vector_blend_in_place(vector_list_b, constant_a=1.000000, constant_b=1.000000) GeometryScriptVectorList

Compute (ConstantA * A) + (ConstantB * B) for each pair of vectors in VectorListA and VectorListB, and store in VectorListB By default (constants = 1) this just adds the two vectors. Set ConstantB = -1 to subtract B from A. Can also be used to Linear Interpolate, by setting ConstantB = (1-ConstantA)

Parameters:
Returns:

vector_list_b (GeometryScriptVectorList):

Return type:

GeometryScriptVectorList

vector_cross(vector_list_b) GeometryScriptVectorList

Compute the cross-product between each pair of vectors in VectorListA and VectorListB and return in new VectorList

Parameters:

vector_list_b (GeometryScriptVectorList)

Return type:

GeometryScriptVectorList

vector_dot(vector_list_b) GeometryScriptScalarList

Compute the dot-product between each pair of vectors in VectorListA and VectorListB and return in new ScalarList

Parameters:

vector_list_b (GeometryScriptVectorList)

Return type:

GeometryScriptScalarList

vector_inverse_transform_in_place(transform, as_position=True) None

Inverse transform each vector in VectorList, and store in VectorList.

Parameters:
  • transform (Transform)

  • as_position (bool) – Whether to treat input as positions or vectors (if vectors, will ignore the Transform’s translation part)

vector_length() GeometryScriptScalarList

Compute the length/magnitude of each vector in VectorListA and return in new ScalarList. Note that SquaredLength can be computed using VectorDot(A,A).

Return type:

GeometryScriptScalarList

vector_normalize_in_place(set_on_failure=[0.000000, 0.000000, 0.000000]) None

Normalize each vector in VectorList, and store in VectorList. If a vector is degenerate, set the normal to the SetOnFailure vector.

Parameters:

set_on_failure (Vector)

vector_plane_project_in_place(plane) None

Project each vector in VectorList to the given Plane, and store in VectorList.

Parameters:

plane (Plane)

vector_to_scalar(constant_x=1.000000, constant_y=0.000000, constant_z=0.000000) GeometryScriptScalarList

Convert each Vector in VectorList to a Scalar by computing (ConstantX*Vector.X + ConstantY*Vector.Y + ConstantZ*Vector.Z), and return in a new ScalarList. This can be used to extract the X/Y/Z values from a Vector, or other component-wise math

Parameters:
  • constant_x (double)

  • constant_y (double)

  • constant_z (double)

Return type:

GeometryScriptScalarList

vector_transform_in_place(transform, as_position=True) None

Transform each vector in VectorList, and store in VectorList.

Parameters:
  • transform (Transform)

  • as_position (bool) – Whether to treat input as positions or vectors (if vectors, will ignore the Transform’s translation part)