Files
UnrealEngineUWP/Engine/Plugins/Mutable/Source/MutableTools/Private/MuT/NodeModifierMeshClipMorphPlane.cpp
jordi rovira 5ba502d4c0 [mutable] Add option to select strategy of face clipping to various operations.
Default value should keep the current behaviour, but the current behaviour doesn't match past versions.
#jira UE-223903
#rnx
[REVIEW] [at]genis.sole
#rb genis.sole

[CL 36296524 by jordi rovira in 5.5 branch]
2024-09-16 03:38:54 -04:00

57 lines
1.9 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MuT/NodeModifierMeshClipMorphPlane.h"
#include "Misc/AssertionMacros.h"
#include "MuR/MutableMath.h"
#include "MuT/NodePrivate.h"
namespace mu
{
//---------------------------------------------------------------------------------------------
// Own Interface
//---------------------------------------------------------------------------------------------
void NodeModifierMeshClipMorphPlane::SetPlane(FVector3f Center, FVector3f Normal)
{
Parameters.Origin = Center;
Parameters.Normal = Normal;
}
//---------------------------------------------------------------------------------------------
void NodeModifierMeshClipMorphPlane::SetParams(float dist, float factor)
{
Parameters.DistanceToPlane = dist;
Parameters.LinearityFactor = factor;
}
//---------------------------------------------------------------------------------------------
void NodeModifierMeshClipMorphPlane::SetMorphEllipse(float radius1, float radius2, float rotation)
{
Parameters.Radius1 = radius1;
Parameters.Radius2 = radius2;
Parameters.Rotation = rotation;
}
//---------------------------------------------------------------------------------------------
void NodeModifierMeshClipMorphPlane::SetVertexSelectionBox(float centerX, float centerY, float centerZ, float radiusX, float radiusY, float radiusZ)
{
Parameters.VertexSelectionType = EClipVertexSelectionType::Shape;
Parameters.SelectionBoxOrigin = FVector3f(centerX, centerY, centerZ);
Parameters.SelectionBoxRadius = FVector3f(radiusX, radiusY, radiusZ);
}
//---------------------------------------------------------------------------------------------
void NodeModifierMeshClipMorphPlane::SetVertexSelectionBone(const FBoneName& BoneId, float maxEffectRadius)
{
Parameters.VertexSelectionType = EClipVertexSelectionType::BoneHierarchy;
Parameters.VertexSelectionBone = BoneId;
Parameters.MaxEffectRadius = maxEffectRadius;
}
}