17 using scalar_type = double;
18 Vector3(scalar_type x, scalar_type y, scalar_type z);
21 scalar_type x()
const;
22 scalar_type y()
const;
23 scalar_type z()
const;
31 const std::array<scalar_type, 3>& data()
const;
32 std::array<scalar_type, 3>& data();
33 viam::common::v1::Vector3 to_proto()
const;
34 static Vector3 from_proto(
const viam::common::v1::Vector3& vec);
37 std::array<scalar_type, 3> data_;
47struct vec_traits<viam::sdk::Vector3> {
48 static int const dim = 3;
50 using scalar_type = vec_type::scalar_type;
53 static inline scalar_type& write_element(
vec_type& v) {
58 static inline scalar_type read_element(
vec_type const& v) {
62 static inline scalar_type& write_element_idx(
int i,
vec_type& v) {
66 static inline scalar_type read_element_idx(
int i,
vec_type const& v) {