29 namespace visualization {
33 struct TriangleMeshModel;
36 namespace visualizer {
46 std::shared_ptr<geometry::Geometry3D>
geometry;
48 std::shared_ptr<rendering::TriangleMeshModel>
model;
60 gui::SceneWidget::Controls::ROTATE_CAMERA;
71 Eigen::Vector4f
bg_color = {1.0f, 1.0f, 1.0f, 1.0f};
81 Eigen::Vector3f
sun_dir = {0.577f, -0.577f, -0.577f};
96 std::shared_ptr<geometry::Image> bg_image =
nullptr);
102 std::shared_ptr<geometry::Geometry3D> geom,
104 const std::string& group =
"",
106 bool is_visible =
true);
111 std::shared_ptr<t::geometry::Geometry> tgeom,
113 const std::string& group =
"",
115 bool is_visible =
true);
119 std::shared_ptr<rendering::TriangleMeshModel> tgeom,
121 const std::string& group =
"",
123 bool is_visible =
true);
131 std::shared_ptr<t::geometry::Geometry> tgeom,
140 const std::string&
name)
const;
146 void Add3DLabel(
const Eigen::Vector3f& pos,
const char* text);
152 const Eigen::Vector3f& center,
153 const Eigen::Vector3f& eye,
154 const Eigen::Vector3f& up);
156 const Eigen::Matrix4d& extrinsic);
158 const Eigen::Matrix4d& extrinsic,
159 int intrinsic_width_px,
160 int intrinsic_height_px);
166 void SetIBL(
const std::string& path);
176 void EnableGroup(
const std::string& group,
bool enable);
179 std::vector<O3DVisualizerSelections::SelectionSet>
GetSelectionSets()
const;
217 std::unique_ptr<Impl> impl_;
std::function< void(std::shared_ptr< core::Tensor >)> callback
Definition: FilamentRenderer.cpp:182
ImGuiContext * context
Definition: Window.cpp:76
Contains the pinhole camera intrinsic parameters.
Definition: PinholeCameraIntrinsic.h:32
Definition: Open3DScene.h:38
GroundPlane
Definition: Scene.h:181
Definition: O3DVisualizer.h:38
bool GetIsAnimating() const
Definition: O3DVisualizer.cpp:2470
void SetGroundPlane(rendering::Scene::GroundPlane plane)
Definition: O3DVisualizer.cpp:2404
void ShowGeometry(const std::string &name, bool show)
Show/hide the named geometry.
Definition: O3DVisualizer.cpp:2371
void ModifyGeometryMaterial(const std::string &name, const rendering::MaterialRecord *material)
Definition: O3DVisualizer.cpp:2385
void SetShader(Shader shader)
Definition: O3DVisualizer.cpp:2320
std::vector< O3DVisualizerSelections::SelectionSet > GetSelectionSets() const
Definition: O3DVisualizer.cpp:2433
void SetMouseMode(gui::SceneWidget::Controls mode)
Definition: O3DVisualizer.cpp:2424
void SetupCamera(float fov, const Eigen::Vector3f ¢er, const Eigen::Vector3f &eye, const Eigen::Vector3f &up)
Definition: O3DVisualizer.cpp:2478
void SetAnimationTimeStep(double time_step)
Definition: O3DVisualizer.cpp:2449
TickResult
Definition: O3DVisualizer.h:198
O3DVisualizer(const std::string &title, int width, int height)
Definition: O3DVisualizer.cpp:2201
void ExportCurrentImage(const std::string &path)
Definition: O3DVisualizer.cpp:2520
void Add3DLabel(const Eigen::Vector3f &pos, const char *text)
Adds a label with text text at the 3D position pos.
Definition: O3DVisualizer.cpp:2355
void EnableBasicMode(bool enable)
Definition: O3DVisualizer.cpp:2408
void SetCurrentTime(double t)
Definition: O3DVisualizer.cpp:2468
double GetCurrentTime() const
Definition: O3DVisualizer.cpp:2464
void SetIBLIntensity(float intensity)
Definition: O3DVisualizer.cpp:2396
void SetBackground(const Eigen::Vector4f &bg_color, std::shared_ptr< geometry::Image > bg_image=nullptr)
Definition: O3DVisualizer.cpp:2314
void SetAnimationFrameDelay(double secs)
Definition: O3DVisualizer.cpp:2441
void EnableGroup(const std::string &group, bool enable)
Definition: O3DVisualizer.cpp:2428
double GetAnimationDuration() const
Definition: O3DVisualizer.cpp:2454
void ShowSkybox(bool show)
Definition: O3DVisualizer.cpp:2392
void Layout(const gui::LayoutContext &context)
Definition: O3DVisualizer.cpp:2524
void SetIBL(const std::string &path)
Definition: O3DVisualizer.cpp:2394
Shader
Definition: O3DVisualizer.h:42
void StopRPCInterface()
Definition: O3DVisualizer.cpp:2281
rendering::Open3DScene * GetScene() const
Definition: O3DVisualizer.cpp:2265
void SetOnAnimationTick(std::function< TickResult(O3DVisualizer &, double, double)> cb)
Definition: O3DVisualizer.cpp:2515
void ShowGround(bool show)
Definition: O3DVisualizer.cpp:2402
DrawObject GetGeometry(const std::string &name) const
Returns Visualizer's internal DrawObject for the named geometry.
Definition: O3DVisualizer.cpp:2375
void ShowAxes(bool show)
Definition: O3DVisualizer.cpp:2400
virtual ~O3DVisualizer()
Definition: O3DVisualizer.cpp:2263
void EnableWireframeMode(bool enable)
Definition: O3DVisualizer.cpp:2412
void SetAnimationDuration(double sec)
Definition: O3DVisualizer.cpp:2458
void AddGeometry(const std::string &name, std::shared_ptr< geometry::Geometry3D > geom, const rendering::MaterialRecord *material=nullptr, const std::string &group="", double time=0.0, bool is_visible=true)
Adds a legacy geometry to the Visualizer.
Definition: O3DVisualizer.cpp:2322
void EnableSunFollowsCamera(bool enable)
void StartRPCInterface(const std::string &address, int timeout)
Starts the RPC interface. See io/rpc/ZMQReceiver for the parameters.
Definition: O3DVisualizer.cpp:2269
void SetLineWidth(int line_width)
Definition: O3DVisualizer.cpp:2420
void AddAction(const std::string &name, std::function< void(O3DVisualizer &)> callback)
Definition: O3DVisualizer.cpp:2288
UIState GetUIState() const
Definition: O3DVisualizer.cpp:2502
rendering::MaterialRecord GetGeometryMaterial(const std::string &name) const
Definition: O3DVisualizer.cpp:2380
void AddGeometry(const std::string &name, std::shared_ptr< rendering::TriangleMeshModel > tgeom, const rendering::MaterialRecord *material=nullptr, const std::string &group="", double time=0.0, bool is_visible=true)
Adds a triangle mesh model to the Visualizer.
void UpdateGeometry(const std::string &name, std::shared_ptr< t::geometry::Geometry > tgeom, uint32_t update_flags)
Definition: O3DVisualizer.cpp:2361
void SetPointSize(int point_size)
Definition: O3DVisualizer.cpp:2416
void ShowSettings(bool show)
Definition: O3DVisualizer.cpp:2390
double GetAnimationFrameDelay() const
Definition: O3DVisualizer.cpp:2437
void SetAnimating(bool is_animating)
Definition: O3DVisualizer.cpp:2474
void SetOnAnimationFrame(std::function< void(O3DVisualizer &, double)> cb)
Definition: O3DVisualizer.cpp:2506
void Clear3DLabels()
Clears all 3D labels created with Add3DLabel
Definition: O3DVisualizer.cpp:2359
double GetAnimationTimeStep() const
Definition: O3DVisualizer.cpp:2445
void ResetCameraToDefault()
Definition: O3DVisualizer.cpp:2498
void RemoveGeometry(const std::string &name)
Removes the named geometry from the Visualizer.
Definition: O3DVisualizer.cpp:2367
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t timeout_in_ms capture_handle capture_handle capture_handle image_handle temperature_c k4a_image_t image_handle uint8_t image_handle image_handle image_handle image_handle uint32_t
Definition: K4aPlugin.cpp:548
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t timeout_in_ms capture_handle capture_handle capture_handle image_handle temperature_c k4a_image_t image_handle uint8_t image_handle image_handle image_handle image_handle image_handle timestamp_usec white_balance image_handle k4a_device_configuration_t config device_handle char size_t serial_number_size bool int32_t int32_t int32_t int32_t k4a_color_control_mode_t default_mode mode
Definition: K4aPlugin.cpp:678
Definition: PinholeCameraIntrinsic.cpp:16
Definition: MaterialRecord.h:22
Definition: O3DVisualizer.h:44
bool is_color_default
Definition: O3DVisualizer.h:55
std::string name
Definition: O3DVisualizer.h:45
std::shared_ptr< t::geometry::Geometry > tgeometry
Definition: O3DVisualizer.h:47
rendering::MaterialRecord material
Definition: O3DVisualizer.h:49
double time
Definition: O3DVisualizer.h:51
std::shared_ptr< geometry::Geometry3D > geometry
Definition: O3DVisualizer.h:46
std::shared_ptr< rendering::TriangleMeshModel > model
Definition: O3DVisualizer.h:48
std::string group
Definition: O3DVisualizer.h:50
bool is_visible
Definition: O3DVisualizer.h:52
Definition: O3DVisualizer.h:58
double frame_delay
Definition: O3DVisualizer.h:86
bool show_settings
Definition: O3DVisualizer.h:62
Eigen::Vector3f sun_color
Definition: O3DVisualizer.h:82
gui::SceneWidget::Controls mouse_mode
Definition: O3DVisualizer.h:59
bool show_skybox
Definition: O3DVisualizer.h:63
bool is_animating
Definition: O3DVisualizer.h:68
bool show_ground
Definition: O3DVisualizer.h:65
bool use_sun
Definition: O3DVisualizer.h:76
std::set< std::string > enabled_groups
Definition: O3DVisualizer.h:69
bool use_ibl
Definition: O3DVisualizer.h:75
Eigen::Vector3f sun_dir
Definition: O3DVisualizer.h:81
int point_size
Definition: O3DVisualizer.h:72
bool show_axes
Definition: O3DVisualizer.h:64
int sun_intensity
Definition: O3DVisualizer.h:80
double time_step
Definition: O3DVisualizer.h:85
Eigen::Vector4f bg_color
Definition: O3DVisualizer.h:71
int ibl_intensity
Definition: O3DVisualizer.h:79
Shader scene_shader
Definition: O3DVisualizer.h:61
rendering::Scene::GroundPlane ground_plane
Definition: O3DVisualizer.h:66
int line_width
Definition: O3DVisualizer.h:73
bool sun_follows_camera
Definition: O3DVisualizer.h:77
double current_time
Definition: O3DVisualizer.h:84
std::string ibl_path
Definition: O3DVisualizer.h:78