use general::{Group, Multiplicative};
use linear::EuclideanSpace;
pub trait Transformation<E: EuclideanSpace>: Group<Multiplicative> {
fn transform_point(&self, pt: &E) -> E;
fn transform_vector(&self, v: &E::Vector) -> E::Vector;
fn inverse_transform_point(&self, pt: &E) -> E;
fn inverse_transform_vector(&self, v: &E::Vector) -> E::Vector;
}
pub trait Similarity<E: EuclideanSpace>: Group<Multiplicative> {
type Translation: Translation<E>;
type Rotation: Rotation<E>;
fn translation(&self) -> Self::Translation;
fn rotation(&self) -> Self::Rotation;
fn scaling_factor(&self) -> E::Real;
}
pub trait Isometry<E: EuclideanSpace>: Similarity<E> {
}
pub trait DirectIsometry<E: EuclideanSpace>: Isometry<E> {
}
pub trait Translation<E: EuclideanSpace>: DirectIsometry<E> {
}
pub trait OrthogonalGroup<E: EuclideanSpace>: Isometry<E> {
}
pub trait Rotation<E: EuclideanSpace>: OrthogonalGroup<E> + DirectIsometry<E> {
}