pub type LayoutToWorldFastTransform = FastTransform<LayoutPixel, WorldPixel>;

Aliased Type§

enum LayoutToWorldFastTransform {
    Offset(Vector2D<f32, LayoutPixel>),
    Transform {
        transform: Transform3D<f32, LayoutPixel, WorldPixel>,
        inverse: Option<Transform3D<f32, WorldPixel, LayoutPixel>>,
        is_2d: bool,
    },
}

Variants§

§

Offset(Vector2D<f32, LayoutPixel>)

A simple offset, which can be used without doing any matrix math.

§

Transform

A 2D transformation with an inverse.

Implementations§

source§

impl<Src, Dst> FastTransform<Src, Dst>

source

pub fn identity() -> Self

source

pub fn with_vector(offset: Vector2D<f32, Src>) -> Self

source

pub fn with_scale_offset(scale_offset: ScaleOffset) -> Self

source

pub fn with_transform(transform: Transform3D<f32, Src, Dst>) -> Self

source

pub fn to_transform(&self) -> Cow<'_, Transform3D<f32, Src, Dst>>

source

pub fn is_identity(&self) -> bool

Return true if this is an identity transform

source

pub fn then<NewDst>( &self, other: &FastTransform<Dst, NewDst> ) -> FastTransform<Src, NewDst>

source

pub fn pre_transform<NewSrc>( &self, other: &FastTransform<NewSrc, Src> ) -> FastTransform<NewSrc, Dst>

source

pub fn pre_translate(&self, other_offset: Vector2D<f32, Src>) -> Self

source

pub fn then_translate(&self, other_offset: Vector2D<f32, Dst>) -> Self

source

pub fn is_backface_visible(&self) -> bool

source

pub fn transform_point2d( &self, point: Point2D<f32, Src> ) -> Option<Point2D<f32, Dst>>

source

pub fn project_point2d( &self, point: Point2D<f32, Src> ) -> Option<Point2D<f32, Dst>>

source

pub fn inverse(&self) -> Option<FastTransform<Dst, Src>>

Trait Implementations§

source§

impl<Src, Dst> Clone for FastTransform<Src, Dst>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Src: Debug, Dst: Debug> Debug for FastTransform<Src, Dst>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Src, Dst> From<Transform3D<f32, Src, Dst>> for FastTransform<Src, Dst>

source§

fn from(transform: Transform3D<f32, Src, Dst>) -> Self

Converts to this type from the input type.
source§

impl<Src, Dst> From<Vector2D<f32, Src>> for FastTransform<Src, Dst>

source§

fn from(vector: Vector2D<f32, Src>) -> Self

Converts to this type from the input type.
source§

impl<Src, Dst> MallocSizeOf for FastTransform<Src, Dst>where Src: MallocSizeOf, Dst: MallocSizeOf,

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl<Src, Dst> Serialize for FastTransform<Src, Dst>where Src: Serialize, Dst: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Src, Dst> Copy for FastTransform<Src, Dst>