pub struct Transform3x4 { /* private fields */ }Expand description
3x4 transformation matrix.
Represents a 3D affine transformation with rotation and translation but no perspective. The matrix is stored in column-major order and contains:
- 3x3 rotation/scale submatrix (top-left)
- 3x1 translation vector (bottom row)
§Matrix Layout
[ m00 m01 m02 ]
[ m10 m11 m12 ]
[ m20 m21 m22 ]
[ m30 m31 m32 ]§Note
This struct does not have automatic getters for matrix elements. Use the
Matrix trait methods (m00(), m01(), etc.) to access elements.
§Example
ⓘ
use rpfm_lib::files::bmd::common::{Transform3x4, Matrix};
let transform = Transform3x4::identity();
let m00 = transform.m00(); // Access via Matrix traitImplementations§
Source§impl Transform3x4
impl Transform3x4
Trait Implementations§
Source§impl Clone for Transform3x4
impl Clone for Transform3x4
Source§fn clone(&self) -> Transform3x4
fn clone(&self) -> Transform3x4
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 Transform3x4
impl Debug for Transform3x4
Source§impl Decodeable for Transform3x4
impl Decodeable for Transform3x4
Source§impl Default for Transform3x4
impl Default for Transform3x4
Source§fn default() -> Transform3x4
fn default() -> Transform3x4
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Transform3x4
impl<'de> Deserialize<'de> for Transform3x4
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 Encodeable for Transform3x4
impl Encodeable for Transform3x4
Source§fn encode<W: WriteBytes>(
&mut self,
buffer: &mut W,
_extra_data: &Option<EncodeableExtraData<'_>>,
) -> Result<()>
fn encode<W: WriteBytes>( &mut self, buffer: &mut W, _extra_data: &Option<EncodeableExtraData<'_>>, ) -> Result<()>
Encodes the implementing type into binary data. Read more
Source§impl Matrix for Transform3x4
impl Matrix for Transform3x4
Source§fn extract_scales(matrix: Matrix3<f64>) -> (f64, f64, f64)
fn extract_scales(matrix: Matrix3<f64>) -> (f64, f64, f64)
Extracts scale factors from a rotation matrix. Read more
Source§fn apply_scales(matrix: Matrix3<f64>, scales: (f64, f64, f64)) -> Matrix3<f64>
fn apply_scales(matrix: Matrix3<f64>, scales: (f64, f64, f64)) -> Matrix3<f64>
Applies scale factors to a rotation matrix. Read more
Source§fn normalize_rotation_matrix(
matrix: Matrix3<f64>,
scales: (f64, f64, f64),
) -> Matrix3<f64>
fn normalize_rotation_matrix( matrix: Matrix3<f64>, scales: (f64, f64, f64), ) -> Matrix3<f64>
Normalizes a rotation matrix by removing scale factors. Read more
Source§impl PartialEq for Transform3x4
impl PartialEq for Transform3x4
Source§impl Serialize for Transform3x4
impl Serialize for Transform3x4
impl StructuralPartialEq for Transform3x4
Auto Trait Implementations§
impl Freeze for Transform3x4
impl RefUnwindSafe for Transform3x4
impl Send for Transform3x4
impl Sync for Transform3x4
impl Unpin for Transform3x4
impl UnsafeUnpin for Transform3x4
impl UnwindSafe for Transform3x4
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
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().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.