46 namespace visualization {
52 namespace visualizer {
58 enum class Shader { STANDARD, UNLIT, NORMALS, DEPTH };
62 std::shared_ptr<geometry::Geometry3D>
geometry;
67 bool is_visible =
true;
70 bool is_color_default =
true;
74 Shader scene_shader = Shader::STANDARD;
75 bool show_settings =
false;
76 bool show_skybox =
false;
77 bool show_axes =
false;
78 bool is_animating =
false;
81 Eigen::Vector4f bg_color = {1.0f, 1.0f, 1.0f, 1.0f};
87 std::string ibl_path =
"";
88 int ibl_intensity = 0;
89 int sun_intensity = 100000;
90 Eigen::Vector3f sun_dir = {0.577f, -0.577f, -0.577f};
91 Eigen::Vector3f sun_color = {1.0f, 1.0f, 1.0f};
93 double current_time = 0.0;
94 double time_step = 1.0;
95 double frame_delay = 0.100;
101 void AddAction(
const std::string&
name,
104 void SetBackground(
const Eigen::Vector4f& bg_color,
105 std::shared_ptr<geometry::Image> bg_image =
nullptr);
107 void SetShader(
Shader shader);
109 void AddGeometry(
const std::string& name,
110 std::shared_ptr<geometry::Geometry3D> geom,
112 const std::string& group =
"",
114 bool is_visible =
true);
116 void AddGeometry(
const std::string& name,
117 std::shared_ptr<t::geometry::Geometry> tgeom,
119 const std::string& group =
"",
121 bool is_visible =
true);
123 void RemoveGeometry(
const std::string& name);
125 void ShowGeometry(
const std::string& name,
bool show);
127 DrawObject GetGeometry(
const std::string& name)
const;
129 void SetupCamera(
float fov,
130 const Eigen::Vector3f& center,
131 const Eigen::Vector3f& eye,
132 const Eigen::Vector3f& up);
133 void ResetCameraToDefault();
135 void ShowSettings(
bool show);
136 void ShowSkybox(
bool show);
137 void ShowAxes(
bool show);
138 void SetPointSize(
int point_size);
139 void SetLineWidth(
int line_width);
140 void EnableGroup(
const std::string& group,
bool enable);
142 std::vector<O3DVisualizerSelections::SelectionSet> GetSelectionSets()
const;
144 double GetAnimationFrameDelay()
const;
145 void SetAnimationFrameDelay(
double secs);
147 double GetAnimationTimeStep()
const;
148 void SetAnimationTimeStep(
double time_step);
150 double GetAnimationDuration()
const;
151 void SetAnimationDuration(
double sec);
153 double GetCurrentTime()
const;
154 void SetCurrentTime(
double t);
156 bool GetIsAnimating()
const;
157 void SetAnimating(
bool is_animating);
159 void SetOnAnimationFrame(std::function<
void(
O3DVisualizer&,
double)> cb);
162 void SetOnAnimationTick(
165 void ExportCurrentImage(
const std::string& path);
171 void StartRPCInterface(
const std::string& address,
int timeout);
173 void StopRPCInterface();
180 std::unique_ptr<Impl> impl_;
Definition: Open3DScene.h:55
Definition: O3DVisualizer.cpp:291
std::string name
Definition: O3DVisualizer.h:61
Definition: O3DVisualizer.h:54
Definition: O3DVisualizer.h:73
std::shared_ptr< t::geometry::Geometry > tgeometry
Definition: O3DVisualizer.h:63
Shader
Definition: O3DVisualizer.h:58
rendering::Material material
Definition: O3DVisualizer.h:64
std::string group
Definition: O3DVisualizer.h:65
Definition: O3DVisualizer.h:60
std::set< std::string > enabled_groups
Definition: O3DVisualizer.h:79
Definition: Material.h:41
Definition: PinholeCameraIntrinsic.cpp:35
TickResult
Definition: O3DVisualizer.h:161
std::string name
Definition: FilePCD.cpp:58
int height
Definition: FilePCD.cpp:72
std::shared_ptr< geometry::Geometry3D > geometry
Definition: O3DVisualizer.h:62
int width
Definition: FilePCD.cpp:71