Navigation
API > API/Plugins > API/Plugins/UVEditorTools
UBasic2DPointSetComponent and UBasic3DPointSetComponent are components that draw a set of points as small squares. The 2D version stores XY coordinates with Z set to 0 whereas the 3D version stores XYZ coordinates. All points have the same color, size, and depth bias based on what is set via SetPointSetParameters(). The points are drawn as two triangles, i.e. a square, orthogonal to the view direction. The actual point size is calculated in the shader using a custom material.
Before inserting any points via AddElement(), the maximum number of points that will be added needs to be declared via ReserveElements(). The actual number of points that were added is available via NumElements().
To support both 2D and 3D with minimal code duplication, the point set components are composed from the UBasicPointSetComponentBase class for the component specific functionality, and an instantiation of the TBasicElementSet template class for either FVector2f or FVector3f that encapsulates all point specific functionality. The final derived classes UBasic2DPointSetComponent and UBasic3DPointSetComponent contain identical boilerplate code to facilitate calls that need to go both to the component base class and the point base class, e.g. Clear() will both mark the component as dirty and delete all points. Base class for component specific functionality independent of the type of point stored in the component.
| Name | UBasicPointSetComponentBase |
| Type | class |
| Header File | /Engine/Plugins/Editor/UVEditor/Source/UVEditorTools/Public/Drawing/BasicPointSetComponent.h |
| Include Path | #include "Drawing/BasicPointSetComponent.h" |
Syntax
UCLASS (MinimalAPI)
class UBasicPointSetComponentBase : public UMeshComponent
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshComponent → UBasicPointSetComponentBase
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UBasicPointSetComponentBase() |
Drawing/BasicPointSetComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearComponent() |
Clears the component state and marks component as dirty. | Drawing/BasicPointSetComponent.h | |
void SetColor
(
const FColor InColor |
Set per point material Color parameter that is uniform for all points. | Drawing/BasicPointSetComponent.h | |
void SetPointMaterial
(
UMaterialInterface* InPointMaterial |
Specify material that handles points. | Drawing/BasicPointSetComponent.h | |
void SetPointSetParameters
(
FColor InColor, |
Set per point material parameters that are uniform for all points. | Drawing/BasicPointSetComponent.h | |
void SetPointSize
(
const float InSize |
Set per point material Size parameter tat is uniform for all points. | Drawing/BasicPointSetComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 GetNumMaterials() |
Drawing/BasicPointSetComponent.h | ||
FBoxSphereBounds UpdateComponentBounds
(
const FTransform& LocalToWorld, |
Update component bounds using a provided function that determines the box around all point positions. | Drawing/BasicPointSetComponent.h |