UPointSetComponent

[UPointSetComponent](API\Plugins\ModelingComponents\Drawing\UPointSetComponent) is a Component that draws a set of points, as small squares.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Drawing/PointSetComponent.h

Include

#include "Drawing/PointSetComponent.h"

Syntax

UCLASS()
class UPointSetComponent : public UMeshComponent

Remarks

UPointSetComponent is a Component that draws a set of points, as small squares. Per-point Color and (view-space) Size is supported. Normals are not supported.

Points are inserted with an externally-defined ID, internally this is done via a TSparseArray. This class allocates a contiguous TArray large enugh to hold the largest ID. Using ReservePoints() may be beneficial for huge arrays.

The points are drawn as two triangles (ie a square) orthogonal to the view direction. The actual point size is calculated in the shader, and so a custom material must be used.

Constructors

Name Description

Public function

UPointSetComponent()

Functions

Name Description

Public function

int32

 

AddPoint

(
    const FRenderablePoint& OverlayPoi...
)

Add a point to be rendered using the component.

Public function

int32

 

AddPoint

(
    const FVector& InPosition,
    const FColor& InColor,
    const float InSize,
    const float InDepthBias
)

Create and add a point to be rendered using the component.

Public function

void

 

Clear()

Clear all primitives

Public function

const FRende...

 

GetPoint

(
    const int32 ID
)

Retrieve a point with the given id.

Public function

void

 

InsertPoint

(
    const int32 ID,
    const FRenderablePoint& OverlayPoi...
)

Insert a point with the given ID into the set.

Public function Const

bool

 

IsPointValid

(
    const int32 ID
)

Queries whether a point with the given ID exists

Public function

void

 

RemovePoint

(
    const int32 ID
)

Remove a point from the set.

Public function

void

 

ReservePoints

(
    const int32 MaxID
)

Reserve enough memory for up to the given ID

Public function

void

 

SetAllPointsColor

(
    const FColor& NewColor
)

Sets the color of all points currently in the set.

Public function

void

 

SetPointColor

(
    const int32 ID,
    const FColor& NewColor
)

Sets the color of a point

Public function

void

 

SetPointMaterial

(
    UMaterialInterface* InPointMat...
)

Specify material which handles points

Public function

void

 

SetPointPosition

(
    const int32 ID,
    const FVector& NewPosition
)

Sets the position of a point (assumes its existence).

Public function

void

 

SetPointSize

(
    const int32 ID,
    const float NewSize
)

Sets the size of a point