2022-09-26 15:12:13 -04:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "Misc/AssertionMacros.h"
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuR/MutableMath.h"
|
2022-10-02 10:56:02 -04:00
|
|
|
#include "MuR/Parameters.h"
|
|
|
|
|
#include "MuT/Node.h"
|
|
|
|
|
#include "MuT/NodePrivate.h"
|
|
|
|
|
#include "MuT/NodeProjector.h"
|
|
|
|
|
#include "MuT/NodeProjectorPrivate.h"
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace mu
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Static initialisation
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-06-10 04:10:54 -04:00
|
|
|
FNodeType NodeProjectorConstant::Private::s_type = FNodeType(Node::EType::ProjectorConstant, NodeProjector::GetStaticType() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//!
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
MUTABLE_IMPLEMENT_NODE( NodeProjectorConstant )
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Own Interface
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-03-18 04:26:21 -04:00
|
|
|
void NodeProjectorConstant::GetValue( PROJECTOR_TYPE* OutType,
|
|
|
|
|
FVector3f* OutPos,
|
|
|
|
|
FVector3f* OutDir,
|
|
|
|
|
FVector3f* OutUp,
|
|
|
|
|
FVector3f* OutScale,
|
|
|
|
|
float* OutProjectionAngle ) const
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
2024-03-18 04:26:21 -04:00
|
|
|
if (OutType) *OutType = m_pD->m_type;
|
2022-09-26 15:12:13 -04:00
|
|
|
|
2024-03-18 04:26:21 -04:00
|
|
|
if (OutPos) *OutPos = m_pD->m_position;
|
|
|
|
|
if (OutDir) *OutDir = m_pD->m_direction;
|
|
|
|
|
if (OutUp) *OutUp = m_pD->m_up;
|
|
|
|
|
if (OutScale) *OutScale = m_pD->m_scale;
|
2022-09-26 15:12:13 -04:00
|
|
|
|
2024-03-18 04:26:21 -04:00
|
|
|
if (OutProjectionAngle) *OutProjectionAngle = m_pD->m_projectionAngle;
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2024-03-18 04:26:21 -04:00
|
|
|
void NodeProjectorConstant::SetValue( PROJECTOR_TYPE type, FVector3f pos, FVector3f dir, FVector3f up, FVector3f scale, float projectionAngle )
|
2022-09-26 15:12:13 -04:00
|
|
|
{
|
|
|
|
|
m_pD->m_type = type;
|
2024-03-18 04:26:21 -04:00
|
|
|
m_pD->m_position = pos;
|
|
|
|
|
m_pD->m_direction = dir;
|
|
|
|
|
m_pD->m_up = up;
|
|
|
|
|
m_pD->m_scale = scale;
|
2022-09-26 15:12:13 -04:00
|
|
|
m_pD->m_projectionAngle = projectionAngle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|