VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
animation.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3#include "animation.h"
4
5namespace visutwin::canvas
6{
7 AnimationNode* Animation::getNode(const std::string& nodeName)
8 {
9 const auto it = _nodeDict.find(nodeName);
10 if (it == _nodeDict.end()) {
11 return nullptr;
12 }
13
14 return &_nodes[it->second];
15 }
16
17 const AnimationNode* Animation::getNode(const std::string& nodeName) const
18 {
19 const auto it = _nodeDict.find(nodeName);
20 if (it == _nodeDict.end()) {
21 return nullptr;
22 }
23
24 return &_nodes[it->second];
25 }
26
28 {
29 _nodeDict[node.name()] = _nodes.size();
30 _nodes.push_back(node);
31 }
32}
void addNode(const AnimationNode &node)
Definition animation.cpp:27
AnimationNode * getNode(const std::string &nodeName)
Definition animation.cpp:7
const std::string & name() const
Definition animation.h:32