Files
UnrealEngineUWP/Engine/Plugins/Experimental/MeshModelingToolsetExp/Source/MeshModelingToolsExp/Public/Physics/CollisionPropertySets.h
T
ryan schmidt b88e05ba4c AutoLOD:
- add support for a Settings Preset, as an explicit Asset type. UStaticMeshLODGenerationSettings contains a copy of the GenerateProcess Settings, UStaticMeshLODGenerationSettingsFactory allows this UObject to be used as an Asset in the Editor.  UGenerateStaticMeshLODAssetTool now has a Preset slot, and action buttons to Read/Write to the currently-selected Settings Asset. New Settings Asset can be created via the Asset Picker popup in the Tool, currently creating via the New Asset menu is disabled via UStaticMeshLODGenerationSettingsFactory::GetMenuCategories()
- UGenerateStaticMeshLODProcess now automatically ignores input textures that have a constant value
- UGenerateStaticMeshLODProcess now skips writing output NormalMap and MultiTexture if they are not referenced by any output Materials
- UGenerateStaticMeshLODProcess now supports configuring whether a Texture or Material will be considered for Baking. If disabled, then the source Texture/Material is used (currently the Textures are still baked, they are just ignored while configuring/writing the outputs).
- UGenerateStaticMeshLODAssetTool now exposes lists of source Texture and Materials with option to skip baking (used to configure the above options)
- wrote header comments for UGenerateStaticMeshLODProcess
- overall cleanup in  UGenerateStaticMeshLODAssetTool, ie category names, organization, etc

- add TImageBuilder::IsConstantValue(), checks if all pixels of image are the same value

#rb tyson.brochu
#rnx
#jira none
#preflight 6137ae4fd9c85a00013838c1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17449788 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17449840 by ryan schmidt in ue5-release-engine-test branch]
2021-09-07 16:51:03 -04:00

147 lines
3.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "InteractiveTool.h"
#include "Engine/Classes/PhysicsEngine/AggregateGeom.h"
#include "BodySetupEnums.h"
#include "CollisionPropertySets.generated.h"
class FPhysicsDataCollection;
UENUM()
enum class ECollisionGeometryMode
{
/** Use project physics settings (DefaultShapeComplexity) */
Default = CTF_UseDefault,
/** Create both simple and complex shapes. Simple shapes are used for regular scene queries and collision tests. Complex shape (per poly) is used for complex scene queries.*/
SimpleAndComplex = CTF_UseSimpleAndComplex,
/** Create only simple shapes. Use simple shapes for all scene queries and collision tests.*/
UseSimpleAsComplex = CTF_UseSimpleAsComplex,
/** Create only complex shapes (per poly). Use complex shapes for all scene queries and collision tests. Can be used in simulation for static shapes only (i.e can be collided against but not moved through forces or velocity.) */
UseComplexAsSimple = CTF_UseComplexAsSimple
};
USTRUCT()
struct MESHMODELINGTOOLSEXP_API FPhysicsSphereData
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, Category = Sphere)
float Radius = 0.0f;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FTransform Transform;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FKShapeElem Element;
};
USTRUCT()
struct MESHMODELINGTOOLSEXP_API FPhysicsBoxData
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, Category = Sphere)
FVector Dimensions = FVector::ZeroVector;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FTransform Transform;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FKShapeElem Element;
};
USTRUCT()
struct MESHMODELINGTOOLSEXP_API FPhysicsCapsuleData
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, Category = Sphere)
float Radius = 0.0f;
UPROPERTY(VisibleAnywhere, Category = Sphere)
float Length = 0.0f;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FTransform Transform;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FKShapeElem Element;
};
USTRUCT()
struct MESHMODELINGTOOLSEXP_API FPhysicsConvexData
{
GENERATED_BODY()
UPROPERTY(VisibleAnywhere, Category = Convex)
int32 NumVertices = 0;
UPROPERTY(VisibleAnywhere, Category = Convex)
int32 NumFaces = 0;
UPROPERTY(VisibleAnywhere, Category = Sphere)
FKShapeElem Element;
};
UCLASS()
class MESHMODELINGTOOLSEXP_API UPhysicsObjectToolPropertySet : public UInteractiveToolPropertySet
{
GENERATED_BODY()
public:
UPROPERTY(VisibleAnywhere, Category = PhysicsData)
FString ObjectName;
UPROPERTY(VisibleAnywhere, Category = PhysicsData)
ECollisionGeometryMode CollisionType;
UPROPERTY(VisibleAnywhere, Category = PhysicsData)
TArray<FPhysicsSphereData> Spheres;
UPROPERTY(VisibleAnywhere, Category = PhysicsData)
TArray<FPhysicsBoxData> Boxes;
UPROPERTY(VisibleAnywhere, Category = PhysicsData)
TArray<FPhysicsCapsuleData> Capsules;
UPROPERTY(VisibleAnywhere, Category = PhysicsData)
TArray<FPhysicsConvexData> Convexes;
void Reset();
};
UCLASS()
class MESHMODELINGTOOLSEXP_API UCollisionGeometryVisualizationProperties : public UInteractiveToolPropertySet
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = "Collision Visualization")
float LineThickness = 3.0f;
UPROPERTY(EditAnywhere, Category = "Collision Visualization")
bool bShowHidden = false;
UPROPERTY(EditAnywhere, Category = "Collision Visualization")
FColor Color = FColor::Red;
};
namespace UE
{
namespace PhysicsTools
{
void InitializePhysicsToolObjectPropertySet(const FPhysicsDataCollection* PhysicsData, UPhysicsObjectToolPropertySet* PropSet);
}
}