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 all loaded points whose 3D position lies inside region.
Performs real axis-aligned point-in-box testing against the coordinates
captured by Self::update_data. Returns (and stores) the indices of the
contained points; an empty result now genuinely means “no point is inside
the box” rather than “unimplemented”.
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 the point nearest to the given screen-space position.
Picking is performed against the orthographic (x, y) projection of the stored point positions: the closest point within the configured pick radius is highlighted. This is a real nearest-point query rather than a stub that always returned nothing.
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 UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.