Primitives
To learn what Primitives are, check the concept page on Entities and Components.
In Python every Primitive is typically backed by one or more function calls. In contrast, the Rust API works by adding components explicitly. This is more flexible & extendable but also requires a rough understanding of which components the Viewer can interpret together as documented below.
Spatial Primitives
Arrow 3D
- Python: log_arrow
- Rust (primary): Arrow3D
- Primary component:
arrow3d
- Secondary components:
colorrgba
,radius
,label
Rectangle 2D
- Python: log_rect, log_rects
- Rust (primary): Rect2D
- Primary component:
rect2d
, - Secondary components:
colorrgba
,radius
,label
,classid
Box 3D
- Python: log_obb
- Rust (primary): Box3D
- Primary component:
box3d
, - Secondary components:
vec3d
,quaternion
,colorrgba
,radius
,label
,classid
Line 2D
- Python: log_line_strip , log_line_segments
- Rust (primary): LineStrip2D
- Primary component:
linestrip2d
- Secondary components:
colorrgba
,radius
Line 3D
- Python: log_line_strip, log_line_segments
- Rust (primary): LineStrip3D
- Primary component:
linestrip3d
- Secondary components:
colorrgba
,radius
Mesh
- Python: log_mesh, log_meshes, log_mesh_file
- Rust (primary): Mesh3D
- Primary component:
mesh3d
- Secondary components:
colorrgba
Point 2D
- Python: log_point, log_points
- Rust (primary): Point2D
- Primary component:
point2d
- Secondary components:
colorrgba
,radius
,label
,classid
,keypointid
Point 3D
- Python: log_point, log_points
- Rust (primary): Point3D
- Primary component:
point3d
- Secondary components:
colorrgba
,radius
,label
,classid
,keypointid
Transform
- Python: log_rigid3, log_pinhole
- Rust (primary): Transform
- Primary component:
transform
Tensors & Images
- Python: log_tensor, log_image, log_image_file, log_depth_image, log_segmentation_image
- Rust (primary): Tensor
- Primary component:
tensor
- Secondary components:
colorrgba
colorrgba
is currently only supported for images,
i.e. tensors with 2 dimensions and an optional 3rd that can be interpreted as color channels.
Furthermore, only the spatial Space View is able to use the color component.
Plots
Scalar
- Python: log_scalar
- Rust (primary): Scalar
- Primary component:
scalar
- Secondary components:
scalar_plot_props
,colorrgba
,radius
,label
Text
Text Entry
- Python: log_text_entry
- Rust (primary): TextEntry
- Primary component:
text_entry
- Secondary components:
colorrgba