pub struct ZoneExtent {
pub size_x: f64,
pub size_y: f64,
pub size_z: f64,
}Expand description
Describes the 3D extent of a zone attached to a graph node.
Fields§
§size_x: f64§size_y: f64§size_z: f64Implementations§
Source§impl ZoneExtent
impl ZoneExtent
pub fn new( size_x: f64, size_y: f64, size_z: f64, ) -> Result<Self, ZoneExtentError>
pub fn cube(size: f64) -> Result<Self, ZoneExtentError>
pub fn contains(&self, p: &ContinuousPos3D) -> bool
pub fn clamp(&self, p: &ContinuousPos3D) -> ContinuousPos3D
pub fn center(&self) -> ContinuousPos3D
Trait Implementations§
Source§impl Clone for ZoneExtent
impl Clone for ZoneExtent
Source§fn clone(&self) -> ZoneExtent
fn clone(&self) -> ZoneExtent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZoneExtent
impl Debug for ZoneExtent
Source§impl Default for ZoneExtent
impl Default for ZoneExtent
impl Copy for ZoneExtent
Auto Trait Implementations§
impl Freeze for ZoneExtent
impl RefUnwindSafe for ZoneExtent
impl Send for ZoneExtent
impl Sync for ZoneExtent
impl Unpin for ZoneExtent
impl UnsafeUnpin for ZoneExtent
impl UnwindSafe for ZoneExtent
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