Navigation
API > API/Plugins > API/Plugins/UVEditorTools > API/Plugins/UVEditorTools/Drawing
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- UBasicPointSetComponentBase
- UBasic2DPointSetComponent
- UBasic3DPointSetComponent
References
| Module | UVEditorTools |
| Header | /Engine/Plugins/Editor/UVEditor/Source/UVEditorTools/Public/Drawing/BasicPointSetComponent.h |
| Include | #include "Drawing/BasicPointSetComponent.h" |
Syntax
UCLASS&40;&41;
class UBasicPointSetComponentBase : public UMeshComponent
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bBoundsDirty | ||
| FBoxSphereBounds | Bounds | ||
| FColor | Color | ||
| float | DepthBias | ||
| TObjectPtr< const UMaterialInterface > | PointMaterial | ||
| float | Size |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Clears the component state and marks component as dirty. | ||
| void | SetPointMaterial
(
UMaterialInterface* InPointMaterial |
Specify material that handles points. | |
| void | SetPointSetParameters
(
FColor InColor, |
Set per point material parameters that are uniform for all points. | |
| FBoxSphereBounds | UpdateComponentBounds
(
const FTransform& LocalToWorld, |
Update component bounds using a provided function that determines the box around all point positions. |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| int32 | Return number of material elements in this primitive |