Skip to content

Commit

Permalink
Traktor: Some cleanup in shader node traits.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed Apr 23, 2024
1 parent c0d1c53 commit 89ae34d
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 87 deletions.
7 changes: 2 additions & 5 deletions code/Render/Editor/Shader/Traits/ArcusTanTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,10 +9,8 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/ArcusTanTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.ArcusTanTraits", 0, ArcusTanTraits, INodeTraits)

Expand Down Expand Up @@ -107,5 +105,4 @@ PinOrder ArcusTanTraits::evaluateOrder(
return pinOrderConstantOrNonLinear(inputPinOrders, node->getInputPinCount());
}

}
}
8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/ArcusTanTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class ArcusTanTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class ArcusTanTraits : public INodeTraits
) const override final;
};

}
}

7 changes: 2 additions & 5 deletions code/Render/Editor/Shader/Traits/ComputeNodeTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,10 +9,8 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/ComputeNodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.ComputeNodeTraits", 0, ComputeNodeTraits, INodeTraits)

Expand Down Expand Up @@ -109,5 +107,4 @@ PinOrder ComputeNodeTraits::evaluateOrder(
return PinOrder::Linear;
}

}
}
8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/ComputeNodeTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class ComputeNodeTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class ComputeNodeTraits : public INodeTraits
) const override final;
};

}
}

8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/ConditionalNodeTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class ConditionalNodeTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class ConditionalNodeTraits : public INodeTraits
) const override final;
};

}
}

7 changes: 2 additions & 5 deletions code/Render/Editor/Shader/Traits/ConstantNodeTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,10 +9,8 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/ConstantNodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.ConstantNodeTraits", 0, ConstantNodeTraits, INodeTraits)

Expand Down Expand Up @@ -180,5 +178,4 @@ PinOrder ConstantNodeTraits::evaluateOrder(
return PinOrder::Constant;
}

}
}
8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/ConstantNodeTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class ConstantNodeTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class ConstantNodeTraits : public INodeTraits
) const override final;
};

}
}

7 changes: 2 additions & 5 deletions code/Render/Editor/Shader/Traits/DotNodeTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,10 +9,8 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/DotNodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.DotNodeTraits", 0, DotNodeTraits, INodeTraits)

Expand Down Expand Up @@ -120,5 +118,4 @@ PinOrder DotNodeTraits::evaluateOrder(
return pinOrderConstantOrNonLinear(inputPinOrders, node->getInputPinCount());
}

}
}
8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/DotNodeTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class DotNodeTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class DotNodeTraits : public INodeTraits
) const override final;
};

}
}

11 changes: 4 additions & 7 deletions code/Render/Editor/Shader/Traits/IterativeNodeTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,12 +10,10 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/IterativeNodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
namespace
{
namespace
{

int32_t getInputPinIndex(const Node* node, const InputPin* inputPin)
{
Expand All @@ -29,7 +27,7 @@ int32_t getInputPinIndex(const Node* node, const InputPin* inputPin)
return -1;
}

}
}

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.IterativeNodeTraits", 0, IterativeNodeTraits, INodeTraits)

Expand Down Expand Up @@ -248,5 +246,4 @@ PinOrder IterativeNodeTraits::evaluateOrder(
return inputPinOrders[0];
}

}
}
8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/IterativeNodeTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class IterativeNodeTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class IterativeNodeTraits : public INodeTraits
) const override final;
};

}
}

7 changes: 2 additions & 5 deletions code/Render/Editor/Shader/Traits/LengthNodeTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -9,10 +9,8 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/LengthNodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.LengthNodeTraits", 0, LengthNodeTraits, INodeTraits)

Expand Down Expand Up @@ -110,5 +108,4 @@ PinOrder LengthNodeTraits::evaluateOrder(
return pinOrderConstantOrNonLinear(inputPinOrders, node->getInputPinCount());
}

}
}
8 changes: 2 additions & 6 deletions code/Render/Editor/Shader/Traits/LengthNodeTraits.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,10 +10,8 @@

#include "Render/Editor/Shader/INodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
{

class LengthNodeTraits : public INodeTraits
{
Expand Down Expand Up @@ -77,6 +75,4 @@ class LengthNodeTraits : public INodeTraits
) const override final;
};

}
}

11 changes: 4 additions & 7 deletions code/Render/Editor/Shader/Traits/LerpNodeTraits.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* TRAKTOR
* Copyright (c) 2022 Anders Pistol.
* Copyright (c) 2022-2024 Anders Pistol.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
Expand All @@ -10,12 +10,10 @@
#include "Render/Editor/Shader/Nodes.h"
#include "Render/Editor/Shader/Traits/LerpNodeTraits.h"

namespace traktor
namespace traktor::render
{
namespace render
namespace
{
namespace
{

int32_t getInputPinIndex(const Node* node, const InputPin* inputPin)
{
Expand All @@ -29,7 +27,7 @@ int32_t getInputPinIndex(const Node* node, const InputPin* inputPin)
return -1;
}

}
}

T_IMPLEMENT_RTTI_FACTORY_CLASS(L"traktor.render.LerpNodeTraits", 0, LerpNodeTraits, INodeTraits)

Expand Down Expand Up @@ -162,5 +160,4 @@ PinOrder LerpNodeTraits::evaluateOrder(
);
}

}
}
Loading

0 comments on commit 89ae34d

Please sign in to comment.