2019-12-27 09:26:59 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
2019-10-01 20:41:42 -04:00
# pragma once
# include "BaseTools/SingleClickTool.h"
2020-04-18 18:42:59 -04:00
# include "CoreMinimal.h"
# include "InteractiveToolBuilder.h"
2019-10-01 20:41:42 -04:00
# include "PreviewMesh.h"
# include "Properties/MeshMaterialProperties.h"
2021-06-23 22:14:55 -04:00
# include "PropertySets/CreateMeshObjectTypeProperties.h"
2020-04-18 18:42:59 -04:00
# include "UObject/NoExportTypes.h"
2022-08-31 15:03:06 -04:00
# include "InteractiveToolQueryInterfaces.h"
2020-04-18 18:42:59 -04:00
2019-10-01 20:41:42 -04:00
# include "AddPrimitiveTool.generated.h"
2021-03-09 19:33:56 -04:00
PREDECLARE_USE_GEOMETRY_CLASS ( FDynamicMesh3 ) ;
2022-03-01 08:45:05 -05:00
class UCombinedTransformGizmo ;
class UDragAlignmentMechanic ;
2019-10-01 20:41:42 -04:00
/**
2020-04-18 18:42:59 -04:00
* Builder
2019-10-01 20:41:42 -04:00
*/
UCLASS ( )
class MESHMODELINGTOOLS_API UAddPrimitiveToolBuilder : public UInteractiveToolBuilder
{
GENERATED_BODY ( )
public :
2020-04-18 18:42:59 -04:00
enum class EMakeMeshShapeType : uint32
{
Box ,
Cylinder ,
Cone ,
Arrow ,
Rectangle ,
Disc ,
Torus ,
2021-02-17 10:26:34 -04:00
Sphere ,
2024-04-12 14:06:16 -04:00
Stairs ,
Capsule
2020-04-18 18:42:59 -04:00
} ;
2019-10-01 20:41:42 -04:00
virtual bool CanBuildTool ( const FToolBuilderState & SceneState ) const override ;
virtual UInteractiveTool * BuildTool ( const FToolBuilderState & SceneState ) const override ;
2020-04-18 18:42:59 -04:00
EMakeMeshShapeType ShapeType { EMakeMeshShapeType : : Box } ;
2019-10-01 20:41:42 -04:00
} ;
/** Placement Target Types */
UENUM ( )
enum class EMakeMeshPlacementType : uint8
{
2019-12-19 18:07:47 -05:00
GroundPlane = 0 ,
2024-01-24 10:03:07 -05:00
OnScene = 1 ,
AtOrigin = 2
2019-10-01 20:41:42 -04:00
} ;
/** Placement Pivot Location */
UENUM ( )
enum class EMakeMeshPivotLocation : uint8
{
Base ,
2019-10-24 04:22:13 -04:00
Centered ,
Top
2019-10-01 20:41:42 -04:00
} ;
2023-02-03 20:53:04 -05:00
/** PolyGroup mode for shape */
2020-03-10 16:54:55 -04:00
UENUM ( )
enum class EMakeMeshPolygroupMode : uint8
{
2023-02-03 20:53:04 -05:00
/** One PolyGroup for the entire shape */
2021-10-21 17:57:49 -04:00
PerShape ,
2023-02-03 20:53:04 -05:00
/** One PolyGroup for each geometric face */
2020-03-10 16:54:55 -04:00
PerFace ,
2023-02-03 20:53:04 -05:00
/** One PolyGroup for each quad/triangle */
2020-03-10 16:54:55 -04:00
PerQuad
} ;
2019-10-01 20:41:42 -04:00
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralShapeToolProperties : public UInteractiveToolPropertySet
{
GENERATED_BODY ( )
public :
2020-03-10 16:54:55 -04:00
2022-11-22 17:22:37 -05:00
/** How PolyGroups are assigned to shape primitives. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( ProceduralShapeSetting , DisplayName = " PolyGroup Mode " ) )
2020-04-18 18:42:59 -04:00
EMakeMeshPolygroupMode PolygroupMode = EMakeMeshPolygroupMode : : PerFace ;
2020-03-10 16:54:55 -04:00
2021-10-18 14:21:53 -04:00
/** How the shape is placed in the scene. */
2024-01-24 10:03:07 -05:00
UPROPERTY ( EditAnywhere , Category = Positioning , meta = ( DisplayName = " Target Position " ) )
2021-10-18 14:21:53 -04:00
EMakeMeshPlacementType TargetSurface = EMakeMeshPlacementType : : OnScene ;
2019-10-01 20:41:42 -04:00
2021-10-18 14:21:53 -04:00
/** Location of pivot within the shape */
2020-04-18 18:42:59 -04:00
UPROPERTY ( EditAnywhere , Category = Positioning , meta = ( ProceduralShapeSetting ) )
EMakeMeshPivotLocation PivotLocation = EMakeMeshPivotLocation : : Base ;
2019-10-01 20:41:42 -04:00
2024-05-13 13:38:19 -04:00
/** Initial rotation of the shape around its up axis, before placement. After placement, use the gizmo to control rotation. */
UPROPERTY ( EditAnywhere , Category = Positioning , DisplayName = " Initial Rotation " , meta = ( UIMin = " 0.0 " , UIMax = " 360.0 " , EditCondition = " !bShowGizmoOptions " , HideEditConditionToggle ) )
2020-04-18 18:42:59 -04:00
float Rotation = 0.0 ;
2019-10-24 04:22:13 -04:00
2021-10-18 14:21:53 -04:00
/** If true, aligns the shape along the normal of the surface it is placed on. */
UPROPERTY ( EditAnywhere , Category = Positioning , meta = ( EditCondition = " TargetSurface == EMakeMeshPlacementType::OnScene " ) )
bool bAlignToNormal = true ;
2019-10-01 20:41:42 -04:00
2022-03-01 08:45:05 -05:00
/** Show a gizmo to allow the mesh to be repositioned after the initial placement click. */
UPROPERTY ( EditAnywhere , Category = Positioning , meta = ( EditCondition = " bShowGizmoOptions " , EditConditionHides , HideEditConditionToggle ) )
bool bShowGizmo = true ;
//~ Not user visible- used to hide the bShowGizmo option when not yet placed mesh.
UPROPERTY ( meta = ( TransientToolProperty ) )
bool bShowGizmoOptions = false ;
2019-10-01 20:41:42 -04:00
} ;
2021-03-01 16:52:28 -04:00
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralBoxToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
public :
/** Width of the box */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2021-03-01 16:52:28 -04:00
float Width = 100.f ;
2021-10-18 14:21:53 -04:00
/** Depth of the box */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2021-03-01 16:52:28 -04:00
float Depth = 100.f ;
2021-10-18 14:21:53 -04:00
/** Height of the box */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2021-03-01 16:52:28 -04:00
float Height = 100.f ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the width */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2021-03-01 16:52:28 -04:00
int WidthSubdivisions = 1 ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the depth */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2021-03-01 16:52:28 -04:00
int DepthSubdivisions = 1 ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the height */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2021-03-01 16:52:28 -04:00
int HeightSubdivisions = 1 ;
} ;
UENUM ( )
enum class EProceduralRectType
{
2021-10-18 14:21:53 -04:00
/** Create a rectangle */
Rectangle ,
/** Create a rounded rectangle */
RoundedRectangle
2021-03-01 16:52:28 -04:00
} ;
2020-04-18 18:42:59 -04:00
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralRectangleToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Type of rectangle */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape )
2021-10-18 14:21:53 -04:00
EProceduralRectType RectangleType = EProceduralRectType : : Rectangle ;
2019-10-01 20:41:42 -04:00
2021-10-18 14:21:53 -04:00
/** Width of the rectangle */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Width = 100.f ;
2021-10-18 14:21:53 -04:00
/** Depth of the rectangle */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Depth = 100.f ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the width */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int WidthSubdivisions = 1 ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the depth */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int DepthSubdivisions = 1 ;
2023-08-02 18:43:44 -04:00
/** Whether to preserve the overall Width and Depth for a Rounded Rectangle, or to allow the rounded corners to extend outside those dimensions. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( EditCondition = " RectangleType == EProceduralRectType::RoundedRectangle " ) )
bool bMaintainDimension = true ;
2021-10-21 17:57:49 -04:00
/** Radius of rounded corners. This is only available for Rounded Rectangles. */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " RectangleType == EProceduralRectType::RoundedRectangle " ) )
2020-04-18 18:42:59 -04:00
float CornerRadius = 25.f ;
2021-10-21 17:57:49 -04:00
/** Number of radial slices for each rounded corner. This is only available for Rounded Rectangles. */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " 3 " , UIMax = " 128 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " RectangleType == EProceduralRectType::RoundedRectangle " ) )
2020-04-18 18:42:59 -04:00
int CornerSlices = 16 ;
} ;
2021-03-01 16:52:28 -04:00
UENUM ( )
enum class EProceduralDiscType
{
2021-10-18 14:21:53 -04:00
/** Create a disc */
Disc ,
/** Create a disc with a hole */
PuncturedDisc
2021-03-01 16:52:28 -04:00
} ;
2020-04-18 18:42:59 -04:00
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralDiscToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Type of disc */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape )
2021-03-01 16:52:28 -04:00
EProceduralDiscType DiscType = EProceduralDiscType : : Disc ;
2021-10-18 14:21:53 -04:00
/** Radius of the disc */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Radius = 50.f ;
2021-10-18 14:21:53 -04:00
/** Number of radial slices for the disc */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 128 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int RadialSlices = 16 ;
2021-10-18 14:21:53 -04:00
/** Number of radial subdivisions for each radial slice of the disc */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int RadialSubdivisions = 1 ;
2021-10-21 17:57:49 -04:00
/** Radius of the hole in the disc. This is only available for Punctured Discs. */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " DiscType == EProceduralDiscType::PuncturedDisc " ) )
2020-04-18 18:42:59 -04:00
float HoleRadius = 25.f ;
} ;
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralTorusToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Major radius of the torus, measured from the torus center to the center of the torus tube */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float MajorRadius = 50.f ;
2021-10-18 14:21:53 -04:00
/** Minor radius of the torus, measured from the center ot the torus tube to the tube surface */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float MinorRadius = 25.f ;
2021-10-18 14:21:53 -04:00
/** Number of radial slices along the torus tube */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 128 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2021-10-18 14:21:53 -04:00
int MajorSlices = 16 ;
2020-04-18 18:42:59 -04:00
2021-10-18 14:21:53 -04:00
/** Number of radial slices around the torus tube */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 128 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2021-10-18 14:21:53 -04:00
int MinorSlices = 16 ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralCylinderToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Radius of the cylinder */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Radius = 50.f ;
2021-10-18 14:21:53 -04:00
/** Height of the cylinder */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Height = 200.f ;
2021-10-18 14:21:53 -04:00
/** Number of radial slices for the cylinder */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 128 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int RadialSlices = 16 ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the height of the cylinder */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int HeightSubdivisions = 1 ;
} ;
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralConeToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Radius of the cone */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Radius = 50.f ;
2021-10-18 14:21:53 -04:00
/** Height of the cone */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Height = 200.f ;
2024-04-17 19:31:10 -04:00
/** Number of radial slices for the cone */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 128 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int RadialSlices = 16 ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along the height of the cone */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int HeightSubdivisions = 1 ;
} ;
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralArrowToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Radius of the arrow shaft */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float ShaftRadius = 20.f ;
2021-10-18 14:21:53 -04:00
/** Height of arrow shaft */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float ShaftHeight = 200.f ;
2021-10-18 14:21:53 -04:00
/** Radius of the arrow head base */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float HeadRadius = 60.f ;
2021-10-18 14:21:53 -04:00
/** Height of arrow head */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float HeadHeight = 120.f ;
2021-10-18 14:21:53 -04:00
/** Number of radial slices for the arrow */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 100 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
int RadialSlices = 16 ;
2021-10-18 14:21:53 -04:00
/** Number of subdivisions along each part of the arrow, i.e. shaft, head base, head cone */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
2021-10-18 14:21:53 -04:00
int HeightSubdivisions = 1 ;
2020-04-18 18:42:59 -04:00
} ;
2021-03-01 16:52:28 -04:00
UENUM ( )
enum class EProceduralSphereType
{
/** Create a Sphere with Lat Long parameterization */
2021-10-21 17:57:49 -04:00
LatLong ,
2021-03-01 16:52:28 -04:00
/** Create a Sphere with Box parameterization */
2021-10-21 17:57:49 -04:00
Box
2021-03-01 16:52:28 -04:00
} ;
2020-04-18 18:42:59 -04:00
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralSphereToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
2020-04-18 18:42:59 -04:00
public :
2021-10-18 14:21:53 -04:00
/** Radius of the sphere */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2020-04-18 18:42:59 -04:00
float Radius = 50.f ;
2021-10-21 17:57:49 -04:00
/** Type of subdivision for the sphere */
UPROPERTY ( EditAnywhere , Category = Shape )
EProceduralSphereType SubdivisionType = EProceduralSphereType : : Box ;
/** Number of subdivisions for each side of the sphere. This is only available for spheres with Box subdivision. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1 " , UIMax = " 100 " , ClampMin = " 1 " , ClampMax = " 500 " , ProceduralShapeSetting ,
EditCondition = " SubdivisionType == EProceduralSphereType::Box " ) )
int Subdivisions = 16 ;
/** Number of horizontal slices of the sphere. This is only available for spheres with Lat Long subdivision. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 100 " , ClampMin = " 4 " , ClampMax = " 500 " , ProceduralShapeSetting ,
EditCondition = " SubdivisionType == EProceduralSphereType::LatLong " ) )
2021-10-18 14:21:53 -04:00
int HorizontalSlices = 16 ;
2020-04-18 18:42:59 -04:00
2021-10-21 17:57:49 -04:00
/** Number of vertical slices of the sphere. This is only available for spheres with Lat Long subdivision. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 100 " , ClampMin = " 4 " , ClampMax = " 500 " , ProceduralShapeSetting ,
EditCondition = " SubdivisionType == EProceduralSphereType::LatLong " ) )
2021-10-18 14:21:53 -04:00
int VerticalSlices = 16 ;
2020-04-18 18:42:59 -04:00
} ;
2019-10-01 20:41:42 -04:00
2024-04-12 14:06:16 -04:00
UCLASS ( )
class MESHMODELINGTOOLS_API UProceduralCapsuleToolProperties : public UProceduralShapeToolProperties
{
GENERATED_BODY ( )
public :
/** Radius of the capsule */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
float Radius = 25.f ;
/** Length of cylindrical section of the capsule */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
float CylinderLength = 50.f ;
/** Number of slices of the hemispherical end caps. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 2 " , UIMax = " 100 " , ClampMin = " 2 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
int HemisphereSlices = 8 ;
/** Number of radial slices of the cylindrical section. */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 3 " , UIMax = " 100 " , ClampMin = " 3 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
int CylinderSlices = 16 ;
2024-04-17 12:20:16 -04:00
/** Number of lengthwise subdivisions along cylindrical section */
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 0 " , UIMax = " 100 " , ClampMin = " 0 " , ClampMax = " 500 " , ProceduralShapeSetting ) )
int CylinderSubdivisions = 1 ;
2024-04-12 14:06:16 -04:00
} ;
2021-02-25 13:48:43 -04:00
UENUM ( )
enum class EProceduralStairsType
{
/** Create a linear staircase */
2021-10-18 14:21:53 -04:00
Linear ,
2021-03-15 14:31:53 -04:00
/** Create a floating staircase */
2021-10-18 14:21:53 -04:00
Floating ,
2021-02-25 13:48:43 -04:00
/** Create a curved staircase */
2021-10-18 14:21:53 -04:00
Curved ,
2021-03-15 14:31:53 -04:00
/** Create a spiral staircase */
2021-10-18 14:21:53 -04:00
Spiral
2021-02-25 13:48:43 -04:00
} ;
2021-02-17 10:26:34 -04:00
UCLASS ( )
2021-02-25 13:48:43 -04:00
class MESHMODELINGTOOLS_API UProceduralStairsToolProperties : public UProceduralShapeToolProperties
2021-02-17 10:26:34 -04:00
{
GENERATED_BODY ( )
2021-10-18 14:21:53 -04:00
public :
/** Type of staircase */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape )
2021-10-18 14:21:53 -04:00
EProceduralStairsType StairsType = EProceduralStairsType : : Linear ;
/** Number of steps */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( DisplayName = " Number of Steps " , UIMin = " 2 " , UIMax = " 100 " , ClampMin = " 2 " , ClampMax = " 1000000 " , ProceduralShapeSetting ) )
2021-02-25 13:48:43 -04:00
int NumSteps = 8 ;
/** Width of each step */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2021-02-25 13:48:43 -04:00
float StepWidth = 150.0f ;
/** Height of each step */
2021-10-21 17:57:49 -04:00
UPROPERTY ( EditAnywhere , Category = Shape , meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ) )
2021-02-25 13:48:43 -04:00
float StepHeight = 20.0f ;
2021-10-21 17:57:49 -04:00
/** Depth of each step of linear stairs */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " StairsType == EProceduralStairsType::Linear || StairsType == EProceduralStairsType::Floating " ) )
2021-02-25 13:48:43 -04:00
float StepDepth = 30.0f ;
2021-10-21 17:57:49 -04:00
/** Angular length of curved stairs. Positive values are for clockwise and negative values are for counterclockwise. */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " -360.0 " , UIMax = " 360.0 " , ClampMin = " -360.0 " , ClampMax = " 360.0 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " StairsType == EProceduralStairsType::Curved " ) )
2021-02-25 13:48:43 -04:00
float CurveAngle = 90.0f ;
2021-10-21 17:57:49 -04:00
/** Angular length of spiral stairs. Positive values are for clockwise and negative values are for counterclockwise. */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " -720.0 " , UIMax = " 720.0 " , ClampMin = " -360000.0 " , ClampMax = " 360000.0 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " StairsType == EProceduralStairsType::Spiral " ) )
2021-03-15 14:31:53 -04:00
float SpiralAngle = 90.0f ;
2021-10-21 17:57:49 -04:00
/** Inner radius of curved and spiral stairs */
UPROPERTY ( EditAnywhere , Category = Shape ,
2021-10-18 14:21:53 -04:00
meta = ( UIMin = " 1.0 " , UIMax = " 1000.0 " , ClampMin = " 0.0001 " , ClampMax = " 1000000.0 " , ProceduralShapeSetting ,
2021-10-21 17:57:49 -04:00
EditCondition = " StairsType == EProceduralStairsType::Curved || StairsType == EProceduralStairsType::Spiral " ) )
2021-02-25 13:48:43 -04:00
float InnerRadius = 150.0f ;
2021-02-17 10:26:34 -04:00
} ;
2021-02-25 13:48:43 -04:00
2019-10-01 20:41:42 -04:00
/**
2020-04-18 18:42:59 -04:00
* Base tool to create primitives
2019-10-01 20:41:42 -04:00
*/
UCLASS ( )
2022-08-31 15:03:06 -04:00
class MESHMODELINGTOOLS_API UAddPrimitiveTool : public USingleClickTool , public IHoverBehaviorTarget , public IInteractiveToolCameraFocusAPI
2019-10-01 20:41:42 -04:00
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddPrimitiveTool ( const FObjectInitializer & ) ;
2020-04-18 18:42:59 -04:00
2019-10-01 20:41:42 -04:00
virtual void SetWorld ( UWorld * World ) ;
virtual void Setup ( ) override ;
virtual void Shutdown ( EToolShutdownType ShutdownType ) override ;
virtual void Render ( IToolsContextRenderAPI * RenderAPI ) override ;
2022-03-01 08:45:05 -05:00
virtual bool HasCancel ( ) const override { return true ; }
virtual bool HasAccept ( ) const override { return true ; }
virtual bool CanAccept ( ) const override ;
2019-10-01 20:41:42 -04:00
2020-01-07 15:54:23 -05:00
virtual void OnPropertyModified ( UObject * PropertySet , FProperty * Property ) override ;
2019-10-01 20:41:42 -04:00
2022-03-01 08:45:05 -05:00
// USingleClickTool
2019-10-01 20:41:42 -04:00
virtual void OnClicked ( const FInputDeviceRay & ClickPos ) override ;
2022-03-01 08:45:05 -05:00
virtual FInputRayHit IsHitByClick ( const FInputDeviceRay & ClickPos ) override ;
2019-10-01 20:41:42 -04:00
// IHoverBehaviorTarget interface
virtual FInputRayHit BeginHoverSequenceHitTest ( const FInputDeviceRay & PressPos ) override ;
virtual void OnBeginHover ( const FInputDeviceRay & DevicePos ) override ;
virtual bool OnUpdateHover ( const FInputDeviceRay & DevicePos ) override ;
virtual void OnEndHover ( ) override ;
2022-08-31 15:03:06 -04:00
// IInteractiveToolCameraFocusAPI implementation
virtual bool SupportsWorldSpaceFocusBox ( ) override ;
virtual FBox GetWorldSpaceFocusBox ( ) override ;
virtual bool SupportsWorldSpaceFocusPoint ( ) override ;
virtual bool GetWorldSpaceFocusPoint ( const FRay & WorldRay , FVector & PointOut ) override ;
2019-10-01 20:41:42 -04:00
protected :
2024-09-19 13:28:12 -04:00
virtual EMakeMeshPolygroupMode GetDefaultPolygroupMode ( ) const { return EMakeMeshPolygroupMode : : PerQuad ; }
2022-03-01 08:45:05 -05:00
enum class EState
{
PlacingPrimitive ,
AdjustingSettings
} ;
EState CurrentState = EState : : PlacingPrimitive ;
void SetState ( EState NewState ) ;
2020-04-18 18:42:59 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const { }
virtual UProceduralShapeToolProperties * CreateShapeSettings ( ) { return nullptr ; }
2022-03-01 08:45:05 -05:00
virtual void GenerateAsset ( ) ;
ModelingTools: add support for creating Volumes directly from DrawPolygon, DrawRevolve, DrawPolyPath, and AddPrimitive, CombineMeshes, CutMeshWithMesh, PlaneCut, BaseCreateFromSelected Tools. Improve support for Editing volumes, eg handling mesh/volume interactions, and add configurable auto-simplification for volumes to avoid painful Editor hangs.
- Move ToolTarget implementations, DynamicMeshToVolume to ModelingComponentsEditorOnly module
- move VolumeToDynamicMesh, DynamicMeshProvider/Commiter interfaces to ModelingComponents module
- Add UCreateMeshObjectTypeProperties property set to expose mesh/volume options
- Add FCreateMeshObjectParams::TypeHintClass to allow AVolume type (or other UClass hints) to be passed to creation APIs
- Add UE::ToolTarget::ConfigureCreateMeshObjectParams() util function in ModelingToolTargetUtil, tries to determine output type in a FCreateMeshObjectParams based on input ToolTarget
- Add UEditorModelingObjectsCreationAPI::CreateVolume() implementation
- Add UEditorModelingObjectsCreationAPI::FilterMaterials() that strips out any internal materials and replaces with WorldGridMaterial. This occurs when (eg) subtracting a Volume from a StaticMesh, because the temporary volume mesh gets assigned internal materials, but the Tools don't know this. Use in EditorModelingObjectsCreationAPI when creating new objects. UStaticMeshComponentToolTarget also does this filtering in ::CommitMaterialSetUpdate().
- Add ::ComponentTypeSupportsCollision() function to ComponentCollisionUtil, use to avoid checks/ensures for Volume targets
- Add support for automatic mesh simplification in DynamicMeshToVolume. Add CVar to VolumeDynamicMeshToolTarget.h to control max triangle count (default 500). Apply auto-simplify when creating or updating an AVolume. This prevents the Editor from blocking for long periods on meshes that are too high-res for volumes (even 500 is quite high).
- DynamicMeshToVolume now emits polygroup-faces that contain holes (ie multiple boundary loops) as a set of triangles, rather than emitting separate overlapping faces for each boundary loop
#rb none
#rnx
#jira none
#preflight 60ba50632c42ea0001cb54c5
[CL 16561742 by Ryan Schmidt in ue5-main branch]
2021-06-04 16:04:03 -04:00
/** Property set for type of output object (StaticMesh, Volume, etc) */
UPROPERTY ( )
2021-07-20 00:24:38 -04:00
TObjectPtr < UCreateMeshObjectTypeProperties > OutputTypeProperties ;
ModelingTools: add support for creating Volumes directly from DrawPolygon, DrawRevolve, DrawPolyPath, and AddPrimitive, CombineMeshes, CutMeshWithMesh, PlaneCut, BaseCreateFromSelected Tools. Improve support for Editing volumes, eg handling mesh/volume interactions, and add configurable auto-simplification for volumes to avoid painful Editor hangs.
- Move ToolTarget implementations, DynamicMeshToVolume to ModelingComponentsEditorOnly module
- move VolumeToDynamicMesh, DynamicMeshProvider/Commiter interfaces to ModelingComponents module
- Add UCreateMeshObjectTypeProperties property set to expose mesh/volume options
- Add FCreateMeshObjectParams::TypeHintClass to allow AVolume type (or other UClass hints) to be passed to creation APIs
- Add UE::ToolTarget::ConfigureCreateMeshObjectParams() util function in ModelingToolTargetUtil, tries to determine output type in a FCreateMeshObjectParams based on input ToolTarget
- Add UEditorModelingObjectsCreationAPI::CreateVolume() implementation
- Add UEditorModelingObjectsCreationAPI::FilterMaterials() that strips out any internal materials and replaces with WorldGridMaterial. This occurs when (eg) subtracting a Volume from a StaticMesh, because the temporary volume mesh gets assigned internal materials, but the Tools don't know this. Use in EditorModelingObjectsCreationAPI when creating new objects. UStaticMeshComponentToolTarget also does this filtering in ::CommitMaterialSetUpdate().
- Add ::ComponentTypeSupportsCollision() function to ComponentCollisionUtil, use to avoid checks/ensures for Volume targets
- Add support for automatic mesh simplification in DynamicMeshToVolume. Add CVar to VolumeDynamicMeshToolTarget.h to control max triangle count (default 500). Apply auto-simplify when creating or updating an AVolume. This prevents the Editor from blocking for long periods on meshes that are too high-res for volumes (even 500 is quite high).
- DynamicMeshToVolume now emits polygroup-faces that contain holes (ie multiple boundary loops) as a set of triangles, rather than emitting separate overlapping faces for each boundary loop
#rb none
#rnx
#jira none
#preflight 60ba50632c42ea0001cb54c5
[CL 16561742 by Ryan Schmidt in ue5-main branch]
2021-06-04 16:04:03 -04:00
2019-10-01 20:41:42 -04:00
UPROPERTY ( )
2021-07-20 00:24:38 -04:00
TObjectPtr < UProceduralShapeToolProperties > ShapeSettings ;
2019-10-01 20:41:42 -04:00
UPROPERTY ( )
2021-07-20 00:24:38 -04:00
TObjectPtr < UNewMeshMaterialProperties > MaterialProperties ;
2019-10-01 20:41:42 -04:00
UPROPERTY ( )
2021-07-20 00:24:38 -04:00
TObjectPtr < UPreviewMesh > PreviewMesh ;
2019-10-01 20:41:42 -04:00
2019-10-25 20:21:29 -04:00
UPROPERTY ( )
2022-03-01 08:45:05 -05:00
TObjectPtr < UCombinedTransformGizmo > Gizmo = nullptr ;
UPROPERTY ( )
TObjectPtr < UDragAlignmentMechanic > DragAlignmentMechanic = nullptr ;
2019-10-25 20:21:29 -04:00
2020-04-18 18:42:59 -04:00
UPROPERTY ( )
FString AssetName = TEXT ( " GeneratedAsset " ) ;
2019-10-25 20:21:29 -04:00
2019-10-01 20:41:42 -04:00
UWorld * TargetWorld ;
void UpdatePreviewPosition ( const FInputDeviceRay & ClickPos ) ;
2022-02-14 18:32:46 -05:00
UE : : Geometry : : FFrame3d ShapeFrame ;
2019-10-01 20:41:42 -04:00
2021-10-18 14:21:53 -04:00
void UpdatePreviewMesh ( ) const ;
2022-03-01 08:45:05 -05:00
2024-01-24 10:03:07 -05:00
void UpdateTargetSurface ( ) ;
2024-10-01 19:08:18 -04:00
// @return true if the primitive needs to be centered in the XY plane when placed.
virtual bool ShouldCenterXY ( ) const
{
// Most primitives are already XY centered, and re-centering them only introduces issues at very low samplings where the bounds center is offset from the intended center.
return false ;
}
2022-03-01 08:45:05 -05:00
// Used to make the initial placement of the mesh undoable
class FStateChange : public FToolCommandChange
{
public :
FStateChange ( const FTransform & MeshTransformIn )
: MeshTransform ( MeshTransformIn )
{
}
virtual void Apply ( UObject * Object ) override ;
virtual void Revert ( UObject * Object ) override ;
virtual FString ToString ( ) const override
{
return TEXT ( " UAddPrimitiveTool::FStateChange " ) ;
}
protected :
FTransform MeshTransform ;
} ;
2020-04-18 18:42:59 -04:00
} ;
2021-02-08 17:02:09 -04:00
2020-04-18 18:42:59 -04:00
UCLASS ( )
class UAddBoxPrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddBoxPrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class UAddCylinderPrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddCylinderPrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
2024-04-12 14:06:16 -04:00
UCLASS ( )
class UAddCapsulePrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
explicit UAddCapsulePrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
protected :
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
} ;
2020-04-18 18:42:59 -04:00
UCLASS ( )
class UAddConePrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddConePrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class UAddRectanglePrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddRectanglePrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class UAddDiscPrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddDiscPrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2022-09-16 12:46:36 -04:00
virtual void Setup ( ) override ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class UAddTorusPrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddTorusPrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class UAddArrowPrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddArrowPrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
UCLASS ( )
class UAddSpherePrimitiveTool : public UAddPrimitiveTool
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddSpherePrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2020-04-18 18:42:59 -04:00
protected :
2024-09-19 13:28:12 -04:00
virtual EMakeMeshPolygroupMode GetDefaultPolygroupMode ( ) const override
{
return EMakeMeshPolygroupMode : : PerFace ;
}
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2020-04-18 18:42:59 -04:00
} ;
2021-02-17 10:26:34 -04:00
UCLASS ( )
2021-02-25 13:48:43 -04:00
class UAddStairsPrimitiveTool : public UAddPrimitiveTool
2021-02-17 10:26:34 -04:00
{
GENERATED_BODY ( )
public :
2021-10-18 14:21:53 -04:00
explicit UAddStairsPrimitiveTool ( const FObjectInitializer & ObjectInitializer ) ;
2021-02-17 10:26:34 -04:00
protected :
2021-10-18 14:21:53 -04:00
virtual void GenerateMesh ( FDynamicMesh3 * OutMesh ) const override ;
2024-10-01 19:08:18 -04:00
virtual bool ShouldCenterXY ( ) const override
{
return true ;
}
2021-02-17 10:26:34 -04:00
} ;
2021-02-25 13:48:43 -04:00