Pioneer
Loading...
Searching...
No Matches
Tag.h
Go to the documentation of this file.
1// Copyright © 2008-2024 Pioneer Developers. See AUTHORS.txt for details
2// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3
4#pragma once
5
6#include "MatrixTransform.h"
7#include "matrix4x4.h"
8
9namespace Graphics {
10 class Renderer;
11}
12
13namespace SceneGraph {
14
15 /*
16 * Stores a named slot that can be queried from outside the model
17 */
18 class Tag : public MatrixTransform {
19 public:
20 Tag(Graphics::Renderer *r, const matrix4x4f &m);
21 Tag(const Tag &, NodeCopyCache *cache = 0);
22
23 virtual Node *Clone(NodeCopyCache *cache = 0) override;
24 virtual const char *GetTypeName() const override { return "Tag"; }
25 virtual void Accept(NodeVisitor &v) override;
26
27 virtual void Save(NodeDatabase &) override;
28 static Tag *Load(NodeDatabase &);
29
30 const matrix4x4f &GetGlobalTransform() const { return m_globalTransform; }
31 // Update the cached global transform so we see changes
32 // to the model transform hierarchy
34
35 protected:
36 virtual ~Tag() {}
37
38 private:
39 matrix4x4f m_globalTransform;
40 };
41} // namespace SceneGraph
Definition: Renderer.h:45
Definition: MatrixTransform.h:24
Definition: NodeCopyCache.h:14
Definition: NodeVisitor.h:25
Definition: Node.h:75
Definition: Tag.h:18
void UpdateGlobalTransform()
Definition: Tag.cpp:54
virtual const char * GetTypeName() const override
Definition: Tag.h:24
virtual Node * Clone(NodeCopyCache *cache=0) override
Definition: Tag.cpp:28
static Tag * Load(NodeDatabase &)
Definition: Tag.cpp:43
virtual void Accept(NodeVisitor &v) override
Definition: Tag.cpp:33
virtual void Save(NodeDatabase &) override
Definition: Tag.cpp:38
virtual ~Tag()
Definition: Tag.h:36
const matrix4x4f & GetGlobalTransform() const
Definition: Tag.h:30
Definition: Background.h:14
Definition: CityOnPlanet.h:32
Definition: Node.h:66