diff --git a/crates/re_types/source_hash.txt b/crates/re_types/source_hash.txt index a19b131417a0..d4bcb2884b55 100644 --- a/crates/re_types/source_hash.txt +++ b/crates/re_types/source_hash.txt @@ -1,4 +1,4 @@ # This is a sha256 hash for all direct and indirect dependencies of this crate's build script. # It can be safely removed at anytime to force the build script to run again. # Check out build.rs to see how it's computed. -c1035773b907fbad5b925f086e0822586bb0c3e75a86465d955623de9f7c3ad3 +6f8f25bbe0900f90a47718d6993eaf116ba1e7ac8b59762162bbfe633b5a7e50 diff --git a/crates/re_types/src/archetypes/transform3d.rs b/crates/re_types/src/archetypes/transform3d.rs index 95c0138f3e21..fa5c1caef294 100644 --- a/crates/re_types/src/archetypes/transform3d.rs +++ b/crates/re_types/src/archetypes/transform3d.rs @@ -23,7 +23,7 @@ /// use rerun::{ /// archetypes::{Arrows3D, Transform3D}, /// datatypes::{ -/// Angle, Mat3x3, RotationAxisAngle, Scale3D, TranslationAndMat3x3, TranslationRotationScale3D, +/// Angle, RotationAxisAngle, Scale3D, TranslationAndMat3x3, TranslationRotationScale3D, /// }, /// RecordingStreamBuilder, /// }; @@ -36,7 +36,7 @@ /// /// rec.log( /// "base/translated", -/// &Transform3D::new(TranslationAndMat3x3::new([1.0, 0.0, 0.0], Mat3x3::IDENTITY)), +/// &Transform3D::new(TranslationAndMat3x3::translation([1.0, 0.0, 0.0])), /// )?; /// /// rec.log("base/translated", &Arrows3D::new([(0.0, 1.0, 0.0)]))?; diff --git a/docs/code-examples/roundtrips.py b/docs/code-examples/roundtrips.py index b0923e991d10..ad03eab9e7ed 100755 --- a/docs/code-examples/roundtrips.py +++ b/docs/code-examples/roundtrips.py @@ -52,10 +52,6 @@ "point3d_random": ["cpp", "py", "rust"], # TODO(#3206): need to align everything to use PCG64 in the same order etc... don't have time for that. "tensor_one_dim": ["cpp", "py", "rust"], # TODO(#3206): need to align everything to use PCG64 in the same order etc... don't have time for that. "tensor_simple": ["cpp", "py", "rust"], # TODO(#3206): need to align everything to use PCG64 in the same order etc... don't have time for that. - # TODO(#3207): two issues: - # - cpp sends an identity transform for no reason - # - python has a crazy indicator component out of nowhere - "transform3d_simple": ["cpp", "py", "rust"], } # fmt: on diff --git a/docs/code-examples/transform3d_simple.py b/docs/code-examples/transform3d_simple.py index ee7ee0cfa45e..f4cc8b71df76 100644 --- a/docs/code-examples/transform3d_simple.py +++ b/docs/code-examples/transform3d_simple.py @@ -7,14 +7,10 @@ rr.init("rerun_example_transform3d", spawn=True) -origin = [0, 0, 0] -base_vector = [0, 1, 0] +rr2.log("base", rr2.Arrows3D([0, 1, 0])) -rr.log_arrow("base", origin=origin, vector=base_vector) - -rr2.log("base/translated", rrd.TranslationRotationScale3D(translation=[1, 0, 0])) - -rr.log_arrow("base/translated", origin=origin, vector=base_vector) +rr2.log("base/translated", rrd.TranslationAndMat3x3(translation=[1, 0, 0])) +rr2.log("base/translated", rr2.Arrows3D([0, 1, 0])) rr2.log( "base/rotated_scaled", @@ -23,5 +19,4 @@ scale=2, ), ) - -rr.log_arrow("base/rotated_scaled", origin=origin, vector=base_vector) +rr2.log("base/rotated_scaled", rr2.Arrows3D([0, 1, 0])) diff --git a/docs/code-examples/transform3d_simple.rs b/docs/code-examples/transform3d_simple.rs index b39cd9cc4e4d..b034ee0feb3b 100644 --- a/docs/code-examples/transform3d_simple.rs +++ b/docs/code-examples/transform3d_simple.rs @@ -3,7 +3,7 @@ use rerun::{ archetypes::{Arrows3D, Transform3D}, datatypes::{ - Angle, Mat3x3, RotationAxisAngle, Scale3D, TranslationAndMat3x3, TranslationRotationScale3D, + Angle, RotationAxisAngle, Scale3D, TranslationAndMat3x3, TranslationRotationScale3D, }, RecordingStreamBuilder, }; @@ -16,7 +16,7 @@ fn main() -> Result<(), Box> { rec.log( "base/translated", - &Transform3D::new(TranslationAndMat3x3::new([1.0, 0.0, 0.0], Mat3x3::IDENTITY)), + &Transform3D::new(TranslationAndMat3x3::translation([1.0, 0.0, 0.0])), )?; rec.log("base/translated", &Arrows3D::new([(0.0, 1.0, 0.0)]))?; diff --git a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py index d98e772c2254..1cf437c98088 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py @@ -31,14 +31,10 @@ class Transform3D(Archetype): rr.init("rerun_example_transform3d", spawn=True) - origin = [0, 0, 0] - base_vector = [0, 1, 0] + rr2.log("base", rr2.Arrows3D([0, 1, 0])) - rr.log_arrow("base", origin=origin, vector=base_vector) - - rr2.log("base/translated", rrd.TranslationRotationScale3D(translation=[1, 0, 0])) - - rr.log_arrow("base/translated", origin=origin, vector=base_vector) + rr2.log("base/translated", rrd.TranslationAndMat3x3(translation=[1, 0, 0])) + rr2.log("base/translated", rr2.Arrows3D([0, 1, 0])) rr2.log( "base/rotated_scaled", @@ -47,8 +43,7 @@ class Transform3D(Archetype): scale=2, ), ) - - rr.log_arrow("base/rotated_scaled", origin=origin, vector=base_vector) + rr2.log("base/rotated_scaled", rr2.Arrows3D([0, 1, 0])) ``` """