Skip to main content

Module widgets

Module widgets 

Source
Expand description

Interactive 3D probe and region widgets (line probe, sphere, box). Interactive 3D probe and region widgets.

Each widget is a pure CPU state struct (like Gizmo) that the host app owns. Push render items from the widget into SceneFrame each frame, call update() to advance state, and read public fields for results.

Suppress orbit while a widget is active using the same pattern as ManipulationController:

if probe.is_active() {
    orbit.resolve();
} else {
    orbit.apply_to_camera(&mut camera);
}

Re-exports§

pub use box_widget::BoxWidget;
pub use cylinder::CylinderWidget;
pub use disk::DiskWidget;
pub use line_probe::LineProbeWidget;
pub use plane::PlaneWidget;
pub use polyline_widget::PolylineWidget;
pub use sphere::SphereWidget;
pub use spline::SplineWidget;

Modules§

box_widget
Box widget: draggable center, face, and rotation-arc handles for an oriented box.
cylinder
Cylinder widget: two endpoint handles controlling the axis, plus a radius handle.
disk
Disk widget: a bounded circular plane with center, normal, and radius handles.
line_probe
Line probe widget: two draggable endpoint handles connected by a line segment.
plane
Plane widget: a draggable infinite plane defined by a center point and normal.
polyline_widget
Polyline widget: N draggable waypoints connected by straight line segments.
sphere
Sphere widget: draggable center handle and radius handle.
spline
Spline widget: N draggable control points connected by a Catmull-Rom spline.

Structs§

WidgetContext
Per-frame input state passed to widget update() methods.

Enums§

WidgetResult
Result returned by widget update() calls.