Open3D (C++ API)  0.19.0
Data Fields
open3d::visualization::DrawConfig Struct Reference

#include <Draw.h>

Data Fields

std::optional< Eigen::Vector3f > lookat
 
std::optional< Eigen::Vector3f > eye
 Camera location. Use with lookat and up. More...
 
std::optional< Eigen::Vector3f > up
 Camera up direction. Use with lookat and eye. More...
 
float field_of_view = 60.0f
 Camera horizontal field of view in degrees. Default: 60.0. More...
 
std::optional< Eigen::Matrix3d > intrinsic_matrix
 
std::optional< Eigen::Matrix4d > extrinsic_matrix
 
std::optional< Eigen::Vector4f > bg_color
 
std::shared_ptr< geometry::Imagebg_image
 Background image. If specified, overrides bg_color. More...
 
std::optional< std::string > ibl
 
std::optional< float > ibl_intensity
 IBL intensity multiplier. Default: 1.0. More...
 
std::optional< bool > show_skybox
 Show skybox as scene background. Default: false. More...
 
std::optional< bool > show_ui
 
std::optional< bool > show_axes
 Show world-space axes at the scene origin. Default: false. More...
 
std::optional< bool > raw_mode
 Use raw mode for simpler rendering of basic geometry. Default: false. More...
 
std::optional< float > near_plane
 
std::optional< float > far_plane
 
std::optional< int > point_size
 3D point size (pixel count). Default: 3. More...
 
std::optional< int > line_width
 3D line width (pixel count). Default: 2. More...
 
double animation_time_step = 1.0
 
std::optional< double > animation_duration
 
std::string rpc_interface
 
std::function< void(visualizer::O3DVisualizer &)> on_init
 
std::function< void(visualizer::O3DVisualizer &, double)> on_animation_frame
 
std::function< visualizer::O3DVisualizer::TickResult(visualizer::O3DVisualizer &, double, double)> on_animation_tick
 
bool non_blocking_and_return_uid = false
 

Detailed Description

Configuration for advanced Draw parameters.

DrawConfig provides optional parameters for customizing the visualization, matching the draw.py API. The initial view may be specified either as a combination of (lookat, eye, up, and field_of_view) or (intrinsic_matrix, extrinsic_matrix) pair. A simple pinhole camera model is used.

Example:

DrawConfig config;
config.eye = Eigen::Vector3d(0, 0, 5);
config.lookat = Eigen::Vector3d(0, 0, 0);
config.up = Eigen::Vector3d(0, 1, 0);
config.field_of_view = 60.0f;
config.bg_color = Eigen::Vector4f(1.0f, 1.0f, 1.0f, 1.0f); // white

Field Documentation

◆ animation_duration

std::optional<double> open3d::visualization::DrawConfig::animation_duration

Total animation duration in seconds. If not specified, animation runs indefinitely.

◆ animation_time_step

double open3d::visualization::DrawConfig::animation_time_step = 1.0

Parameters

Duration in seconds for each animation frame. Default: 1.0.

◆ bg_color

std::optional<Eigen::Vector4f> open3d::visualization::DrawConfig::bg_color

and Rendering

Background color as RGBA float with range [0,1]. Default: white.

◆ bg_image

std::shared_ptr<geometry::Image> open3d::visualization::DrawConfig::bg_image

Background image. If specified, overrides bg_color.

◆ extrinsic_matrix

std::optional<Eigen::Matrix4d> open3d::visualization::DrawConfig::extrinsic_matrix

Camera extrinsic matrix (4x4) for world-to-camera transformation. Use with intrinsic_matrix instead of lookat/eye/up.

◆ eye

std::optional<Eigen::Vector3f> open3d::visualization::DrawConfig::eye

Camera location. Use with lookat and up.

◆ far_plane

std::optional<float> open3d::visualization::DrawConfig::far_plane

Far clip distance (world units). Must be greater than near_plane. Default: auto.

◆ field_of_view

float open3d::visualization::DrawConfig::field_of_view = 60.0f

Camera horizontal field of view in degrees. Default: 60.0.

◆ ibl

std::optional<std::string> open3d::visualization::DrawConfig::ibl

and Environment

Path to environment map for image-based lighting (IBL).

◆ ibl_intensity

std::optional<float> open3d::visualization::DrawConfig::ibl_intensity

IBL intensity multiplier. Default: 1.0.

◆ intrinsic_matrix

std::optional<Eigen::Matrix3d> open3d::visualization::DrawConfig::intrinsic_matrix

Camera intrinsic matrix (3x3). Use with extrinsic_matrix instead of lookat/eye/up.

◆ line_width

std::optional<int> open3d::visualization::DrawConfig::line_width

3D line width (pixel count). Default: 2.

◆ lookat

std::optional<Eigen::Vector3f> open3d::visualization::DrawConfig::lookat

Setup

Camera principal axis direction (lookat point). Use with eye and up.

◆ near_plane

std::optional<float> open3d::visualization::DrawConfig::near_plane

Setup

Near clip distance (world units). If set, overrides the value chosen by ResetCameraToDefault(). Must be positive. Default: auto.

◆ non_blocking_and_return_uid

bool open3d::visualization::DrawConfig::non_blocking_and_return_uid = false

Mode

If true, do not block waiting for window close. Instead, return the window ID. Useful for embedding the visualizer. Default: false.

◆ on_animation_frame

std::function<void(visualizer::O3DVisualizer &, double)> open3d::visualization::DrawConfig::on_animation_frame

Optional callback invoked for each animation frame update. Signature: void(O3DVisualizer&, double time)

◆ on_animation_tick

std::function<visualizer::O3DVisualizer::TickResult( visualizer::O3DVisualizer &, double, double)> open3d::visualization::DrawConfig::on_animation_tick

Optional callback invoked for each animation time step. Signature: TickResult(O3DVisualizer&, double tick_duration, double time) Return TickResult::REDRAW to trigger scene redraw, or TickResult::NO_CHANGE if redraw is not needed.

◆ on_init

std::function<void(visualizer::O3DVisualizer &)> open3d::visualization::DrawConfig::on_init

Callbacks

Optional callback for extra initialization of the GUI window. Signature: void(O3DVisualizer&)

◆ point_size

std::optional<int> open3d::visualization::DrawConfig::point_size

3D point size (pixel count). Default: 3.

◆ raw_mode

std::optional<bool> open3d::visualization::DrawConfig::raw_mode

Use raw mode for simpler rendering of basic geometry. Default: false.

◆ rpc_interface

std::string open3d::visualization::DrawConfig::rpc_interface

Interface

RPC interface address string (e.g., "tcp://localhost:51454"). Empty string disables RPC interface. Default: empty.

◆ show_axes

std::optional<bool> open3d::visualization::DrawConfig::show_axes

Show world-space axes at the scene origin. Default: false.

◆ show_skybox

std::optional<bool> open3d::visualization::DrawConfig::show_skybox

Show skybox as scene background. Default: false.

◆ show_ui

std::optional<bool> open3d::visualization::DrawConfig::show_ui

and Rendering Modes

Show settings user interface (can be toggled from Actions menu). Default: false.

◆ up

std::optional<Eigen::Vector3f> open3d::visualization::DrawConfig::up

Camera up direction. Use with lookat and eye.


The documentation for this struct was generated from the following file: