Trait Geometry3

Source
pub trait Geometry3<T: Scalar = f64>: Geometry<T> {
Show 13 methods // Required methods fn dir_to_local( pos: Self::Pos, dir: Self::Dir, ) -> <Euclidean3<T> as Geometry<T>>::Dir; fn dir_from_local( pos: Self::Pos, dir: <Euclidean3<T> as Geometry<T>>::Dir, ) -> Self::Dir; fn dir_when_moved_at_pos( src_pos: Self::Pos, src_dir: Self::Dir, dst_pos: Self::Pos, ) -> Self::Dir; fn shift_x(dist: T) -> Self::Map; fn shift_y(dist: T) -> Self::Map; fn shift_z(dist: T) -> Self::Map; fn rotate_x(angle: T) -> Self::Map; fn rotate_y(angle: T) -> Self::Map; fn rotate_z(angle: T) -> Self::Map; fn look_at_pos(pos: Self::Pos) -> Self::Map; fn look_at_dir(dir: Self::Dir) -> Self::Map; fn move_at_pos(pos: Self::Pos) -> Self::Map; fn move_at_dir(dir: Self::Dir, dist: T) -> Self::Map;
}
Expand description

Three-dimensional geometry.

Required Methods§

Source

fn dir_to_local( pos: Self::Pos, dir: Self::Dir, ) -> <Euclidean3<T> as Geometry<T>>::Dir

Source

fn dir_from_local( pos: Self::Pos, dir: <Euclidean3<T> as Geometry<T>>::Dir, ) -> Self::Dir

Source

fn dir_when_moved_at_pos( src_pos: Self::Pos, src_dir: Self::Dir, dst_pos: Self::Pos, ) -> Self::Dir

Returns the direction of the line at point dst_pos when we know that the line at the point src_pos has direction of src_dir.

Source

fn shift_x(dist: T) -> Self::Map

Source

fn shift_y(dist: T) -> Self::Map

Source

fn shift_z(dist: T) -> Self::Map

Source

fn rotate_x(angle: T) -> Self::Map

Source

fn rotate_y(angle: T) -> Self::Map

Source

fn rotate_z(angle: T) -> Self::Map

Source

fn look_at_pos(pos: Self::Pos) -> Self::Map

Rotatates default_dir around the origin to make it point to pos.

Source

fn look_at_dir(dir: Self::Dir) -> Self::Map

Turns default_dir into dir.

Source

fn move_at_pos(pos: Self::Pos) -> Self::Map

Returns maping that translates origin to pos preserving orientation relatively to the line that connects the origin to pos.

Source

fn move_at_dir(dir: Self::Dir, dist: T) -> Self::Map

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§