2022-09-26 15:12:13 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeImageGradient.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "Misc/AssertionMacros.h"
|
|
|
|
|
#include "MuR/MutableMath.h"
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeColour.h"
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "MuT/NodeImageGradientPrivate.h"
|
|
|
|
|
#include "MuT/NodePrivate.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace mu
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Static initialisation
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-06-10 04:10:54 -04:00
|
|
|
FNodeType NodeImageGradient::Private::s_type = FNodeType(Node::EType::ImageGradient, NodeImage::GetStaticType() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//!
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
MUTABLE_IMPLEMENT_NODE( NodeImageGradient )
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Own Interface
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
NodeColourPtr NodeImageGradient::GetColour0() const
|
|
|
|
|
{
|
|
|
|
|
return m_pD->m_pColour0.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeImageGradient::SetColour0( NodeColourPtr pNode )
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_pColour0 = pNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
NodeColourPtr NodeImageGradient::GetColour1() const
|
|
|
|
|
{
|
|
|
|
|
return m_pD->m_pColour1.get();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeImageGradient::SetColour1( NodeColourPtr pNode )
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_pColour1 = pNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
int NodeImageGradient::GetSizeX() const
|
|
|
|
|
{
|
|
|
|
|
return m_pD->m_size[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
int NodeImageGradient::GetSizeY() const
|
|
|
|
|
{
|
|
|
|
|
return m_pD->m_size[1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeImageGradient::SetSize( int x, int y )
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_size[0] = x;
|
|
|
|
|
m_pD->m_size[1] = y;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|