Skip to content

Commit 169005c

Browse files
committed
Matrix4x3: rename members to be more consistent with glam's matrices
1 parent 2aa4d4f commit 169005c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

crates/spirv-std/src/matrix.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ use glam::{Affine3A, Mat3, Mat3A, Mat4, Vec3, Vec3A};
1010
#[spirv(matrix)]
1111
#[allow(missing_docs)]
1212
pub struct Matrix4x3 {
13-
pub x: Vec3A,
14-
pub y: Vec3A,
15-
pub z: Vec3A,
16-
pub w: Vec3A,
13+
pub x_axis: Vec3A,
14+
pub y_axis: Vec3A,
15+
pub z_axis: Vec3A,
16+
pub w_axis: Vec3A,
1717
}
1818

1919
/// The `from_*` fn signatures should match [`Affine3A`], to make it easier to switch to [`Affine3A`] later.
@@ -22,10 +22,10 @@ impl Matrix4x3 {
2222
/// Convert from glam's [`Affine3A`]
2323
pub fn from_affine3a(affine: Affine3A) -> Self {
2424
Self {
25-
x: affine.x_axis,
26-
y: affine.y_axis,
27-
z: affine.z_axis,
28-
w: affine.w_axis,
25+
x_axis: affine.x_axis,
26+
y_axis: affine.y_axis,
27+
z_axis: affine.z_axis,
28+
w_axis: affine.w_axis,
2929
}
3030
}
3131

@@ -53,11 +53,11 @@ impl Matrix4x3 {
5353
pub fn to_affine3a(self) -> Affine3A {
5454
Affine3A {
5555
matrix3: Mat3A {
56-
x_axis: self.x,
57-
y_axis: self.y,
58-
z_axis: self.z,
56+
x_axis: self.x_axis,
57+
y_axis: self.y_axis,
58+
z_axis: self.z_axis,
5959
},
60-
translation: self.w,
60+
translation: self.w_axis,
6161
}
6262
}
6363

0 commit comments

Comments
 (0)