3 #ifndef SCENEVIEW_TEXT_BILLBOARD__
4 #define SCENEVIEW_TEXT_BILLBOARD__
11 #include <sceneview/font_resource.hpp>
12 #include <sceneview/geometry_resource.hpp>
13 #include <sceneview/material_resource.hpp>
14 #include <sceneview/resource_manager.hpp>
15 #include <sceneview/scene.hpp>
19 class TextBillboardDrawable;
61 typedef std::shared_ptr<TextBillboard> Ptr;
67 void SetText(
const QString& text);
79 void SetFont(
const QFont& font);
111 void SetAlignment(HAlignment horizontal, VAlignment vertical);
113 void SetYDirection(YDirection direction);
124 ResourceManager::Ptr resources_;
130 FontResource::Ptr font_resource_;
131 MaterialResource::Ptr bg_material_;
132 GeometryResource::Ptr rect_geom_;
133 MaterialResource::Ptr text_material_;
134 GeometryResource::Ptr text_geom_;
140 YDirection y_dir_ = kNegative;
144 float margin_bottom_;
150 TextBillboardDrawable* bg_drawable_;
151 TextBillboardDrawable* text_drawable_;
152 TextBillboardDrawable* depth_write_drawable_;
157 #endif // SCENEVIEW_TEXT_BILLBOARD__
A scene graph node that can have children.
Definition: group_node.hpp:26
void SetTextColor(const QColor &color)
Sets the foreground text color.
void SetFont(const QFont &font)
Sets the font.
void SetAlignment(HAlignment horizontal, VAlignment vertical)
Sets the text alignment.
Scene node that contains a list of drawable objects.
Definition: draw_node.hpp:26
void SetBackgroundColor(const QColor &color)
Sets the background color.
Widget that draws a scene and manages Renderer and InputHandler objects.
Definition: viewport.hpp:27
A text display that always faces the camera.
Definition: text_billboard.hpp:42
void SetLineHeight(float height)
Control text size by varying nominal line height.