Struct cuivre::transform::Transform [−][src]
Represents a transformation in 3D space: translation (position), scale, rotation (Euler's angles).
Fields
position: Vector3f
scale: Vector3f
rotation: Vector3f
Methods
impl Transform
[src]
impl Transform
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a transform with default position, scale, and rotation.
pub fn from_position(position: Vector3f) -> Self
[src]
pub fn from_position(position: Vector3f) -> Self
Create a transform with set position, with default scale and rotation.
pub fn from_scale(scale: Vector3f) -> Self
[src]
pub fn from_scale(scale: Vector3f) -> Self
Create a transform with set scale, with default position and rotation.
pub fn from_rotation(rotation: Vector3f) -> Self
[src]
pub fn from_rotation(rotation: Vector3f) -> Self
Create a transform with set rotation, with default position and scale.
pub fn matrix(&self) -> Matrix4f
[src]
pub fn matrix(&self) -> Matrix4f
Creates a matrix that applies the transform to a vector, or another matrix.
Trait Implementations
impl Copy for Transform
[src]
impl Copy for Transform
impl Clone for Transform
[src]
impl Clone for Transform
fn clone(&self) -> Transform
[src]
fn clone(&self) -> Transform
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Transform
[src]
impl Debug for Transform
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Transform
[src]
impl PartialEq for Transform
fn eq(&self, other: &Transform) -> bool
[src]
fn eq(&self, other: &Transform) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Transform) -> bool
[src]
fn ne(&self, other: &Transform) -> bool
This method tests for !=
.
impl Default for Transform
[src]
impl Default for Transform