Struct fyrox_core::math::frustum::Frustum
source · pub struct Frustum { /* private fields */ }
Implementations§
source§impl Frustum
impl Frustum
pub const LEFT: usize = 0usize
pub const RIGHT: usize = 1usize
pub const TOP: usize = 2usize
pub const BOTTOM: usize = 3usize
pub const FAR: usize = 4usize
pub const NEAR: usize = 5usize
pub fn from_view_projection_matrix(m: Matrix4<f32>) -> Option<Self>
pub fn left(&self) -> &Plane
pub fn right(&self) -> &Plane
pub fn top(&self) -> &Plane
pub fn bottom(&self) -> &Plane
pub fn far(&self) -> &Plane
pub fn near(&self) -> &Plane
pub fn planes(&self) -> &[Plane]
pub fn left_top_front_corner(&self) -> Vector3<f32>
pub fn left_bottom_front_corner(&self) -> Vector3<f32>
pub fn right_bottom_front_corner(&self) -> Vector3<f32>
pub fn right_top_front_corner(&self) -> Vector3<f32>
pub fn left_top_back_corner(&self) -> Vector3<f32>
pub fn left_bottom_back_corner(&self) -> Vector3<f32>
pub fn right_bottom_back_corner(&self) -> Vector3<f32>
pub fn right_top_back_corner(&self) -> Vector3<f32>
pub fn corners(&self) -> [Vector3<f32>; 8]
pub fn near_plane_center(&self) -> Vector3<f32>
pub fn far_plane_center(&self) -> Vector3<f32>
pub fn view_direction(&self) -> Vector3<f32>
pub fn center(&self) -> Vector3<f32>
pub fn is_intersects_point_cloud(&self, points: &[Vector3<f32>]) -> bool
pub fn is_intersects_aabb(&self, aabb: &AxisAlignedBoundingBox) -> bool
pub fn is_intersects_aabb_offset( &self, aabb: &AxisAlignedBoundingBox, offset: Vector3<f32> ) -> bool
pub fn is_intersects_aabb_transform( &self, aabb: &AxisAlignedBoundingBox, transform: &Matrix4<f32> ) -> bool
👎Deprecated since 0.29.0: this method does not handle all cases and could give weird results
pub fn is_contains_point(&self, pt: Vector3<f32>) -> bool
pub fn is_intersects_sphere(&self, p: Vector3<f32>, r: f32) -> bool
Trait Implementations§
source§impl PartialEq for Frustum
impl PartialEq for Frustum
impl Copy for Frustum
impl StructuralPartialEq for Frustum
Auto Trait Implementations§
impl RefUnwindSafe for Frustum
impl Send for Frustum
impl Sync for Frustum
impl Unpin for Frustum
impl UnwindSafe for Frustum
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.