# {py:mod}`simvx.editor.panels.viewport_math` ```{py:module} simvx.editor.panels.viewport_math ``` ```{autodoc2-docstring} simvx.editor.panels.viewport_math :allowtitles: ``` ## Module Contents ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`project_point ` - ```{autodoc2-docstring} simvx.editor.panels.viewport_math.project_point :summary: ``` * - {py:obj}`project_direction ` - ```{autodoc2-docstring} simvx.editor.panels.viewport_math.project_direction :summary: ``` * - {py:obj}`gizmo_screen_length ` - ```{autodoc2-docstring} simvx.editor.panels.viewport_math.gizmo_screen_length :summary: ``` * - {py:obj}`rotate_axis_to_screen ` - ```{autodoc2-docstring} simvx.editor.panels.viewport_math.rotate_axis_to_screen :summary: ``` * - {py:obj}`grid_snap_origin ` - ```{autodoc2-docstring} simvx.editor.panels.viewport_math.grid_snap_origin :summary: ``` ```` ### API ````{py:function} project_point(vp_matrix: numpy.ndarray, world_pos, vx: float, vy: float, vw: float, vh: float) -> tuple[float, float, float] | None :canonical: simvx.editor.panels.viewport_math.project_point ```{autodoc2-docstring} simvx.editor.panels.viewport_math.project_point ``` ```` ````{py:function} project_direction(vp_matrix: numpy.ndarray, origin: simvx.core.Vec3, direction: simvx.core.Vec3, axis_length: float, vx: float, vy: float, vw: float, vh: float) -> tuple[tuple[float, float], tuple[float, float]] | None :canonical: simvx.editor.panels.viewport_math.project_direction ```{autodoc2-docstring} simvx.editor.panels.viewport_math.project_direction ``` ```` ````{py:function} gizmo_screen_length(vp_matrix: numpy.ndarray, world_origin: simvx.core.Vec3, vx: float, vy: float, vw: float, vh: float, target_px: float = 100.0) -> float :canonical: simvx.editor.panels.viewport_math.gizmo_screen_length ```{autodoc2-docstring} simvx.editor.panels.viewport_math.gizmo_screen_length ``` ```` ````{py:function} rotate_axis_to_screen(world_dir: simvx.core.Vec3, yaw_rad: float, pitch_rad: float) -> tuple[float, float] :canonical: simvx.editor.panels.viewport_math.rotate_axis_to_screen ```{autodoc2-docstring} simvx.editor.panels.viewport_math.rotate_axis_to_screen ``` ```` ````{py:function} grid_snap_origin(pivot_x: float, pivot_z: float, major_step: float) -> tuple[float, float] :canonical: simvx.editor.panels.viewport_math.grid_snap_origin ```{autodoc2-docstring} simvx.editor.panels.viewport_math.grid_snap_origin ``` ````