Skip to content

Commit

Permalink
Derive FromReflect for Aabb (#7396)
Browse files Browse the repository at this point in the history
# Objective

Add a `FromReflect` derive to the `Aabb` type, like all other math types, so we can reflect `Vec<Aabb>`.

## Solution

Just add it :)

---

## Changelog

### Added

- Implemented `FromReflect` for `Aabb`.
  • Loading branch information
djeedai committed Jan 30, 2023
1 parent c673343 commit a61bf35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_render/src/primitives/mod.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use bevy_ecs::{component::Component, prelude::Entity, reflect::ReflectComponent};
use bevy_math::{Mat4, Vec3, Vec3A, Vec4, Vec4Swizzles};
use bevy_reflect::Reflect;
use bevy_reflect::{FromReflect, Reflect};
use bevy_utils::HashMap;

/// An Axis-Aligned Bounding Box
#[derive(Component, Clone, Debug, Default, Reflect)]
#[derive(Component, Clone, Debug, Default, Reflect, FromReflect)]
#[reflect(Component)]
pub struct Aabb {
pub center: Vec3A,
Expand Down

0 comments on commit a61bf35

Please sign in to comment.