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]metadata
(PCGMetadata): [Read-Only] Not accessible through blueprint to make sure the constness is preservedtarget_actor
(Actor): [Read-Write] Recipient of any artifacts generated using this data.
- const_metadata() PCGMetadata ¶
Const Metadata
- Return type:
- 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:
- has_non_trivial_transform() bool ¶
Returns true if the data has a non-trivial transform
- Return type:
- initialize_from_data(source, metadata_parent_override=None, inherit_metadata=True, inherit_attributes=True) None ¶
Initialize from Data
- Parameters:
source (PCGSpatialData) –
metadata_parent_override (PCGMetadata) –
inherit_metadata (bool) –
inherit_attributes (bool) –
- intersect_with(other) PCGIntersectionData ¶
Returns a specialized data to intersect with another data
- Parameters:
other (PCGSpatialData) –
- Return type:
- mutable_metadata() PCGMetadata ¶
Mutable Metadata
- Return type:
- project_on(other, params=[True, True, False, False, '', PCGMetadataFilterMode.EXCLUDE_ATTRIBUTES, PCGMetadataOp.TARGET_VALUE]) 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:
- project_point(transform, bounds, params, out_metadata) PCGPoint or None ¶
Project the query point onto this data, and sample point and metadata information at the projected position. Returns true if successful.
- Parameters:
transform (Transform) –
bounds (Box) –
params (PCGProjectionParams) –
out_metadata (PCGMetadata) –
- Returns:
out_point (PCGPoint):
- Return type:
PCGPoint or None
- 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
- subtract(other) PCGDifferenceData ¶
Subtract
- Parameters:
other (PCGSpatialData) –
- Return type:
- property target_actor: Actor¶
[Read-Write] Recipient of any artifacts generated using this data.
- Type:
(Actor)
- 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)¶
To Point Data with Context
- Parameters:
context (PCGContext) –
- Returns:
context (PCGContext):
- Return type:
- union_with(other) PCGUnionData ¶
Returns a specialized data to union this with another data
- Parameters:
other (PCGSpatialData) –
- Return type: