Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding DefaultCamera to Spatial3D view #8211

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
namespace rerun.blueprint.archetypes;


/// Defines a default camera view.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should explain more what this is: When is the default camera set, what happens when there is none.

table DefaultCamera (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe more like

Suggested change
table DefaultCamera (
table DefaultEyeCameraPose (

The problem with camera is that...

  • it gets confused with logged pinhole cameras a lot which is why we just call it eye in the implementation
    • eye alone though is probably even more confusing
  • this is not a full camera specification but just where it is. Later we'll have to add more things like camera controls (orbit vs ego vs future stuff) etc. which is then the "full specification" which will have a lot more fields

"attr.docs.category": "Spatial 3D",
"attr.docs.view_types": "Spatial3DView, Spatial2DView: if logged above active projection",
Comment on lines +6 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"attr.docs.category": "Spatial 3D",
"attr.docs.view_types": "Spatial3DView, Spatial2DView: if logged above active projection",

We don't use those on property archetypes so far. (also the 2D space view part is obv. wrong)

"attr.rust.derive": "Copy, PartialEq",
"attr.rerun.scope": "blueprint"
) {
/// Origin of the camera view.
origin: rerun.blueprint.components.CameraOrigin ("attr.rerun.component_optional", nullable, order: 1100);

/// Target of the camera view.
target: rerun.blueprint.components.CameraTarget ("attr.rerun.component_optional", nullable, order: 1200);
Comment on lines +11 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should describe what happens if only one of those is set each

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace rerun.blueprint.components;


/// Origin of a camera.
struct CameraOrigin (
"attr.rust.derive": "PartialEq, Copy",
"attr.rust.repr": "transparent",
"attr.rerun.scope": "blueprint"
) {
/// Position of the camera origin.
pos: rerun.datatypes.Vec3D (order: 100);
}


/// Target of a camera.
struct CameraTarget (
"attr.rust.derive": "PartialEq, Copy",
"attr.rust.repr": "transparent",
"attr.rerun.scope": "blueprint"
) {
/// Position of the camera target.
pos: rerun.datatypes.Vec3D (order: 100);
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ table Spatial3DView (
/// If not specified, the default is to show the latest state of each component.
/// If a timeline is specified more than once, the first entry will be used.
time_ranges: rerun.blueprint.archetypes.VisibleTimeRanges (order: 10000);

/// Configures the default camera position of the 3D view.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar as above, should clarify a little bit more what that means

default_camera: rerun.blueprint.archetypes.DefaultCamera (order: 20000);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

198 changes: 198 additions & 0 deletions crates/store/re_types/src/blueprint/archetypes/default_camera.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/store/re_types/src/blueprint/archetypes/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/store/re_types/src/blueprint/components/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading