16 std::shared_ptr<Material> _material;
17 std::shared_ptr<MaterialRenderer> _material_renderer;
18 std::shared_ptr<Texture> _texture;
19 std::shared_ptr<Mesh> _mesh;
22 Eigen::Affine3d _parent_pose = Eigen::Affine3d::Identity();
23 bool _view_facing =
true;
25 Eigen::Vector2d _offset = Eigen::Vector2d::Zero();
28 void viewFacing(
bool v) { _view_facing = v; }
29 bool viewFacing()
const {
return _view_facing; }
30 const std::string &text()
const {
return _text; }
31 void text(
const std::string &text) { _text = text; }
32 TextRenderer(
const std::shared_ptr<Material> &material =
nullptr);
35 virtual bool pick(uint32_t
id)
const override;
36 void size(
double s) { _size = s; }
37 double size()
const {
return _size; }
38 void offset(
const Eigen::Vector2d &offset) { _offset = offset; }
39 const Eigen::Vector2d &offset()
const {
return _offset; }
43 std::shared_ptr<TextRenderer> _renderer;
44 std::shared_ptr<Material> _material = std::make_shared<Material>();
47 PROPERTY(std::string, text,
"Text");
49 PROPERTY(
double, opacity, 1.0, min = 0.0, max = 1.0);
50 PROPERTY(
double, size, 0.1, min = 0);
51 PROPERTY(
bool, viewFacing,
true);
52 PROPERTY(Eigen::Vector2d, offset, Eigen::Vector2d::Zero());