pub struct Plot3DState {
pub tool: Plot3DTool,
/* private fields */
}Expand description
The interactive state of one 3D plot. Keep it in the application model.
Fields§
§tool: Plot3DToolThe tool the primary button uses.
Implementations§
Source§impl Plot3DState
impl Plot3DState
Sourcepub fn camera(&self) -> Option<Camera3D>
pub fn camera(&self) -> Option<Camera3D>
The camera the user moved to, or None while the view is automatic.
Sourcepub fn set_camera(&mut self, camera: Camera3D)
pub fn set_camera(&mut self, camera: Camera3D)
Place the camera explicitly.
Sourcepub fn reset_view(&mut self)
pub fn reset_view(&mut self)
Fit the data again and return to the configured camera angles.
Sourcepub fn is_auto(&self) -> bool
pub fn is_auto(&self) -> bool
Whether the camera follows the data (no orbit, pan, or zoom since the last reset).
Sourcepub fn legend_position(&self) -> Option<[f32; 2]>
pub fn legend_position(&self) -> Option<[f32; 2]>
Where the legend was dragged to, as fractions of the free room.
Sourcepub fn set_legend_position(&mut self, position: Option<[f32; 2]>)
pub fn set_legend_position(&mut self, position: Option<[f32; 2]>)
Place the legend; None returns it to its configured corner.
Whether the legend has hidden the series called name.
Show or hide a series by name.
Sourcepub fn hovered_series(&self) -> Option<usize>
pub fn hovered_series(&self) -> Option<usize>
The series whose legend row is under the pointer, if any.
Trait Implementations§
Source§impl Clone for Plot3DState
impl Clone for Plot3DState
Source§impl Debug for Plot3DState
impl Debug for Plot3DState
Source§impl Default for Plot3DState
impl Default for Plot3DState
Source§impl<'de> Deserialize<'de> for Plot3DState
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Plot3DState
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Plot3DState
impl Freeze for Plot3DStatewhere
*const u8 is !null: Freeze,
PhantomData<String>: Freeze,
PhantomData<(u64, Bounds3D)>: Freeze,
impl Move for Plot3DState
impl RefUnwindSafe for Plot3DState
impl Send for Plot3DStatewhere
RawVecInner: Send,
impl Sync for Plot3DStatewhere
RawVecInner: Sync,
impl Unpin for Plot3DState
impl UnsafeUnpin for Plot3DStatewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(u64, Bounds3D)>: UnsafeUnpin,
impl UnwindSafe for Plot3DStatewhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more