Struct adi_gpu::Transform
[−]
[src]
#[must_use]pub struct Transform(pub [f32; 16]);
Transform represents a transformation matrix.
Methods
impl Transform
[src]
fn new() -> Transform
[src]
A no-op transform (identity matrix).
fn matrix(self, matrix: [f32; 16]) -> Transform
[src]
Multiply self
by a matrix.
fn scale(self, x: f32, y: f32, z: f32) -> Transform
[src]
Multiply self
by a scale transformation matrix.
fn translate(self, x: f32, y: f32, z: f32) -> Transform
[src]
Multiply self
by a translation matrix.
fn rotate(self, x: f32, y: f32, z: f32) -> Transform
[src]
Multiply self
by a rotation matrix. x
, y
and z
are in PI
Radians.
Trait Implementations
impl Clone for Transform
[src]
fn clone(&self) -> Transform
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for Transform
[src]
impl PartialEq for Transform
[src]
fn eq(&self, __arg_0: &Transform) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Transform) -> bool
[src]
This method tests for !=
.
impl Mul<Frustum> for Transform
[src]
type Output = Frustum
The resulting type after applying the *
operator.
fn mul(self, rhs: Frustum) -> Self::Output
[src]
Performs the *
operation.
impl Mul<Plane> for Transform
[src]
type Output = Plane
The resulting type after applying the *
operator.
fn mul(self, rhs: Plane) -> Self::Output
[src]
Performs the *
operation.
impl Mul<Vec3<f32>> for Transform
[src]
type Output = Vec3<f32>
The resulting type after applying the *
operator.
fn mul(self, rhs: Vec3<f32>) -> Self::Output
[src]
Transform as a position.
impl Mul<Transform> for Transform
[src]
type Output = Transform
The resulting type after applying the *
operator.
fn mul(self, rhs: Transform) -> Self::Output
[src]
Performs the *
operation.