simvx.graphics.renderer.outline_pass

Selection outline rendering — backface hull expansion technique.

Renders selected objects with front-face culling and slight vertex expansion along normals, producing a coloured outline around selected geometry. Operates within the existing render pass (no stencil required).

Module Contents

Classes

OutlinePass

Draws coloured outlines around selected objects using backface hull expansion.

Data

API

simvx.graphics.renderer.outline_pass.__all__

[‘OutlinePass’]

simvx.graphics.renderer.outline_pass.log[source]

‘getLogger(…)’

class simvx.graphics.renderer.outline_pass.OutlinePass(engine: Any)[source]

Draws coloured outlines around selected objects using backface hull expansion.

Technique: render selected meshes with front-face culling and vertices expanded along their normals. Only the “rim” of the expanded mesh is visible, creating an outline effect. Works without stencil support.

Attributes: outline_colour: RGBA outline colour (default: orange). outline_width: Controls vertex expansion magnitude (default: 3.0). enabled: Toggle outline rendering on/off.

Initialization

setup() None[source]

Create outline pipeline and GPU resources.

set_outline_colour(colour: tuple[float, float, float, float]) None[source]

Update outline colour. Requires pipeline recreation.

render(cmd: Any, selected_instances: list[tuple[simvx.graphics._types.MeshHandle, numpy.ndarray, int]], view_proj_data: bytes, registry: Any, extent: tuple[int, int]) None[source]

Record outline draw commands for selected objects.

Args: cmd: Active command buffer (inside render pass). selected_instances: List of (mesh_handle, transform_4x4, material_id) for selected objects. view_proj_data: Pre-packed view+proj push constant bytes (128 bytes, column-major). registry: MeshRegistry for vertex/index buffer lookup. extent: Framebuffer (width, height).

cleanup() None[source]

Release all GPU resources.