mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
more trait impls for SmoothAngle + property editor
This commit is contained in:
@@ -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<P: PositionProvider>(
|
||||
closest_index
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Visit)]
|
||||
#[derive(Debug, PartialEq, Visit, Reflect, Inspect, Clone)]
|
||||
pub struct SmoothAngle {
|
||||
/// Current angle in radians.
|
||||
pub angle: f32,
|
||||
|
||||
@@ -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::<SmoothAngle>();
|
||||
|
||||
container
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user