GizmoEditorSystem
in package
implements
SystemInterface
Table of Contents
Interfaces
Constants
- INPUT_CONTEXT = 'visu/dev/gizmo'
- The input contetx string for the gizmo
Properties
- $activeAxis : int
- The currently translated axis
- $activeGizmoEntity : int
- The active gizmo entity, entity currently beeing edited
- $cursorPositionQueue : SignalQueue<string|int, CursorPosSignal>
- Mouse position queue
- $dispatcher : Dispatcher
- $gizmoAABB : array<string, AABB>
- AABBs of the gizmo geometry
- $gizmoIntersectionDistance : float
- The distance of the gizmo intersection to the camera when the gizmo was selected
- $gizmoIntersectionPos : Vec3|null
- The inital world space position of the gizmo intersection
- $gizmoShader : ShaderProgram
- The shader program for the gizmo geometry
- $gizmoTranslationInitial : null|Vec3
- The inital world space translation of the gizmo entity
- $gizmoVA : BasicVertexArray
- The Vertex array for the gizmo geometry
- $gl : GLState
- $input : Input
- $lastFrameRenderTarget : RenderTarget
- Last frame render target
- $mouseClickListenerId : int|null
- The mouse click event listener id
- $shaders : ShaderCollection
- $vaLocations : array<string, array<int, int>>
- Vertex array locations of the gizmo geometry
Methods
- __construct() : mixed
- Constructor
- register() : void
- Registers the system, this is where you should register all required components.
- render() : void
- Handles rendering of the scene, here you can attach additional render passes, modify the render pipeline or customize rendering related data.
- unregister() : void
- Unregisters the system, this is where you can handle any cleanup.
- update() : void
- Updates handler, this is where the game state should be updated.
Constants
INPUT_CONTEXT
The input contetx string for the gizmo
private
mixed
INPUT_CONTEXT
= 'visu/dev/gizmo'
Properties
$activeAxis
The currently translated axis
private
int
$activeAxis
= 0
0 = none, 1 = x, 2 = y, 3 = z
$activeGizmoEntity
The active gizmo entity, entity currently beeing edited
private
int
$activeGizmoEntity
= 0
$cursorPositionQueue
Mouse position queue
private
SignalQueue<string|int, CursorPosSignal>
$cursorPositionQueue
$dispatcher
private
Dispatcher
$dispatcher
$gizmoAABB
AABBs of the gizmo geometry
private
array<string, AABB>
$gizmoAABB
= []
$gizmoIntersectionDistance
The distance of the gizmo intersection to the camera when the gizmo was selected
private
float
$gizmoIntersectionDistance
= 0
$gizmoIntersectionPos
The inital world space position of the gizmo intersection
private
Vec3|null
$gizmoIntersectionPos
= null
$gizmoShader
The shader program for the gizmo geometry
private
ShaderProgram
$gizmoShader
$gizmoTranslationInitial
The inital world space translation of the gizmo entity
private
null|Vec3
$gizmoTranslationInitial
= null
$gizmoVA
The Vertex array for the gizmo geometry
private
BasicVertexArray
$gizmoVA
$gl
private
GLState
$gl
$input
private
Input
$input
$lastFrameRenderTarget
Last frame render target
private
RenderTarget
$lastFrameRenderTarget
$mouseClickListenerId
The mouse click event listener id
private
int|null
$mouseClickListenerId
= null
$shaders
private
ShaderCollection
$shaders
$vaLocations
Vertex array locations of the gizmo geometry
private
array<string, array<int, int>>
$vaLocations
= []
offset, size of each object
Methods
__construct()
Constructor
public
__construct(GLState $gl, ShaderCollection $shaders, Dispatcher $dispatcher, Input $input) : mixed
Parameters
- $gl : GLState
- $shaders : ShaderCollection
- $dispatcher : Dispatcher
- $input : Input
register()
Registers the system, this is where you should register all required components.
public
register(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface
render()
Handles rendering of the scene, here you can attach additional render passes, modify the render pipeline or customize rendering related data.
public
render(EntitiesInterface $entities, RenderContext $context) : void
Parameters
- $entities : EntitiesInterface
- $context : RenderContext
unregister()
Unregisters the system, this is where you can handle any cleanup.
public
unregister(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface
update()
Updates handler, this is where the game state should be updated.
public
update(EntitiesInterface $entities) : void
Parameters
- $entities : EntitiesInterface