mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
Debug + PartialEq impls
This commit is contained in:
@@ -5,7 +5,7 @@ use crate::{
|
||||
};
|
||||
use nalgebra::Point3;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct Frustum {
|
||||
/// 0 - left, 1 - right, 2 - top, 3 - bottom, 4 - far, 5 - near
|
||||
planes: [Plane; 6],
|
||||
|
||||
@@ -757,6 +757,7 @@ pub fn get_closest_point_triangle_set<P: PositionProvider>(
|
||||
closest_index
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct SmoothAngle {
|
||||
/// Current angle in radians.
|
||||
pub angle: f32,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::algebra::Vector3;
|
||||
use crate::visitor::{Visit, VisitResult, Visitor};
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct Plane {
|
||||
pub normal: Vector3<f32>,
|
||||
pub d: f32,
|
||||
|
||||
@@ -565,6 +565,11 @@ impl NavmeshAgent {
|
||||
self.target = new_target;
|
||||
}
|
||||
|
||||
/// Returns current target of the agent.
|
||||
pub fn target(&self) -> Vector3<f32> {
|
||||
self.target
|
||||
}
|
||||
|
||||
/// Warps agent to a new position.
|
||||
pub fn warp(&mut self, new_position: Vector3<f32>) {
|
||||
if new_position.metric_distance(&self.last_warp_position) >= self.recalculation_threshold {
|
||||
|
||||
Reference in New Issue
Block a user