Files
o3de/Gems/WhiteBox/Code/Source/Asset/WhiteBoxMeshAssetUndoCommand.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

47 lines
1.5 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include "WhiteBoxMeshAsset.h"
#include <AzToolsFramework/Undo/UndoSystem.h>
namespace WhiteBox
{
//! Records undo/redo states when modifying an asset.
class WhiteBoxMeshAssetUndoCommand : public AzToolsFramework::UndoSystem::URSequencePoint
{
public:
AZ_CLASS_ALLOCATOR_DECL
AZ_RTTI(
WhiteBoxMeshAssetUndoCommand, "{C99CD86C-035A-4FC9-AADC-4C746C38F119}",
AzToolsFramework::UndoSystem::URSequencePoint)
explicit WhiteBoxMeshAssetUndoCommand();
WhiteBoxMeshAssetUndoCommand(const WhiteBoxMeshAssetUndoCommand& other) = delete;
WhiteBoxMeshAssetUndoCommand& operator=(const WhiteBoxMeshAssetUndoCommand& other) = delete;
~WhiteBoxMeshAssetUndoCommand() override = default;
void SetAsset(AZ::Data::Asset<Pipeline::WhiteBoxMeshAsset> asset);
void SetUndoState(const Api::WhiteBoxMeshStream& undoState);
void SetRedoState(const Api::WhiteBoxMeshStream& redoState);
// AzToolsFramework::UndoSystem::URSequencePoint ...
void Undo() override;
void Redo() override;
bool Changed() const override;
protected:
AZ::Data::Asset<Pipeline::WhiteBoxMeshAsset> m_asset;
Api::WhiteBoxMeshStream m_undoState;
Api::WhiteBoxMeshStream m_redoState;
};
} // namespace WhiteBox