Skip to content

Commit f533df7

Browse files
committed
update transform3d partial updates python snippet
1 parent a653559 commit f533df7

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

docs/snippets/all/archetypes/transform3d_partial_updates.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,17 @@ def truncated_radians(deg: float) -> float:
1717
rr.log(
1818
"box",
1919
rr.Boxes3D(half_sizes=[4.0, 2.0, 1.0], fill_mode=rr.components.FillMode.Solid),
20-
rr.Transform3D(axis_length=10),
20+
rr.Transform3D(clear=False, axis_length=10),
2121
)
2222

2323
for deg in range(46):
2424
step += 1
2525
rr.set_time_sequence("step", step)
2626

2727
rad = truncated_radians(deg * 4)
28-
# TODO(cmc): update_fields
2928
rr.log(
3029
"box",
31-
rr.Transform3D(
30+
rr.Transform3D.update_fields(
3231
# TODO(cmc): we should have access to all the fields of the extended constructor too.
3332
rotation_axis_angle=rr.RotationAxisAngle(axis=[0.0, 1.0, 0.0], radians=rad),
3433
),
@@ -37,30 +36,27 @@ def truncated_radians(deg: float) -> float:
3736
for t in range(51):
3837
step += 1
3938
rr.set_time_sequence("step", step)
40-
# TODO(cmc): update_fields
4139
rr.log(
4240
"box",
43-
rr.Transform3D(translation=[0, 0, t / 10.0]),
41+
rr.Transform3D.update_fields(translation=[0, 0, t / 10.0]),
4442
)
4543

4644
for deg in range(46):
4745
step += 1
4846
rr.set_time_sequence("step", step)
4947

5048
rad = truncated_radians((deg + 45) * 4)
51-
# TODO(cmc): update_fields
5249
rr.log(
5350
"box",
54-
rr.Transform3D(
51+
rr.Transform3D.update_fields(
5552
# TODO(cmc): we should have access to all the fields of the extended constructor too.
5653
rotation_axis_angle=rr.RotationAxisAngle(axis=[0.0, 1.0, 0.0], radians=rad),
5754
),
5855
)
5956

6057
step += 1
6158
rr.set_time_sequence("step", step)
62-
# TODO(cmc): update_fields(clear=True)
6359
rr.log(
6460
"box",
65-
rr.Transform3D(axis_length=15),
61+
rr.Transform3D.update_fields(clear=True, axis_length=15),
6662
)

docs/snippets/snippets.toml

-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ quick_start = [ # These examples don't have exactly the same implementation.
273273
]
274274
"archetypes/transform3d_partial_updates" = [
275275
"cpp", # TODO(cmc): remove once C++ partial updates APIs have shipped
276-
"py", # TODO(cmc): remove once Python partial updates APIs have shipped
277276
]
278277
"archetypes/instance_poses3d_combined" = [ # TODO(#3235): Slight floating point differences in point grid.
279278
"cpp",

0 commit comments

Comments
 (0)