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:2491
void SetGroundPlane(rendering::Scene::GroundPlane plane)
Definition: O3DVisualizer.cpp:2425
void ShowGeometry(const std::string &name, bool show)
Show/hide the named geometry.
Definition: O3DVisualizer.cpp:2392
void ModifyGeometryMaterial(const std::string &name, const rendering::MaterialRecord *material)
Definition: O3DVisualizer.cpp:2406
void SetShader(Shader shader)
Definition: O3DVisualizer.cpp:2341
std::vector< O3DVisualizerSelections::SelectionSet > GetSelectionSets() const
Definition: O3DVisualizer.cpp:2454
void SetMouseMode(gui::SceneWidget::Controls mode)
Definition: O3DVisualizer.cpp:2445
void SetupCamera(float fov, const Eigen::Vector3f ¢er, const Eigen::Vector3f &eye, const Eigen::Vector3f &up)
Definition: O3DVisualizer.cpp:2499
void SetAnimationTimeStep(double time_step)
Definition: O3DVisualizer.cpp:2470
TickResult
Definition: O3DVisualizer.h:198
O3DVisualizer(const std::string &title, int width, int height)
Definition: O3DVisualizer.cpp:2222
void ExportCurrentImage(const std::string &path)
Definition: O3DVisualizer.cpp:2541
void Add3DLabel(const Eigen::Vector3f &pos, const char *text)
Adds a label with text text at the 3D position pos.
Definition: O3DVisualizer.cpp:2376
void EnableBasicMode(bool enable)
Definition: O3DVisualizer.cpp:2429
void SetCurrentTime(double t)
Definition: O3DVisualizer.cpp:2489
double GetCurrentTime() const
Definition: O3DVisualizer.cpp:2485
void SetIBLIntensity(float intensity)
Definition: O3DVisualizer.cpp:2417
void SetBackground(const Eigen::Vector4f &bg_color, std::shared_ptr< geometry::Image > bg_image=nullptr)
Definition: O3DVisualizer.cpp:2335
void SetAnimationFrameDelay(double secs)
Definition: O3DVisualizer.cpp:2462
void EnableGroup(const std::string &group, bool enable)
Definition: O3DVisualizer.cpp:2449
double GetAnimationDuration() const
Definition: O3DVisualizer.cpp:2475
void ShowSkybox(bool show)
Definition: O3DVisualizer.cpp:2413
void Layout(const gui::LayoutContext &context)
Definition: O3DVisualizer.cpp:2545
void SetIBL(const std::string &path)
Definition: O3DVisualizer.cpp:2415
Shader
Definition: O3DVisualizer.h:42
void StopRPCInterface()
Definition: O3DVisualizer.cpp:2302
rendering::Open3DScene * GetScene() const
Definition: O3DVisualizer.cpp:2286
void SetOnAnimationTick(std::function< TickResult(O3DVisualizer &, double, double)> cb)
Definition: O3DVisualizer.cpp:2536
void ShowGround(bool show)
Definition: O3DVisualizer.cpp:2423
DrawObject GetGeometry(const std::string &name) const
Returns Visualizer's internal DrawObject for the named geometry.
Definition: O3DVisualizer.cpp:2396
void ShowAxes(bool show)
Definition: O3DVisualizer.cpp:2421
virtual ~O3DVisualizer()
Definition: O3DVisualizer.cpp:2284
void EnableWireframeMode(bool enable)
Definition: O3DVisualizer.cpp:2433
void SetAnimationDuration(double sec)
Definition: O3DVisualizer.cpp:2479
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:2343
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:2290
void SetLineWidth(int line_width)
Definition: O3DVisualizer.cpp:2441
void AddAction(const std::string &name, std::function< void(O3DVisualizer &)> callback)
Definition: O3DVisualizer.cpp:2309
UIState GetUIState() const
Definition: O3DVisualizer.cpp:2523
rendering::MaterialRecord GetGeometryMaterial(const std::string &name) const
Definition: O3DVisualizer.cpp:2401
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:2382
void SetPointSize(int point_size)
Definition: O3DVisualizer.cpp:2437
void ShowSettings(bool show)
Definition: O3DVisualizer.cpp:2411
double GetAnimationFrameDelay() const
Definition: O3DVisualizer.cpp:2458
void SetAnimating(bool is_animating)
Definition: O3DVisualizer.cpp:2495
void SetOnAnimationFrame(std::function< void(O3DVisualizer &, double)> cb)
Definition: O3DVisualizer.cpp:2527
void Clear3DLabels()
Clears all 3D labels created with Add3DLabel
Definition: O3DVisualizer.cpp:2380
double GetAnimationTimeStep() const
Definition: O3DVisualizer.cpp:2466
void ResetCameraToDefault()
Definition: O3DVisualizer.cpp:2519
void RemoveGeometry(const std::string &name)
Removes the named geometry from the Visualizer.
Definition: O3DVisualizer.cpp:2388
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