Navigation
API > API/Plugins > API/Plugins/PCG
Data representing a single 2D polygon with a 3D transform (for spatial operations).
| Name | UPCGPolygon2DData |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Data/PCGPolygon2DData.h |
| Include Path | #include "Data/PCGPolygon2DData.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, ClassGroup=(Procedural))
class UPCGPolygon2DData : public UPCGPolyLineData
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGData → UPCGSpatialData → UPCGSpatialDataWithPointCache → UPCGPolyLineData → UPCGPolygon2DData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPCGPolygon2DData
(
const FObjectInitializer& ObjectInitializer |
Data/PCGPolygon2DData.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| TypeInfo | FPCGDataTypeInfoPolygon2D | Data/PCGPolygon2DData.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| SegmentAndHoleIndicesToSegmentIndex | TMap< TPair< int, int >, int > | Data/PCGPolygon2DData.h | ||
| SegmentCount | int | Data/PCGPolygon2DData.h | ||
| SegmentIndexToSegmentAndHoleIndices | TMap< int, TPair< int, int > > | Data/PCGPolygon2DData.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TUniquePtr< IPCGAttributeAccessorKeys > CreateAccessorKeys
(
const FPCGAttributePropertySelector& InSelector, |
Helper to create an accessor keys for data that doesn't yet exist. | Data/PCGPolygon2DData.h | |
TUniquePtr< const IPCGAttributeAccessorKeys > CreateConstAccessorKeys
(
const FPCGAttributePropertySelector& InSelector, |
Data/PCGPolygon2DData.h | ||
const UE::Geometry::FGeneralPolygon2d & GetPolygon() |
Data/PCGPolygon2DData.h | ||
const TMap< int, TPair< int, int > > & GetSegmentIndexToSegmentAndHoleIndices() |
Data/PCGPolygon2DData.h | ||
void SetPolygon
(
const UE::Geometry::FGeneralPolygon2d& InPolygon, |
Data/PCGPolygon2DData.h | ||
void SetPolygon
(
UE::Geometry::FGeneralPolygon2d&& InPolygon, |
Data/PCGPolygon2DData.h | ||
void SetTransform
(
const FTransform& InTransform, |
Data/PCGPolygon2DData.h | ||
void WriteMetadataToEntry
(
float InputKey, |
Data/PCGPolygon2DData.h |
Overridden from UPCGPolyLineData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AllocateMetadataEntries() |
Data/PCGPolygon2DData.h | ||
virtual TConstArrayView< PCGMetadataEntryKey > GetConstVerticesEntryKeys() |
Data/PCGPolygon2DData.h | ||
virtual double GetDistanceAtSegmentStart
(
int SegmentIndex |
Get the cumulative distance along the line to the start of a segment. | Data/PCGPolygon2DData.h | |
virtual float GetInputKeyAtDistance
(
int SegmentIndex, |
Get the input key at a distance along the line. | Data/PCGPolygon2DData.h | |
virtual FVector GetLocationAtAlpha
(
float Alpha |
Get the location of the point at the normalized [0, 1] parameter across the entire the poly line. | Data/PCGPolygon2DData.h | |
virtual TArrayView< PCGMetadataEntryKey > GetMutableVerticesEntryKeys() |
Data/PCGPolygon2DData.h | ||
virtual int GetNumSegments () |
Get the number of segments in this line. | Data/PCGPolygon2DData.h | |
virtual int GetNumVertices() |
Data/PCGPolygon2DData.h | ||
virtual double GetSegmentLength
(
int SegmentIndex |
Get the length of a specific segment of the line. | Data/PCGPolygon2DData.h | |
virtual FTransform GetTransform() |
~Begin UPCGPolyLineData interface - all these functions will return world space information (e.g. including scale, ...) unless specified | Data/PCGPolygon2DData.h | |
virtual FTransform GetTransformAtAlpha
(
float Alpha |
Get the full transform at the normalized [0, 1] parameter across the entire the poly line. | Data/PCGPolygon2DData.h | |
virtual FTransform GetTransformAtDistance
(
int SegmentIndex, |
Get the location at a distance along the line. | Data/PCGPolygon2DData.h | |
virtual bool IsClosed() |
True if the line is a closed loop. | Data/PCGPolygon2DData.h | |
virtual void WriteMetadataToPoint
(
float InputKey, |
This function should be called in the Sample/Project point function, but can also be called if the sampling is done manually. | Data/PCGPolygon2DData.h |
Overridden from UPCGSpatialDataWithPointCache
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual const UPCGPointArrayData * CreatePointArrayData
(
FPCGContext* Context, |
Data/PCGPolygon2DData.h | ||
virtual const UPCGPointData * CreatePointData
(
FPCGContext* Context |
Data/PCGPolygon2DData.h |
Overridden from UPCGSpatialData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBox GetBounds() |
Returns the full bounds (including density fall-off) of the data | Data/PCGPolygon2DData.h | |
virtual int GetDimension() |
Returns the dimension of the data type, which has nothing to do with the dimension of its points | Data/PCGPolygon2DData.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/PCGPolygon2DData.h | |
virtual bool SamplePoint
(
const FTransform& Transform, |
Sample rotation, scale and other attributes from this data at the query position. | Data/PCGPolygon2DData.h |
Overridden from UPCGData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddToCrc
(
FArchiveCrc32& Ar, |
Adds this data to Crc. | Data/PCGPolygon2DData.h | |
virtual TArray< FPCGMetadataDomainID > GetAllSupportedMetadataDomainIDs () |
Returns all the supported domain for this data. | Data/PCGPolygon2DData.h | |
virtual PRAGMA_DISABLE_DEPRECATION_WARNINGSEPCGDataType GetDataType() |
@todo_pcg To be deprecated when we switch to the new type | Data/PCGPolygon2DData.h | |
virtual const FPCGDataTypeBaseId & GetDataTypeId() |
Data/PCGPolygon2DData.h | ||
virtual FPCGMetadataDomainID GetDefaultMetadataDomainID () |
Returns the default domain for this data. | Data/PCGPolygon2DData.h | |
virtual FPCGMetadataDomainID GetMetadataDomainIDFromSelector
(
const FPCGAttributePropertySelector& InSelector |
Return the associated domain ID for a given domain name in the selector. | Data/PCGPolygon2DData.h | |
virtual bool SetDomainFromDomainID
(
const FPCGMetadataDomainID& InDomainID, |
Write the domain name into the selector associated with this domain ID. | Data/PCGPolygon2DData.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Serialize
(
FArchive& InArchive |
Data/PCGPolygon2DData.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const UPCGBasePointData * CreateBasePointData
(
FPCGContext* Context, |
Data/PCGPolygon2DData.h |
Overridden from UPCGSpatialData
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UPCGSpatialData * CopyInternal
(
FPCGContext* Context |
Data/PCGPolygon2DData.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TUniquePtr< IPCGAttributeAccessor > CreateStaticAccessor
(
const UPCGPolygon2DData* InData, |
Static helper to create an accessor on a data that doesn't yet exist, as accessors for spline data don't rely on existing data. | Data/PCGPolygon2DData.h | |
static FPCGAttributeAccessorMethods GetPolygon2DAccessorMethods() |
Get the functions to the accessor factory. | Data/PCGPolygon2DData.h |