rename Transform::compute_matrix to to_matrix (#19646)
# Objective - Parity with #19643 ## Solution - Rename ## Testing - None --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
parent
6f08bb84d2
commit
a1d3c6197f
@ -125,7 +125,7 @@ impl ExtractComponent for Skybox {
|
|||||||
SkyboxUniforms {
|
SkyboxUniforms {
|
||||||
brightness: skybox.brightness * exposure,
|
brightness: skybox.brightness * exposure,
|
||||||
transform: Transform::from_rotation(skybox.rotation)
|
transform: Transform::from_rotation(skybox.rotation)
|
||||||
.compute_matrix()
|
.to_matrix()
|
||||||
.inverse(),
|
.inverse(),
|
||||||
#[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature = "webgpu")))]
|
#[cfg(all(feature = "webgl", target_arch = "wasm32", not(feature = "webgpu")))]
|
||||||
_wasm_padding_8b: 0,
|
_wasm_padding_8b: 0,
|
||||||
|
@ -628,7 +628,7 @@ pub fn update_point_light_frusta(
|
|||||||
|
|
||||||
for (view_rotation, frustum) in view_rotations.iter().zip(cubemap_frusta.iter_mut()) {
|
for (view_rotation, frustum) in view_rotations.iter().zip(cubemap_frusta.iter_mut()) {
|
||||||
let world_from_view = view_translation * *view_rotation;
|
let world_from_view = view_translation * *view_rotation;
|
||||||
let clip_from_world = clip_from_view * world_from_view.compute_matrix().inverse();
|
let clip_from_world = clip_from_view * world_from_view.to_matrix().inverse();
|
||||||
|
|
||||||
*frustum = Frustum::from_clip_from_world_custom_far(
|
*frustum = Frustum::from_clip_from_world_custom_far(
|
||||||
&clip_from_world,
|
&clip_from_world,
|
||||||
|
@ -378,7 +378,7 @@ fn gather_environment_map_uniform(
|
|||||||
let environment_map_uniform = if let Some(environment_map_light) = environment_map_light {
|
let environment_map_uniform = if let Some(environment_map_light) = environment_map_light {
|
||||||
EnvironmentMapUniform {
|
EnvironmentMapUniform {
|
||||||
transform: Transform::from_rotation(environment_map_light.rotation)
|
transform: Transform::from_rotation(environment_map_light.rotation)
|
||||||
.compute_matrix()
|
.to_matrix()
|
||||||
.inverse(),
|
.inverse(),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -256,10 +256,10 @@ impl Transform {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the 3d affine transformation matrix from this transforms translation,
|
/// Computes the 3d affine transformation matrix from this transform's translation,
|
||||||
/// rotation, and scale.
|
/// rotation, and scale.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn compute_matrix(&self) -> Mat4 {
|
pub fn to_matrix(&self) -> Mat4 {
|
||||||
Mat4::from_scale_rotation_translation(self.scale, self.rotation, self.translation)
|
Mat4::from_scale_rotation_translation(self.scale, self.rotation, self.translation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
title: GlobalTransform::compute_matrix rename
|
|
||||||
pull_requests: [19643]
|
|
||||||
---
|
|
||||||
|
|
||||||
`GlobalTransform::compute_matrix` has been renamed to `GlobalTransform::to_matrix` because it does not compute anything, it simply moves data into a different type.
|
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: Transform and GlobalTransform::compute_matrix rename
|
||||||
|
pull_requests: [19643, 19646]
|
||||||
|
---
|
||||||
|
|
||||||
|
`GlobalTransform::compute_matrix` has been renamed to `GlobalTransform::to_matrix` because it does not compute anything, it simply moves data into a different type.
|
||||||
|
`Transform::compute_matrix` has been renamed to `Transform::to_matrix` for consistency with `GlobalTransform`.
|
Loading…
Reference in New Issue
Block a user