pub struct View3D {
pub azimuth: f64,
pub elevation: f64,
}Expand description
Viewing angles for 3D projection.
Fields§
§azimuth: f64Azimuth angle in degrees (rotation around Z-axis). Default: -60.
elevation: f64Elevation angle in degrees (rotation from XY-plane). Default: 30.
Implementations§
Source§impl View3D
impl View3D
Sourcepub fn front_bottom_corner(&self) -> (f64, f64)
pub fn front_bottom_corner(&self) -> (f64, f64)
Find the floor-face corner closest to the viewer (smallest depth). Returns the normalized (x, y) signs of that corner, e.g. (0.5, -0.5). This is the “open front corner” where axes originate.
For positive elevation the floor is z=-0.5; for negative elevation (viewing from below) the floor is z=+0.5.
Sourcepub fn auto_z_axis_right(&self) -> bool
pub fn auto_z_axis_right(&self) -> bool
Derive which screen side the Z axis should appear on for this view.
When the front corner is at fc_x >= 0 (e.g. default azimuth -60°),
the rightmost back edge is the natural Z axis position. When the view
is mirrored (fc_x < 0, e.g. azimuth +60°), the leftmost edge reads
more naturally. This matches matplotlib’s default behaviour across all
azimuths without the user needing to know about it.
Trait Implementations§
impl Copy for View3D
Auto Trait Implementations§
impl Freeze for View3D
impl RefUnwindSafe for View3D
impl Send for View3D
impl Sync for View3D
impl Unpin for View3D
impl UnsafeUnpin for View3D
impl UnwindSafe for View3D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.