pub struct Plot3DContext { /* private fields */ }Expand description
Plot3D context wrapper
This manages the ImPlot3D context lifetime. Create one instance per application and keep it alive for the duration of your program.
§Example
use dear_imgui_rs::*;
use dear_implot3d::*;
let mut imgui_ctx = Context::create();
let plot3d_ctx = Plot3DContext::create(&imgui_ctx);
// In your main loop:
let ui = imgui_ctx.frame();
let plot_ui = plot3d_ctx.get_plot_ui(&ui);Implementations§
Source§impl Plot3DContext
impl Plot3DContext
Sourcepub fn try_create(_imgui: &Context) -> ImGuiResult<Self>
pub fn try_create(_imgui: &Context) -> ImGuiResult<Self>
Try to create a new ImPlot3D context.
This should be called once after creating your ImGui context.
Sourcepub fn set_as_current(&self)
pub fn set_as_current(&self)
Set this context as the current ImPlot3D context.
Sourcepub fn raw_style_mut() -> *mut ImPlot3DStyle
pub fn raw_style_mut() -> *mut ImPlot3DStyle
Get a raw pointer to the current ImPlot3D style
This is an advanced function for direct style manipulation.
Prefer using the safe style functions in the style module.
Sourcepub fn get_plot_ui<'ui>(&self, ui: &'ui Ui) -> Plot3DUi<'ui>
pub fn get_plot_ui<'ui>(&self, ui: &'ui Ui) -> Plot3DUi<'ui>
Get a per-frame plotting interface
Call this once per frame to get access to plotting functions.
The returned Plot3DUi is tied to the lifetime of the Ui frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Plot3DContext
impl RefUnwindSafe for Plot3DContext
impl !Send for Plot3DContext
impl !Sync for Plot3DContext
impl Unpin for Plot3DContext
impl UnwindSafe for Plot3DContext
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