unreal.PCGSpatialData¶
- class unreal.PCGSpatialData(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
PCGData“Concrete” data base class for PCG generation This will be the base class for data classes that actually represent concrete evidence of spatial data - points, surfaces, splines, etc. In opposition to settings/control type of data.
Conceptually, any concrete data can be decayed into points (potentially through transformations) which hold metadata and a transform, and this is the basic currency of the PCG framework.
C++ Source:
Plugin: PCG
Module: PCG
File: PCGSpatialData.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.
- create_empty_metadata() PCGMetadata¶
Create Empty Metadata deprecated: The Create Empty Metadata function is not needed anymore - it can safely be removed
- Return type:
- get_dimension() int32¶
Returns the dimension of the data type, which has nothing to do with the dimension of its points
- Return type:
int32
- get_normal() Vector¶
Returns the expected data normal (for surfaces) or eventual projection axis (for volumes)
- Return type:
- initialize_from_data(source, metadata_parent_override=None, inherit_metadata=True, inherit_attributes=True) None¶
Prefer using InitializeFromDataWithParams instead. Note that InMetadataParentOverride is deprecated on the code side, and should not be used anymore.
- Parameters:
source (PCGSpatialData)
metadata_parent_override (PCGMetadata)
inherit_metadata (bool)
inherit_attributes (bool)
- initialize_from_data_with_params(params) None¶
Initialize from Data with Params
- Parameters:
params (PCGInitializeFromDataParams)
- intersect_with(other: PCGSpatialData) PCGIntersectionData¶
deprecated: ‘intersect_with’ was renamed to ‘k2_intersect_with’.
- k2_intersect_with(other) PCGIntersectionData¶
Returns a specialized data to intersect with another data
- Parameters:
other (PCGSpatialData)
- Return type:
- k2_project_on(other, params=[True, True, False, PCGProjectionColorBlendMode.SOURCE_VALUE, '', PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES, PCGMetadataOp.TARGET_VALUE, PCGProjectionTagMergeMode.SOURCE]) PCGSpatialData¶
Returns a specialized data to project this on another data of equal or higher dimension. Returns copy of this data if projection fails.
- Parameters:
other (PCGSpatialData)
params (PCGProjectionParams)
- Return type:
- k2_project_point(transform, bounds, params, out_metadata) PCGPoint or None¶
K2 Project Point
- Parameters:
transform (Transform)
bounds (Box)
params (PCGProjectionParams)
out_metadata (PCGMetadata)
- Returns:
out_point (PCGPoint):
- Return type:
PCGPoint or None
- k2_sample_point(transform, bounds, out_metadata) PCGPoint or None¶
Sample rotation, scale and other attributes from this data at the query position. Returns true if Transform location and Bounds overlaps this data.
- Parameters:
transform (Transform)
bounds (Box)
out_metadata (PCGMetadata)
- Returns:
out_point (PCGPoint):
- Return type:
PCGPoint or None
- k2_subtract(other) PCGDifferenceData¶
K2 Subtract
- Parameters:
other (PCGSpatialData)
- Return type:
- k2_union_with(other) PCGUnionData¶
Returns a specialized data to union this with another data
- Parameters:
other (PCGSpatialData)
- Return type:
- project_on(other: PCGSpatialData, params: PCGProjectionParams = Ellipsis) PCGSpatialData¶
deprecated: ‘project_on’ was renamed to ‘k2_project_on’.
- project_point(transform: Transform, bounds: Box, params: PCGProjectionParams, out_metadata: PCGMetadata) PCGPoint | None¶
deprecated: ‘project_point’ was renamed to ‘k2_project_point’.
- sample_point(transform: Transform, bounds: Box, out_metadata: PCGMetadata) PCGPoint | None¶
deprecated: ‘sample_point’ was renamed to ‘k2_sample_point’.
- subtract(other: PCGSpatialData) PCGDifferenceData¶
deprecated: ‘subtract’ was renamed to ‘k2_subtract’.
- property target_actor: Actor¶
[Read-Write] Recipient of any artifacts generated using this data.
- Type:
(Actor)
- to_base_point_data_with_context(context_handle) PCGBasePointData¶
To Base Point Data with Context
- Parameters:
context_handle (PCGBlueprintContextHandle)
- Return type:
- to_point_data() PCGPointData¶
Discretizes the data into points deprecated: The To Point Data function is deprecated - use To Point Data With Context instead.
- Return type:
- to_point_data_with_context(context) -> (PCGPointData, context=PCGContext)¶
Prefer using ToBasePointDataWithContext
- Parameters:
context (PCGContext)
- Returns:
context (PCGContext):
- Return type:
- union_with(other: PCGSpatialData) PCGUnionData¶
deprecated: ‘union_with’ was renamed to ‘k2_union_with’.