Files
UnrealEngine/Engine/Plugins/Mutable/Source/MutableTools/Public/MuT/NodeMeshReshape.h
2025-05-18 13:04:45 +08:00

54 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "MuR/Ptr.h"
#include "MuT/Node.h"
#include "MuT/NodeMesh.h"
#include "MuR/Mesh.h"
#include "MuR/Skeleton.h"
namespace mu
{
/** Node that morphs a base mesh with one or two weighted targets from a sequence. */
class MUTABLETOOLS_API NodeMeshReshape : public NodeMesh
{
public:
Ptr<NodeMesh> BaseMesh;
Ptr<NodeMesh> BaseShape;
Ptr<NodeMesh> TargetShape;
bool bReshapeVertices = true;
bool bRecomputeNormals = false;
bool bApplyLaplacian = false;
bool bReshapeSkeleton = false;
bool bReshapePhysicsVolumes = false;
EVertexColorUsage ColorRChannelUsage = EVertexColorUsage::None;
EVertexColorUsage ColorGChannelUsage = EVertexColorUsage::None;
EVertexColorUsage ColorBChannelUsage = EVertexColorUsage::None;
EVertexColorUsage ColorAChannelUsage = EVertexColorUsage::None;
TArray<FBoneName> BonesToDeform;
TArray<FBoneName> PhysicsToDeform;
public:
// Node Interface
virtual const FNodeType* GetType() const override { return &StaticType; }
static const FNodeType* GetStaticType() { return &StaticType; }
protected:
/** Forbidden. Manage with the Ptr<> template. */
~NodeMeshReshape() {}
private:
static FNodeType StaticType;
};
}