1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//! Visualization helper types for geometric algebra primitives.
//!
//! This module provides wrapper types that disambiguate how geometric types
//! should be interpreted for visualization purposes.
//!
//! # Position vs Direction
//!
//! A [`Vector`](crate::specialized::euclidean::dim3::Vector) can represent either:
//! - A **position** (point in space)
//! - A **direction** (displacement/velocity)
//!
//! Use [`AsPosition`] and [`AsArrow`] wrappers to make intent explicit:
//!
//! ```ignore
//! use clifford::specialized::euclidean::dim3::Vector;
//! use clifford::specialized::visualization::{rerun, AsPosition, AsArrow};
//!
//! let v = Vector::new(1.0_f32, 2.0, 3.0);
//!
//! // Log as a point in space
//! rec.log("point", &rerun::Points3D::new([AsPosition(v)]))?;
//!
//! // Log as a direction arrow from origin
//! rec.log("arrow", &rerun::Arrows3D::from_vectors([AsArrow(v)]))?;
//! ```
/// Re-export of the rerun crate for convenience.
///
/// This allows users to access rerun types without adding a separate dependency.
pub use rerun_0_28 as rerun;
/// Wrapper to interpret a geometric type as a position (point in space).
///
/// Use this when logging vectors as points rather than directions.
///
/// # Example
///
/// ```ignore
/// use clifford::specialized::euclidean::dim3::Vector;
/// use clifford::specialized::visualization::AsPosition;
///
/// let point = Vector::new(1.0_f32, 2.0, 3.0);
/// rec.log("point", &rerun::Points3D::new([AsPosition(point)]))?;
/// ```
;
/// Wrapper to interpret a geometric type as a direction (arrow/displacement).
///
/// Use this when logging vectors as arrows rather than points.
///
/// # Example
///
/// ```ignore
/// use clifford::specialized::euclidean::dim3::Vector;
/// use clifford::specialized::visualization::AsArrow;
///
/// let direction = Vector::new(1.0_f32, 0.0, 0.0);
/// rec.log("arrow", &rerun::Arrows3D::from_vectors([AsArrow(direction)]))?;
/// ```
;