pub trait Geometry: Sized {
// Required methods
fn mv(self, mv: &Vec3) -> Self;
fn rot(self, rot: &Quat) -> Self;
fn scale(self, scale: &Vec3) -> Self;
fn scale_u(self, scale: fxx) -> Self;
// Provided methods
fn rot_x(self, angle: fxx) -> Self { ... }
fn rot_y(self, angle: fxx) -> Self { ... }
fn rot_z(self, angle: fxx) -> Self { ... }
fn tf(self, tf: &Pose) -> Self { ... }
fn tf_inv(self, tf: &Pose) -> Self { ... }
fn reorient(self, from: &Pose, to: &Pose) -> Self { ... }
}
Expand description
If some geometry is ultimately defined in terms of points, A whole set of common functionalities can be used to transform said geometry: TODO smooth If a Geometry is NOT purely defined by points, reimplement the mv, rot, scale, and scale_u operators.
Required Methods§
fn mv(self, mv: &Vec3) -> Self
fn rot(self, rot: &Quat) -> Self
fn scale(self, scale: &Vec3) -> Self
fn scale_u(self, scale: fxx) -> Self
Provided Methods§
fn rot_x(self, angle: fxx) -> Self
fn rot_y(self, angle: fxx) -> Self
fn rot_z(self, angle: fxx) -> Self
fn tf(self, tf: &Pose) -> Self
fn tf_inv(self, tf: &Pose) -> Self
fn reorient(self, from: &Pose, to: &Pose) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.