Pioneer
Label3D.h
Go to the documentation of this file.
1 // Copyright © 2008-2021 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"
11 #include "graphics/VertexBuffer.h"
12 #include "graphics/Material.h"
13 #include "text/DistanceFieldFont.h"
14 
15 namespace Graphics {
16  class Renderer;
17  class RenderState;
18 }
19 
20 namespace SceneGraph {
21 
22  class Label3D : public Node {
23  public:
25  Label3D(const Label3D &, NodeCopyCache *cache = 0);
26  virtual Node *Clone(NodeCopyCache *cache = 0);
27  virtual const char *GetTypeName() const { return "Label3D"; }
28  void SetText(const std::string &);
29  virtual void Render(const matrix4x4f &trans, const RenderData *rd);
30  virtual void Accept(NodeVisitor &v);
31 
32  private:
34  std::unique_ptr<Graphics::VertexArray> m_geometry;
35  std::unique_ptr<Graphics::VertexBuffer> m_vbuffer;
37  Graphics::RenderState *m_renderState;
38  };
39 
40 } // namespace SceneGraph
41 
42 #endif
Definition: RenderState.h:25
Definition: Renderer.h:39
Definition: Label3D.h:22
Label3D(Graphics::Renderer *r, RefCountedPtr< Text::DistanceFieldFont >)
Definition: Label3D.cpp:13
void SetText(const std::string &)
Definition: Label3D.cpp:47
virtual const char * GetTypeName() const
Definition: Label3D.h:27
virtual void Render(const matrix4x4f &trans, const RenderData *rd)
Definition: Label3D.cpp:77
virtual Node * Clone(NodeCopyCache *cache=0)
Definition: Label3D.cpp:42
virtual void Accept(NodeVisitor &v)
Definition: Label3D.cpp:87
Definition: NodeCopyCache.h:14
Definition: NodeVisitor.h:26
Definition: Node.h:72
Definition: Background.h:13
Definition: CityOnPlanet.h:23
Definition: Node.h:44