Glam 0.28 update - adopted (#14613)

Basically it's https://github.com/bevyengine/bevy/pull/13792 with the
bumped versions of `encase` and `hexasphere`.

---------

Co-authored-by: Robert Swain <robert.swain@gmail.com>
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
Robert Walter 2024-08-06 03:28:00 +02:00 committed by GitHub
parent 039bf90817
commit 70a18d26e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 12 additions and 13 deletions

View file

@ -6,7 +6,7 @@ publish = false
license = "MIT OR Apache-2.0"
[dev-dependencies]
glam = "0.27"
glam = "0.28"
rand = "0.8"
rand_chacha = "0.3"
criterion = { version = "0.3", features = ["html_reports"] }

View file

@ -18,7 +18,7 @@ bytemuck = { version = "1", features = ["derive"] }
serde = { version = "1.0", features = ["derive"], optional = true }
thiserror = "1.0"
wgpu-types = { version = "0.20", default-features = false, optional = true }
encase = { version = "0.8", default-features = false }
encase = { version = "0.9", default-features = false }
[features]
default = ["bevy_reflect"]

View file

@ -10,7 +10,7 @@ keywords = ["bevy"]
rust-version = "1.68.2"
[dependencies]
glam = { version = "0.27", features = ["bytemuck"] }
glam = { version = "0.28", features = ["bytemuck"] }
thiserror = "1.0"
itertools = "0.13.0"
serde = { version = "1", features = ["derive"], optional = true }
@ -33,8 +33,7 @@ rand = "0.8"
rand_chacha = "0.3"
# Enable the approx feature when testing.
bevy_math = { path = ".", version = "0.15.0-dev", features = ["approx"] }
glam = { version = "0.27", features = ["approx"] }
glam = { version = "0.28", features = ["approx"] }
[features]
default = ["rand", "bevy_reflect"]

View file

@ -208,7 +208,7 @@ impl Dir2 {
/// ```
#[inline]
pub fn slerp(self, rhs: Self, s: f32) -> Self {
let angle = self.angle_between(rhs.0);
let angle = self.angle_to(rhs.0);
Rot2::radians(angle * s) * self
}

View file

@ -16,7 +16,7 @@ keywords = ["bevy", "3D", "graphics", "algorithm", "tangent"]
rust-version = "1.76.0"
[dependencies]
glam = "0.27"
glam = "0.28"
[[example]]
name = "generate"

View file

@ -478,7 +478,7 @@ pub(crate) fn assign_objects_to_clusters(
// as they often assume that the widest part of the sphere under projection is the
// center point on the axis of interest plus the radius, and that is not true!
let view_clusterable_object_sphere = Sphere {
center: Vec3A::from(
center: Vec3A::from_vec4(
view_from_world * clusterable_object_sphere.center.extend(1.0),
),
radius: clusterable_object_sphere.radius * view_from_world_scale_max,
@ -798,7 +798,7 @@ fn cluster_space_clusterable_object_aabb(
clusterable_object_sphere: &Sphere,
) -> (Vec3, Vec3) {
let clusterable_object_aabb_view = Aabb {
center: Vec3A::from(view_from_world * clusterable_object_sphere.center.extend(1.0)),
center: Vec3A::from_vec4(view_from_world * clusterable_object_sphere.center.extend(1.0)),
half_extents: Vec3A::from(clusterable_object_sphere.radius * view_from_world_scale.abs()),
};
let (mut clusterable_object_aabb_view_min, mut clusterable_object_aabb_view_max) = (

View file

@ -35,7 +35,7 @@ thiserror = "1.0"
serde = "1"
smallvec = { version = "1.11", optional = true }
glam = { version = "0.27", features = ["serde"], optional = true }
glam = { version = "0.28", features = ["serde"], optional = true }
petgraph = { version = "0.6", features = ["serde-1"], optional = true }
smol_str = { version = "0.2.0", optional = true }
uuid = { version = "1.0", optional = true, features = ["v4", "serde"] }

View file

@ -85,7 +85,7 @@ bytemuck = { version = "1.5", features = ["derive", "must_cast"] }
downcast-rs = "1.2.0"
thiserror = "1.0"
futures-lite = "2.0.1"
hexasphere = "12.0"
hexasphere = "14.0"
ddsfile = { version = "0.5.2", optional = true }
ktx2 = { version = "0.3.0", optional = true }
# For ktx2 supercompression
@ -93,7 +93,7 @@ flate2 = { version = "1.0.22", optional = true }
ruzstd = { version = "0.7.0", optional = true }
# For transcoding of UASTC/ETC1S universal formats, and for .basis file support
basis-universal = { version = "0.3.0", optional = true }
encase = { version = "0.8", features = ["glam"] }
encase = { version = "0.9", features = ["glam"] }
# For wgpu profiling using tracing. Use `RUST_LOG=info` to also capture the wgpu spans.
profiling = { version = "1", features = [
"profile-with-tracing",

View file

@ -168,7 +168,7 @@ impl HalfSpace {
/// Returns the unit normal vector of the bisecting plane that characterizes the `HalfSpace`.
#[inline]
pub fn normal(&self) -> Vec3A {
Vec3A::from(self.normal_d)
Vec3A::from_vec4(self.normal_d)
}
/// Returns the signed distance from the bisecting plane to the origin along