pub struct Frustum {
pub planes: [Plane; 6],
pub corners: [Vector3<f32>; 8],
}Fields§
§planes: [Plane; 6]0 - left, 1 - right, 2 - top, 3 - bottom, 4 - far, 5 - near
corners: [Vector3<f32>; 8]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§
impl Copy for Frustum
impl StructuralPartialEq for Frustum
Auto Trait Implementations§
impl Freeze for Frustum
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.