Pioneer
Loading...
Searching...
No Matches
Label3D.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#ifndef _SCENEGRAPH_LABEL_H
5#define _SCENEGRAPH_LABEL_H
6/*
7 * Text geometry node, mostly for ship labels
8 */
9#include "Node.h"
10#include "graphics/Material.h"
13
14#include <memory>
15
16namespace Graphics {
17 class Renderer;
18 class RenderState;
19} // namespace Graphics
20
21namespace SceneGraph {
22
23 class Label3D : public Node {
24 public:
26 Label3D(const Label3D &, NodeCopyCache *cache = 0);
27 virtual Node *Clone(NodeCopyCache *cache = 0);
28 virtual const char *GetTypeName() const { return "Label3D"; }
29 void SetText(const std::string &);
30 virtual void Render(const matrix4x4f &trans, const RenderData *rd);
31 virtual void Accept(NodeVisitor &v);
32
33 private:
35 std::unique_ptr<Graphics::VertexArray> m_geometry;
36 std::unique_ptr<Graphics::MeshObject> m_textMesh;
38 };
39
40} // namespace SceneGraph
41
42#endif
Definition: Renderer.h:45
Definition: RefCounted.h:36
Definition: Label3D.h:23
virtual const char * GetTypeName() const
Definition: Label3D.h:28
void SetText(const std::string &)
Definition: Label3D.cpp:51
virtual void Render(const matrix4x4f &trans, const RenderData *rd)
Definition: Label3D.cpp:70
virtual Node * Clone(NodeCopyCache *cache=0)
Definition: Label3D.cpp:46
virtual void Accept(NodeVisitor &v)
Definition: Label3D.cpp:80
Definition: NodeCopyCache.h:14
Definition: NodeVisitor.h:25
Definition: Node.h:75
Definition: Background.h:14
Definition: CityOnPlanet.h:32
Definition: Node.h:47