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/NodeMeshVariation.h"
|
2022-10-02 10:56:02 -04:00
|
|
|
|
|
|
|
|
#include "Misc/AssertionMacros.h"
|
2022-10-01 02:04:57 -04:00
|
|
|
#include "MuT/NodeMeshVariationPrivate.h"
|
2022-10-02 10:56:02 -04:00
|
|
|
#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 NodeMeshVariation::Private::s_type = FNodeType(Node::EType::MeshVariation, NodeMesh::GetStaticType() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
2024-06-10 04:10:54 -04:00
|
|
|
MUTABLE_IMPLEMENT_NODE( NodeMeshVariation )
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
// Own Interface
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2022-10-11 05:14:05 -04:00
|
|
|
void NodeMeshVariation::SetDefaultMesh( NodeMesh* p )
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_defaultMesh = p;
|
|
|
|
|
}
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
2022-10-11 05:14:05 -04:00
|
|
|
int NodeMeshVariation::GetVariationCount() const
|
|
|
|
|
{
|
|
|
|
|
return m_pD->m_variations.Num();
|
|
|
|
|
}
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeMeshVariation::SetVariationCount( int num )
|
|
|
|
|
{
|
|
|
|
|
check( num >= 0 );
|
2022-10-11 05:14:05 -04:00
|
|
|
m_pD->m_variations.SetNum( num );
|
2022-09-26 15:12:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeMeshVariation::SetVariationTag( int index, const char* strTag )
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( index >= 0 && index < m_pD->m_variations.Num() );
|
2022-09-26 15:12:13 -04:00
|
|
|
check( strTag );
|
|
|
|
|
|
|
|
|
|
if ( strTag )
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_variations[index].m_tag = strTag;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_pD->m_variations[index].m_tag = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
void NodeMeshVariation::SetVariationMesh( int index, NodeMesh* pNode )
|
|
|
|
|
{
|
2022-10-11 05:14:05 -04:00
|
|
|
check( index >= 0 && index < m_pD->m_variations.Num() );
|
2022-09-26 15:12:13 -04:00
|
|
|
|
|
|
|
|
m_pD->m_variations[index].m_mesh = pNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace mu
|