// Copyright Epic Games, Inc. All Rights Reserved. #include "Commands/DNACalibRemoveMeshCommand.h" #include "DNACalibDNAReader.h" #include "DNACalibUtils.h" #include "FMemoryResource.h" #include "dnacalib/commands/RemoveMeshCommand.h" #include "dnacalib/dna/DNACalibDNAReader.h" class FDNACalibRemoveMeshCommand::Impl { public: Impl() : Command{new dnac::RemoveMeshCommand{FMemoryResource::Instance()}} { } void SetMeshIndex(uint16 MeshIndex) { Command->setMeshIndex(MeshIndex); } void SetMeshIndices(TArrayView MeshIndices) { Command->setMeshIndices(ViewOf(MeshIndices)); } void Run(FDNACalibDNAReader* Output) { Command->run(static_cast(Output->Unwrap())); } private: TUniquePtr Command; }; FDNACalibRemoveMeshCommand::FDNACalibRemoveMeshCommand() : ImplPtr{new Impl{}} { } FDNACalibRemoveMeshCommand::FDNACalibRemoveMeshCommand(uint16 MeshIndex) : ImplPtr{new Impl{}} { ImplPtr->SetMeshIndex(MeshIndex); } FDNACalibRemoveMeshCommand::FDNACalibRemoveMeshCommand(TArrayView MeshIndices) : ImplPtr{new Impl{}} { ImplPtr->SetMeshIndices(MeshIndices); } FDNACalibRemoveMeshCommand::~FDNACalibRemoveMeshCommand() = default; FDNACalibRemoveMeshCommand::FDNACalibRemoveMeshCommand(FDNACalibRemoveMeshCommand&&) = default; FDNACalibRemoveMeshCommand& FDNACalibRemoveMeshCommand::operator=(FDNACalibRemoveMeshCommand&&) = default; void FDNACalibRemoveMeshCommand::SetMeshIndex(uint16 MeshIndex) { ImplPtr->SetMeshIndex(MeshIndex); } void FDNACalibRemoveMeshCommand::SetMeshIndices(TArrayView MeshIndices) { ImplPtr->SetMeshIndices(MeshIndices); } void FDNACalibRemoveMeshCommand::Run(FDNACalibDNAReader* Output) { ImplPtr->Run(Output); }