Struct webrender::space::SpaceMapper
source · pub struct SpaceMapper<F, T> {
kind: CoordinateSpaceMapping<F, T>,
pub ref_spatial_node_index: SpatialNodeIndex,
pub current_target_spatial_node_index: SpatialNodeIndex,
pub bounds: Box2D<f32, T>,
visible_face: VisibleFace,
}
Fields§
§kind: CoordinateSpaceMapping<F, T>
§ref_spatial_node_index: SpatialNodeIndex
§current_target_spatial_node_index: SpatialNodeIndex
§bounds: Box2D<f32, T>
§visible_face: VisibleFace
Implementations§
source§impl<F, T> SpaceMapper<F, T>where
F: Debug,
impl<F, T> SpaceMapper<F, T>where
F: Debug,
pub fn new( ref_spatial_node_index: SpatialNodeIndex, bounds: Box2D<f32, T>, ) -> Self
pub fn new_with_target( ref_spatial_node_index: SpatialNodeIndex, target_node_index: SpatialNodeIndex, bounds: Box2D<f32, T>, spatial_tree: &SpatialTree, ) -> Self
pub fn set_target_spatial_node( &mut self, target_node_index: SpatialNodeIndex, spatial_tree: &SpatialTree, )
pub fn get_transform(&self) -> Transform3D<f32, F, T>
pub fn unmap(&self, rect: &Box2D<f32, T>) -> Option<Box2D<f32, F>>
pub fn map(&self, rect: &Box2D<f32, F>) -> Option<Box2D<f32, T>>
pub fn map_inner_bounds(&self, rect: &Box2D<f32, F>) -> Option<Box2D<f32, T>>
pub fn map_point(&self, p: Point2D<f32, F>) -> Option<Point2D<f32, T>>
pub fn map_vector(&self, v: Vector2D<f32, F>) -> Vector2D<f32, T>
Trait Implementations§
Auto Trait Implementations§
impl<F, T> Freeze for SpaceMapper<F, T>
impl<F, T> RefUnwindSafe for SpaceMapper<F, T>where
T: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, T> Send for SpaceMapper<F, T>
impl<F, T> Sync for SpaceMapper<F, T>
impl<F, T> Unpin for SpaceMapper<F, T>
impl<F, T> UnwindSafe for SpaceMapper<F, T>where
T: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more