Skip to content

Boxes3DVisualizer does not account for rotations when computing bounding boxes #6973

@kpreid

Description

@kpreid

Describe the bug

The visualizer ignores the rotations component when computing the bounding box of the batch of boxes.

let centers = clamped_or(data.centers, &Position3D::ZERO);
let rotations = clamped_or(data.rotations, &Rotation3D::IDENTITY);
for (i, (half_size, &center, rotation, radius, &color)) in
itertools::izip!(data.half_sizes, centers, rotations, radii, &colors).enumerate()
{
obj_space_bounding_box.extend(half_size.box_min(center));
obj_space_bounding_box.extend(half_size.box_max(center));

To Reproduce

  1. Open an example with rotated boxes, such as cargo run --bin snippets -- box3d_batch
  2. Click on “Show bounding box”
  3. Observe the boxes escaping the box.

Screenshots

Rerun version
Commit 05853c6

Metadata

Metadata

Assignees

Labels

heuristicsHeuristics for placing views, fallback provider, etc.📺 re_vieweraffects re_viewer itself🪳 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions