logo
pub struct IsoTransform { /* private fields */ }
Expand description

An isometric transform represented by translation * rotation.

An isometric transform conserves distances and angles.

The operations are applied right-to-left, so when transforming a point it will first be rotated and finally translated.

Implementations

The identity transform: doesn’t transform at all. Like multiplying with 1.

A transform that first rotates around the origin and then moves all points by a set amount.

Equivalent to IsoTransform::from_translation(translation) * IsoTransform::from_quat(rotation).

The given rotation should be normalized.

A rotation around a given point

A pure rotation without any translation.

The given rotation should be normalized.

A pure translation without any rotation.

Tries to convert a 4x4 matrix to a IsoTransform.

This may return None as a Mat4 can represent things that a IsoTransform cannot, such as scale, shearing and projection.

Creates a right-handed view transform using a camera position, a point to look at, and an up direction.

The result transforms from world coordinates to view coordinates.

For a view coordinate system with +X=right, +Y=up and +Z=back.

Will return None if any argument is zero, non-finite, or if forward and up are colinear.

True if every value is finite

Returns true if any elements are NaN.

Convert to an equivalent Mat4 transformation matrix.

Get the transform that undoes this transform so that t.inverse() * t == IDENTITY.

Returns self normalized. You generally don’t need to call this unless you’ve multiplied A LOT of IsoTransforms.

Rotate and translate a point.

Rotate a vector.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Identity transform

Identity transform

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Converts to this type from the input type.

iso * iso -> iso

The resulting type after applying the * operator.

Performs the * operation. Read more

iso * affine3a -> affine3a

The resulting type after applying the * operator.

Performs the * operation. Read more

iso * iso -> iso

The resulting type after applying the * operator.

Performs the * operation. Read more

affine3a * iso -> affine3a

The resulting type after applying the * operator.

Performs the * operation. Read more

iso * iso -> iso

The resulting type after applying the * operator.

Performs the * operation. Read more

iso * mat4 -> mat4

The resulting type after applying the * operator.

Performs the * operation. Read more

mat4 * iso -> mat4

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.