Trait Geometry

Source
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§

Source

fn mv(self, mv: &Vec3) -> Self

Source

fn rot(self, rot: &Quat) -> Self

Source

fn scale(self, scale: &Vec3) -> Self

Source

fn scale_u(self, scale: fxx) -> Self

Provided Methods§

Source

fn rot_x(self, angle: fxx) -> Self

Source

fn rot_y(self, angle: fxx) -> Self

Source

fn rot_z(self, angle: fxx) -> Self

Source

fn tf(self, tf: &Pose) -> Self

Source

fn tf_inv(self, tf: &Pose) -> Self

Source

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.

Implementors§