// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "HAL/Platform.h" #include "MuR/Operations.h" #include "MuR/Ptr.h" #include "MuT/AST.h" namespace mu { struct FProgram; /** Remove a list of mesh fragments with a condition from a source mesh. */ class ASTOpMeshRemoveMask final : public ASTOp { public: //! Source mesh to remove from. ASTChild source; //! Pairs of remove candidates: condition + mesh to remove TArray< TPair > removes; /** Strategy to decide when to cull a face. */ EFaceCullStrategy FaceCullStrategy = EFaceCullStrategy::AllVerticesCulled; public: ASTOpMeshRemoveMask(); ASTOpMeshRemoveMask(const ASTOpMeshRemoveMask&) = delete; ~ASTOpMeshRemoveMask() override; // ASTOp interface EOpType GetOpType() const override { return EOpType::ME_REMOVEMASK; } uint64 Hash() const override; void ForEachChild(const TFunctionRef) override; bool IsEqual(const ASTOp& otherUntyped) const override; Ptr Clone(MapChildFuncRef mapChild) const override; void Link(FProgram& program, FLinkerOptions*) override; Ptr OptimiseSink(const FModelOptimizationOptions&, FOptimizeSinkContext&) const override; virtual FSourceDataDescriptor GetSourceDataDescriptor(FGetSourceDataDescriptorContext*) const override; // Own interface void AddRemove(const Ptr& condition, const Ptr& mask); }; }