diff --git a/fyrox-core/src/math/mod.rs b/fyrox-core/src/math/mod.rs index ab1546755..45a17adbe 100644 --- a/fyrox-core/src/math/mod.rs +++ b/fyrox-core/src/math/mod.rs @@ -7,13 +7,15 @@ pub mod plane; pub mod ray; pub mod triangulator; -use crate::algebra::{RealField, SimdRealField}; use crate::{ - algebra::{Matrix3, Matrix4, Scalar, UnitQuaternion, Vector2, Vector3}, + algebra::{ + Matrix3, Matrix4, RealField, Scalar, SimdRealField, UnitQuaternion, Vector2, Vector3, + }, + inspect::prelude::*, math::ray::IntersectionResult, num_traits::{NumAssign, Zero}, reflect::Reflect, - visitor::{Visit, VisitResult, Visitor}, + visitor::prelude::*, }; use std::ops::{Index, IndexMut}; @@ -846,7 +848,7 @@ pub fn get_closest_point_triangle_set( closest_index } -#[derive(Debug, PartialEq, Visit)] +#[derive(Debug, PartialEq, Visit, Reflect, Inspect, Clone)] pub struct SmoothAngle { /// Current angle in radians. pub angle: f32, diff --git a/fyrox-ui/src/inspector/editors/mod.rs b/fyrox-ui/src/inspector/editors/mod.rs index e55aac3da..add12e7e2 100644 --- a/fyrox-ui/src/inspector/editors/mod.rs +++ b/fyrox-ui/src/inspector/editors/mod.rs @@ -3,7 +3,7 @@ use crate::{ algebra::{UnitQuaternion, Vector2, Vector3, Vector4}, color::Color, inspect::{Inspect, PropertyInfo, PropertyValue}, - math::Rect, + math::{Rect, SmoothAngle}, pool::Handle, }, inspector::{ @@ -218,6 +218,9 @@ impl PropertyEditorDefinitionContainer { reg_array_property_editor! { container, usize, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; reg_array_property_editor! { container, isize, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; + // SmoothAngle + container.register_inheritable_inspectable::(); + container }