Skip to content

Commit 4143100

Browse files
committed
add transform forest snapshot tests
1 parent dccf0af commit 4143100

9 files changed

+1880
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9568,6 +9568,7 @@ dependencies = [
95689568
"ahash",
95699569
"bitflags 2.9.4",
95709570
"glam",
9571+
"insta",
95719572
"itertools 0.14.0",
95729573
"nohash-hasher",
95739574
"re_chunk_store",

crates/store/re_tf/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ itertools.workspace = true
3434
nohash-hasher.workspace = true
3535
thiserror.workspace = true
3636
vec1 = { workspace = true, features = ["smallvec-v1"] }
37+
38+
[dev-dependencies]
39+
insta.workspace = true
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
source: crates/store/re_tf/src/transform_forest.rs
3+
expression: "pretty_print_enity_path_hashes_in(transform_forest.root_info(EntityPath::from(\"top/pinhole\").hash()),\n&all_entity_paths)"
4+
---
5+
Some(
6+
Pinhole(
7+
PinholeTreeRoot {
8+
parent_tree_root: /,
9+
pinhole_projection: ResolvedPinholeProjection {
10+
image_from_camera: PinholeProjection(
11+
Mat3x3(
12+
[
13+
1.0,
14+
0.0,
15+
0.0,
16+
0.0,
17+
2.0,
18+
0.0,
19+
50.0,
20+
100.0,
21+
1.0,
22+
],
23+
),
24+
),
25+
resolution: Some(
26+
Resolution(
27+
Vec2D(
28+
[
29+
100.0,
30+
200.0,
31+
],
32+
),
33+
),
34+
),
35+
view_coordinates: ViewCoordinates(
36+
ViewCoordinates(
37+
[
38+
3,
39+
2,
40+
5,
41+
],
42+
),
43+
),
44+
},
45+
parent_root_from_pinhole_root: Affine3A {
46+
matrix3: Mat3A {
47+
x_axis: Vec3A(
48+
1.0,
49+
0.0,
50+
0.0,
51+
),
52+
y_axis: Vec3A(
53+
0.0,
54+
1.0,
55+
0.0,
56+
),
57+
z_axis: Vec3A(
58+
0.0,
59+
0.0,
60+
1.0,
61+
),
62+
},
63+
translation: Vec3A(
64+
1.0,
65+
1.0,
66+
0.0,
67+
),
68+
},
69+
},
70+
),
71+
)

0 commit comments

Comments
 (0)