simvx.core.gizmo

Transform gizmos for 3D scene editing (translate, rotate, scale).

Handles the interaction math for picking and dragging gizmo handles. Actual rendering of gizmo visuals is the graphics backend’s responsibility.

Module Contents

Classes

GizmoMode

Active manipulation mode for the gizmo.

GizmoAxis

Which axis or axis-pair the user is interacting with.

Gizmo

Interactive transform gizmo operating in world space.

Data

API

simvx.core.gizmo.log[source]

‘getLogger(…)’

simvx.core.gizmo.__all__

[‘GizmoMode’, ‘GizmoAxis’, ‘Gizmo’]

class simvx.core.gizmo.GizmoMode[source]

Bases: enum.Enum

Active manipulation mode for the gizmo.

TRANSLATE

‘auto(…)’

ROTATE

‘auto(…)’

SCALE

‘auto(…)’

__new__(value)
__repr__()
__str__()
__dir__()
__format__(format_spec)
__hash__()
__reduce_ex__(proto)
__deepcopy__(memo)
__copy__()
name()
value()
class simvx.core.gizmo.GizmoAxis[source]

Bases: enum.Enum

Which axis or axis-pair the user is interacting with.

X

‘auto(…)’

Y

‘auto(…)’

Z

‘auto(…)’

XY

‘auto(…)’

XZ

‘auto(…)’

YZ

‘auto(…)’

ALL

‘auto(…)’

__new__(value)
__repr__()
__str__()
__dir__()
__format__(format_spec)
__hash__()
__reduce_ex__(proto)
__deepcopy__(memo)
__copy__()
name()
value()
class simvx.core.gizmo.Gizmo[source]

Interactive transform gizmo operating in world space.

Supports three manipulation modes (translate, rotate, scale) and provides ray-based picking / dragging logic. The graphics backend is responsible for drawing the visual handles; this class only does the math.

Initialization

property mode: simvx.core.gizmo.GizmoMode
pick_axis(ray_origin: simvx.core.math.types.Vec3, ray_dir: simvx.core.math.types.Vec3) simvx.core.gizmo.GizmoAxis | None[source]

Ray-test the gizmo handles and return the closest hit axis.

For translate/scale modes the handles are axis shafts (thin cylinders) and small plane-pair quads. For rotate mode the handles are three circles (one per principal axis).

Returns None when nothing is hit.

begin_drag(axis: simvx.core.gizmo.GizmoAxis, ray_origin: simvx.core.math.types.Vec3, ray_dir: simvx.core.math.types.Vec3) None[source]

Start a drag interaction on axis.

update_drag(ray_origin: simvx.core.math.types.Vec3, ray_dir: simvx.core.math.types.Vec3) simvx.core.math.types.Vec3[source]

Compute the incremental delta since the last update.

Returns a Vec3 whose meaning depends on the current mode:

  • TRANSLATE – world-space translation delta.

  • ROTATE – (angle_x, angle_y, angle_z) in radians.

  • SCALE – per-axis scale factor delta (centred on 1.0 = no change, returned as additive offset so caller does current_scale += delta).

end_drag() None[source]

Finish dragging and reset internal drag state.

cycle_mode() None[source]

Cycle through TRANSLATE -> ROTATE -> SCALE -> TRANSLATE.