#pragma once #include "CoreMinimal.h" #include "FLESHEditor.h" /** * Node factory class, used to create and configure different types of viscera nodes */ class FVisceraNodeFactory { public: /** * Create soft body node * @param Name - Node name * @param DisplayName - Display name * @return Created node */ static TSharedPtr CreateSoftBodyNode(const FName& Name, const FString& DisplayName); /** * Create anchor node * @param Name - Node name * @param DisplayName - Display name * @param Location - Anchor location * @param Radius - Anchor radius * @param Stiffness - Anchor stiffness * @param BoneName - Bone name * @return Created node */ static TSharedPtr CreateAnchorNode( const FName& Name, const FString& DisplayName, const FVector& Location = FVector::ZeroVector, float Radius = 5.0f, float Stiffness = 1.0f, FName BoneName = NAME_None); /** * Create line chain node * @param Name - Node name * @param DisplayName - Display name * @param Points - Line chain points * @param Stiffness - Line chain stiffness * @param Thickness - Line chain thickness * @return Created node */ static TSharedPtr CreateLineChainNode( const FName& Name, const FString& DisplayName, const TArray& Points, float Stiffness = 0.5f, float Thickness = 1.0f); /** * Create tetrahedron node * @param Name - Node name * @param DisplayName - Display name * @param Points - Tetrahedron points * @param Stiffness - Tetrahedron stiffness * @return Created node */ static TSharedPtr CreateTetraNode( const FName& Name, const FString& DisplayName, const TArray& Points, float Stiffness = 0.7f); /** * Create plane constraint node * @param Name - Node name * @param DisplayName - Display name * @param Location - Plane location * @param Normal - Plane normal * @param Stiffness - Plane stiffness * @return Created node */ static TSharedPtr CreatePlaneNode( const FName& Name, const FString& DisplayName, const FVector& Location = FVector::ZeroVector, const FVector& Normal = FVector::UpVector, float Stiffness = 1.0f); /** * Create time node * @param Name - Node name * @param DisplayName - Display name * @param SubstepTime - Substep time * @param SolverIterations - Solver iterations * @return Created node */ static TSharedPtr CreateTimeNode( const FName& Name, const FString& DisplayName, float SubstepTime = 0.01667f, float SolverIterations = 1.0f); /** * Create group collisions node * @param Name - Node name * @param DisplayName - Display name * @return Created node */ static TSharedPtr CreateGroupCollisionsNode( const FName& Name, const FString& DisplayName); };