Struct tridify_rs::Transform
source · pub struct Transform { /* private fields */ }
Expand description
Representation for position, rotation and scale.
Implementations§
source§impl Transform
impl Transform
pub fn new(position: Vec3, rotation: Quat, scale: Vec3) -> Self
sourcepub fn from_pos(position: Vec3) -> Self
pub fn from_pos(position: Vec3) -> Self
Create transform based only on position. Rotation and scale will have default values.
sourcepub fn from_look_to(eye: Vec3, forward: Vec3, up: Vec3) -> Self
pub fn from_look_to(eye: Vec3, forward: Vec3, up: Vec3) -> Self
Create transform based on position and view direction.
sourcepub fn from_look_at(eye: Vec3, center: Vec3, up: Vec3) -> Self
pub fn from_look_at(eye: Vec3, center: Vec3, up: Vec3) -> Self
Create transform based on position and view point.
pub fn build_matrix(&self) -> Mat4
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere R: Read + ReadEndian<P>, P: Default,
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.