Open3D (C++ API)
0.19.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
open3d
visualization
gui
Label3D.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - Open3D: www.open3d.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2024 www.open3d.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#pragma once
9
10
#include <memory>
11
12
#include "
open3d/visualization/gui/Color.h
"
13
namespace
open3d
{
14
namespace
visualization
{
15
namespace
gui
{
16
17
// Label3D is a helper class for labels (like UI Labels) at 3D points as opposed
18
// to screen points. It is NOT a UI widget but is instead used via Open3DScene
19
// class. See Open3DScene::AddLabel/RemoveLabel.
20
class
Label3D
{
21
public
:
23
explicit
Label3D
(
const
Eigen::Vector3f& pos,
const
char
* text =
nullptr
);
24
~Label3D
();
25
26
const
char
*
GetText
()
const
;
28
void
SetText
(
const
char
* text);
29
30
Eigen::Vector3f
GetPosition
()
const
;
31
void
SetPosition
(
const
Eigen::Vector3f& pos);
32
34
Color
GetTextColor
()
const
;
35
37
void
SetTextColor
(
const
Color
& color);
38
40
float
GetTextScale
()
const
;
41
45
void
SetTextScale
(
float
scale);
46
47
private
:
48
struct
Impl
;
49
std::unique_ptr<Impl> impl_;
50
};
51
52
}
// namespace gui
53
}
// namespace visualization
54
}
// namespace open3d
Color.h
open3d::visualization::gui::Color
Definition
Color.h:16
open3d::visualization::gui::Label3D::GetTextColor
Color GetTextColor() const
Returns the color with which the text will be drawn.
Definition
Label3D.cpp:45
open3d::visualization::gui::Label3D::GetText
const char * GetText() const
Definition
Label3D.cpp:35
open3d::visualization::gui::Label3D::Label3D
Label3D(const Eigen::Vector3f &pos, const char *text=nullptr)
Copies text.
Definition
Label3D.cpp:25
open3d::visualization::gui::Label3D::GetTextScale
float GetTextScale() const
Get the current scale. See not below on meaning of scale.
Definition
Label3D.cpp:49
open3d::visualization::gui::Label3D::~Label3D
~Label3D()
Definition
Label3D.cpp:33
open3d::visualization::gui::Label3D::SetPosition
void SetPosition(const Eigen::Vector3f &pos)
Definition
Label3D.cpp:41
open3d::visualization::gui::Label3D::SetTextScale
void SetTextScale(float scale)
Definition
Label3D.cpp:51
open3d::visualization::gui::Label3D::GetPosition
Eigen::Vector3f GetPosition() const
Definition
Label3D.cpp:39
open3d::visualization::gui::Label3D::SetTextColor
void SetTextColor(const Color &color)
Set the color with which the text will be drawn.
Definition
Label3D.cpp:47
open3d::visualization::gui::Label3D::SetText
void SetText(const char *text)
Sets the text of the label (copies text).
Definition
Label3D.cpp:37
open3d::visualization::gui
Definition
Application.cpp:55
open3d::visualization
Definition
ModelIO.h:14
open3d
Definition
PinholeCameraIntrinsic.cpp:16
open3d::visualization::gui::Label3D::Impl
Definition
Label3D.cpp:18
Generated by
1.17.0