pub struct CompositeTransform { /* private fields */ }
Implementations§
Source§impl CompositeTransform
impl CompositeTransform
pub fn new(translation: Vec2, rotation: Scalar, scale: Vec2) -> Self
pub fn translation(v: Vec2) -> Self
pub fn rotation(v: Scalar) -> Self
pub fn scale(v: Vec2) -> Self
pub fn with_translation(self, v: Vec2) -> Self
pub fn with_rotation(self, v: Scalar) -> Self
pub fn with_scale(self, v: Vec2) -> Self
pub fn get_translation(&self) -> Vec2
pub fn get_rotation(&self) -> Scalar
pub fn get_direction(&self) -> Vec2
pub fn get_scale(&self) -> Vec2
pub fn set_translation(&mut self, v: Vec2)
pub fn set_rotation(&mut self, v: Scalar)
pub fn set_scale(&mut self, v: Vec2)
pub fn apply(&mut self, translation: Vec2, rotation: Scalar, scale: Vec2)
pub fn matrix(&self) -> Mat2d
Trait Implementations§
Source§impl Clone for CompositeTransform
impl Clone for CompositeTransform
Source§fn clone(&self) -> CompositeTransform
fn clone(&self) -> CompositeTransform
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CompositeTransform
impl Debug for CompositeTransform
Source§impl Default for CompositeTransform
impl Default for CompositeTransform
Source§impl<'de> Deserialize<'de> for CompositeTransform
impl<'de> Deserialize<'de> for CompositeTransform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CompositeTransform
impl PartialEq for CompositeTransform
Source§impl Prefab for CompositeTransform
impl Prefab for CompositeTransform
fn post_from_prefab(&mut self)
fn from_prefab(data: &Intermediate) -> Result<Self, PrefabError>
fn from_prefab_with_extras( data: &Intermediate, _named_entities: &HashMap<String, Entity>, _state_token: ID<PhantomData<dyn State + Send + Sync>>, ) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Intermediate, PrefabError>
fn from_prefab_str(data: &str) -> Result<Self, PrefabError>
fn to_prefab_string(&self) -> Result<String, PrefabError>
Source§impl Serialize for CompositeTransform
impl Serialize for CompositeTransform
impl PrefabComponent for CompositeTransform
impl StructuralPartialEq for CompositeTransform
Auto Trait Implementations§
impl Freeze for CompositeTransform
impl RefUnwindSafe for CompositeTransform
impl Send for CompositeTransform
impl Sync for CompositeTransform
impl Unpin for CompositeTransform
impl UnwindSafe for CompositeTransform
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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