Files
o3de/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/MipmapSettings.cpp
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

53 lines
1.9 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
*
*/
#include "ImageProcessing_precompiled.h"
#include <BuilderSettings/MipmapSettings.h>
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Serialization/SerializeContext.h>
namespace ImageProcessingAtom
{
bool MipmapSettings::operator!=(const MipmapSettings& other) const
{
return !(*this == other);
}
bool MipmapSettings::operator==(const MipmapSettings& other) const
{
return m_type == other.m_type;
}
void MipmapSettings::Reflect(AZ::ReflectContext* context)
{
AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context);
if (serialize)
{
serialize->Class<MipmapSettings>()
->Version(1)
->Field("MipGenType", &MipmapSettings::m_type);
AZ::EditContext* editContext = serialize->GetEditContext();
if (editContext)
{
editContext->Class<MipmapSettings>("Mipmap Setting", "")
->DataElement(AZ::Edit::UIHandlers::ComboBox, &MipmapSettings::m_type, "Type", "")
->EnumAttribute(MipGenType::point, "Point")
->EnumAttribute(MipGenType::box, "Average")
->EnumAttribute(MipGenType::triangle, "Linear")
->EnumAttribute(MipGenType::quadratic, "Bilinear")
->EnumAttribute(MipGenType::gaussian, "Gaussian")
->EnumAttribute(MipGenType::blackmanHarris, "BlackmanHarris")
->EnumAttribute(MipGenType::kaiserSinc, "KaiserSinc")
->Attribute(AZ::Edit::Attributes::Min, 0)
;
}
}
}
} // namespace ImageProcessingAtom