Navigation
API > API/Plugins > API/Plugins/PCG
"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.
| Name | UPCGSpatialData |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Data/PCGSpatialData.h |
| Include Path | #include "Data/PCGSpatialData.h" |
Syntax
UCLASS (MinimalAPI, Abstract, BlueprintType, ClassGroup=(Procedural))
class UPCGSpatialData : public UPCGData
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGData → UPCGSpatialData
Derived Classes
UPCGSpatialData derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPCGSpatialData
(
const FObjectInitializer& ObjectInitializer |
Data/PCGSpatialData.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TypeInfo | FPCGDataTypeInfoSpatial | Data/PCGSpatialData.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bKeepZeroDensityPoints | bool | Data/PCGSpatialData.h |
|
|
| TargetActor | TWeakObjectPtr< AActor > | Recipient of any artifacts generated using this data. | Data/PCGSpatialData.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasCachedLastSelector | bool | Cache to keep track of the latest attribute manipulated on this data. | Data/PCGSpatialData.h | |
| CachedLastSelector | FPCGAttributePropertyInputSelector | Data/PCGSpatialData.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPCGMetadata * CreateEmptyMetadata() |
Data/PCGSpatialData.h |
|
|
virtual const UPCGSpatialData * FindFirstConcreteShapeFromNetwork() |
Find the first concrete (non-composite) shape in the network. Depth first search. | Data/PCGSpatialData.h | |
virtual FBox GetBounds() |
Returns the full bounds (including density fall-off) of the data | Data/PCGSpatialData.h |
|
virtual float GetDensityAtPosition
(
const FVector& InPosition |
Computes the density at a given location | Data/PCGSpatialData.h |
|
virtual int GetDimension() |
Returns the dimension of the data type, which has nothing to do with the dimension of its points | Data/PCGSpatialData.h |
|
virtual FVector GetNormal() |
Returns the expected data normal (for surfaces) or eventual projection axis (for volumes) | Data/PCGSpatialData.h |
|
virtual FBox GetStrictBounds() |
Returns the bounds in which the density is always 1 | Data/PCGSpatialData.h |
|
virtual bool HasNonTrivialTransform() |
Returns true if the data has a non-trivial transform | Data/PCGSpatialData.h |
|
virtual bool HasSpatialDataParent() |
True if data inherits from parent | Data/PCGSpatialData.h | |
void InitializeFromData
(
const UPCGSpatialData* InSource, |
Prefer using InitializeFromDataWithParams instead. | Data/PCGSpatialData.h |
|
void InitializeFromDataWithParams
(
const FPCGInitializeFromDataParams& InParams |
Data/PCGSpatialData.h |
|
|
virtual void InitializeTargetMetadata
(
const FPCGInitializeFromDataParams& InParams, |
Initialize another metadata from this data. | Data/PCGSpatialData.h | |
virtual UPCGIntersectionData * IntersectWith
(
FPCGContext* InContext, |
Data/PCGSpatialData.h | ||
virtual UPCGIntersectionData * IntersectWith
(
const UPCGSpatialData* InOther |
Data/PCGSpatialData.h | ||
virtual bool IsBounded() |
Returns whether a given spatial data is bounded as some data types do not require bounds by themselves | Data/PCGSpatialData.h | |
UPCGIntersectionData * K2_IntersectWith
(
const UPCGSpatialData* InOther |
Returns a specialized data to intersect with another data | Data/PCGSpatialData.h |
|
UPCGSpatialData * K2_ProjectOn
(
const UPCGSpatialData* InOther, |
Returns a specialized data to project this on another data of equal or higher dimension. | Data/PCGSpatialData.h |
|
bool K2_ProjectPoint
(
const FTransform& InTransform, |
Data/PCGSpatialData.h |
|
|
bool K2_SamplePoint
(
const FTransform& Transform, |
Sample rotation, scale and other attributes from this data at the query position. | Data/PCGSpatialData.h |
|
UPCGDifferenceData * K2_Subtract
(
const UPCGSpatialData* InOther |
Data/PCGSpatialData.h |
|
|
UPCGUnionData * K2_UnionWith
(
const UPCGSpatialData* InOther |
Returns a specialized data to union this with another data | Data/PCGSpatialData.h |
|
virtual TArray< FPCGTaskId > PrepareForSpatialQuery
(
FPCGContext* InContext, |
Optionally return a list of scheduled tasks that will prepare the data for spatial queries. | Data/PCGSpatialData.h | |
virtual UPCGSpatialData * ProjectOn
(
FPCGContext* InContext, |
Data/PCGSpatialData.h | ||
virtual UPCGSpatialData * ProjectOn
(
const UPCGSpatialData* InOther, |
Data/PCGSpatialData.h | ||
virtual bool ProjectPoint
(
const FTransform& InTransform, |
Project the query point onto this data, and sample point and metadata information at the projected position. | Data/PCGSpatialData.h | |
virtual void ProjectPoints
(
const TArrayView< const TPair< FTransform, FBox > >& Samples, |
Performs multiple projections of samples at the same time. | Data/PCGSpatialData.h | |
virtual bool RequiresCollapseToSample() |
True if this operation does not have an inverse and cannot be queried analytically/implicitly, and therefore must be collapsed to an explicit point representation. | Data/PCGSpatialData.h | |
virtual bool SamplePoint
(
const FTransform& Transform, |
Sample rotation, scale and other attributes from this data at the query position. | Data/PCGSpatialData.h | |
virtual void SamplePoints
(
const TArrayView< const TPair< FTransform, FBox > >& Samples, |
Performs multiple samples at the same time. | Data/PCGSpatialData.h | |
virtual UPCGDifferenceData * Subtract
(
const UPCGSpatialData* InOther |
Data/PCGSpatialData.h | ||
virtual UPCGDifferenceData * Subtract
(
FPCGContext* InContext, |
Data/PCGSpatialData.h | ||
virtual bool SupportsSpatialDataInheritance() |
True if subclass UPCGData instances support inheriting data from parent UPCGData | Data/PCGSpatialData.h | |
const UPCGBasePointData * ToBasePointData
(
FPCGContext* Context, |
Data/PCGSpatialData.h | ||
const UPCGBasePointData * ToBasePointDataWithContext
(
const FPCGBlueprintContextHandle& ContextHandle |
Data/PCGSpatialData.h |
|
|
virtual const UPCGPointArrayData * ToPointArrayData
(
FPCGContext* Context, |
Data/PCGSpatialData.h | ||
const UPCGPointData * ToPointData () |
Discretizes the data into points | Data/PCGSpatialData.h |
|
virtual const UPCGPointData * ToPointData
(
FPCGContext* Context, |
Data/PCGSpatialData.h | ||
const UPCGPointData * ToPointDataWithContext
(
FPCGContext& Context |
Prefer using ToBasePointDataWithContext | Data/PCGSpatialData.h |
|
virtual UPCGUnionData * UnionWith
(
const UPCGSpatialData* InOther |
Data/PCGSpatialData.h | ||
virtual UPCGUnionData * UnionWith
(
FPCGContext* InContext, |
Data/PCGSpatialData.h |
Overridden from UPCGData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddToCrc
(
FArchiveCrc32& Ar, |
Adds this data to Crc. | Data/PCGSpatialData.h | |
virtual UPCGSpatialData * DuplicateData
(
FPCGContext* Context, |
Virtual call to allocate a new spacial data object, duplicate this spatial data into and parent the new metadata with this class metadata (if asked). | Data/PCGSpatialData.h | |
virtual FPCGAttributePropertyInputSelector GetCachedLastSelector() |
Returns the cached last selector. Used to know how to convert `@Last_ in an attribute selector. | Data/PCGSpatialData.h | |
virtual PRAGMA_DISABLE_DEPRECATION_WARNINGSEPCGDataType GetDataType() |
@todo_pcg To be deprecated when we switch to the new type | Data/PCGSpatialData.h | |
virtual const FPCGDataTypeBaseId & GetDataTypeId() |
Data/PCGSpatialData.h | ||
virtual bool HasCachedLastSelector () |
Returns true if the data has a cached last selector. | Data/PCGSpatialData.h | |
virtual void SetLastSelector
(
const FPCGAttributePropertySelector& InSelector |
Set the last selector used to modify an attribute. | Data/PCGSpatialData.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
Data/PCGSpatialData.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UPCGSpatialData * CopyInternal
(
FPCGContext* Context |
Data/PCGSpatialData.h | ||
virtual UPCGSpatialData * CopyInternal () |
Data/PCGSpatialData.h | ||
void InitializeMetadata
(
const FPCGInitializeFromDataParams& InParams |
Data/PCGSpatialData.h | ||
virtual void InitializeMetadataInternal
(
const FPCGInitializeFromDataParams& InParams |
Data/PCGSpatialData.h | ||
virtual void InitializeSpatialDataInternal
(
const FPCGInitializeFromDataParams& InParams |
Data/PCGSpatialData.h |