VISU - PHP Game Framework

VISUCameraSystem
in package
implements SystemInterface

Table of Contents

Interfaces

SystemInterface

Constants

CAMERA_MODE_FLYING  = 1
CAMERA_MODE_GAME  = 0
Camera modes

Properties

$activeCameraEntity  : int
The currently active camera entity
$dispatcher  : Dispatcher
$input  : Input
$visuCameraMode  : int
Current camera mode, this basically determines the subroutine that is used to update the camera
$cameraEuler  : Vec2
Euler angles for default camera
$inputCursorQueue  : SignalQueue<string|int, CursorPosSignal>
Cursor input queue
$inputScrollQueue  : SignalQueue<string|int, ScrollSignal>
Mouse Scroll input queue

Methods

__construct()  : mixed
Constructor
getActiveCamera()  : Camera
Returns the active camera object or throws an exception if no camera is set, or cannot be retrieved.
getActiveCameraEntity()  : int
Returns the active camera entity
getCameraData()  : CameraData
Create a camera data structure for the given render target.
handleCursorPos()  : void
Cursor position handler
handleScroll()  : void
Scroll wheel handler
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.
setActiveCameraEntity()  : void
Sets the currently active camera entity
spawnDefaultFlyingCamera()  : int
Spwans a default flying camera entity
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.
updateGameCamera()  : void
Override this method to update the camera in game mode
updateVISUFlyingCamera()  : void
Flying camera mode update
handleCursorPosVISUGame()  : void
Override this method to handle the cursor position in game mode
handleScrollVISUGame()  : void
Override this method to handle the scroll wheel in game mode
handleCursorPosVISUFlying()  : void
Cursor position handler
handleScrollVISUFlying()  : void
Scroll wheel handler

Constants

Properties

$activeCameraEntity

The currently active camera entity

public int $activeCameraEntity = 0

$visuCameraMode

Current camera mode, this basically determines the subroutine that is used to update the camera

protected int $visuCameraMode = self::CAMERA_MODE_FLYING

Methods

getActiveCameraEntity()

Returns the active camera entity

public getActiveCameraEntity() : int
Return values
int

setActiveCameraEntity()

Sets the currently active camera entity

public setActiveCameraEntity(int $entity) : void
Parameters
$entity : int

spawnDefaultFlyingCamera()

Spwans a default flying camera entity

public spawnDefaultFlyingCamera(EntitiesInterface $entities[, Vec3|null $position = null ]) : int
Parameters
$entities : EntitiesInterface
$position : Vec3|null = null
Return values
int

        
On this page

Search results