pub struct InteractiveVisualizer { /* private fields */ }Expand description
Interactive 3D visualizer
Implementations§
Source§impl InteractiveVisualizer
impl InteractiveVisualizer
Sourcepub fn new(config: InteractiveConfig) -> Self
pub fn new(config: InteractiveConfig) -> Self
Create a new interactive visualizer
Sourcepub fn update_data<F: Float + FromPrimitive + Debug>(
&mut self,
data: ArrayView2<'_, F>,
labels: &Array1<i32>,
centroids: Option<&Array2<F>>,
) -> Result<()>
pub fn update_data<F: Float + FromPrimitive + Debug>( &mut self, data: ArrayView2<'_, F>, labels: &Array1<i32>, centroids: Option<&Array2<F>>, ) -> Result<()>
Update visualization with new data
Sourcepub fn handle_mouse_input(
&mut self,
button: MouseButton,
position: (f64, f64),
pressed: bool,
)
pub fn handle_mouse_input( &mut self, button: MouseButton, position: (f64, f64), pressed: bool, )
Handle mouse input
Sourcepub fn handle_keyboard_input(&mut self, key: KeyCode, pressed: bool)
pub fn handle_keyboard_input(&mut self, key: KeyCode, pressed: bool)
Handle keyboard input
Sourcepub fn handle_touch_input(&mut self, touchpoints: Vec<TouchPoint>)
pub fn handle_touch_input(&mut self, touchpoints: Vec<TouchPoint>)
Handle touch input for mobile/tablet interfaces
Sourcepub fn select_points_in_region(&mut self, region: BoundingBox3D) -> Vec<usize>
pub fn select_points_in_region(&mut self, region: BoundingBox3D) -> Vec<usize>
Select points within a 3D region
Sourcepub fn highlight_points_at(&mut self, screenpos: (f64, f64)) -> Vec<usize>
pub fn highlight_points_at(&mut self, screenpos: (f64, f64)) -> Vec<usize>
Highlight points at screen coordinates
Sourcepub fn get_cluster_stats(&self) -> &HashMap<i32, ClusterStats>
pub fn get_cluster_stats(&self) -> &HashMap<i32, ClusterStats>
Get current cluster statistics
Sourcepub fn get_state(&self) -> &InteractiveState
pub fn get_state(&self) -> &InteractiveState
Get current interactive state
Sourcepub fn set_camera_position(&mut self, position: (f64, f64, f64))
pub fn set_camera_position(&mut self, position: (f64, f64, f64))
Set camera position
Sourcepub fn set_camera_target(&mut self, target: (f64, f64, f64))
pub fn set_camera_target(&mut self, target: (f64, f64, f64))
Set camera target
Sourcepub fn set_view_mode(&mut self, mode: ViewMode)
pub fn set_view_mode(&mut self, mode: ViewMode)
Set view mode
Sourcepub fn set_animation_playing(&mut self, playing: bool)
pub fn set_animation_playing(&mut self, playing: bool)
Enable/disable animation playback
Sourcepub fn set_current_time(&mut self, time: f64)
pub fn set_current_time(&mut self, time: f64)
Set current time for temporal views
Sourcepub fn export_view_state(&self) -> Result<String>
pub fn export_view_state(&self) -> Result<String>
Generate export data for current view
Auto Trait Implementations§
impl Freeze for InteractiveVisualizer
impl RefUnwindSafe for InteractiveVisualizer
impl Send for InteractiveVisualizer
impl Sync for InteractiveVisualizer
impl Unpin for InteractiveVisualizer
impl UnwindSafe for InteractiveVisualizer
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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.