Size3D
struct · ferroui-media3d · v0.5.0
struct Size3D
The extent of a box in 3D space, with double-precision dimensions (WPF's
System.Windows.Media.Media3D.Size3D).
A dimension is never negative, except in Size3D::EMPTY, the size of no box, whose dimensions
are negative infinity. The members that WPF guards with exceptions return a Size3DError.
Members
EMPTY
const EMPTY: Size3D
The size of no box (WPF's Size3D.Empty): every dimension negative infinity.
new
fn new(x: f64, y: f64, z: f64) -> Result<Self, Size3DError>
A size with the given dimensions; Size3DError::NegativeDimension when one is negative.
is_empty
fn is_empty(self: &Self) -> bool
Whether this is Size3D::EMPTY.
x
fn x(self: &Self) -> f64
The extent along the X axis.
y
fn y(self: &Self) -> f64
The extent along the Y axis.
z
fn z(self: &Self) -> f64
The extent along the Z axis.
set_x
fn set_x(self: &mut Self, value: f64) -> Result<(), Size3DError>
Sets the extent along the X axis.
set_y
fn set_y(self: &mut Self, value: f64) -> Result<(), Size3DError>
Sets the extent along the Y axis.
set_z
fn set_z(self: &mut Self, value: f64) -> Result<(), Size3DError>
Sets the extent along the Z axis.
parse
fn parse(text: &str) -> Result<Self, FormatError>
Parses the text form: "Empty", or "x,y,z" (commas, white space or both between the
numbers) in the invariant culture, none of them negative.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherMarkupTypedCloneCopyDebugStructuralPartialEqPartialEqDefaultFrom<Size3D>FromStrDisplayFrom<Vector3D>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.