Hatch Game Engine Documentation v1.4.0
The documentation for the Hatch Game Engine
Loading...
Searching...
No Matches
View Class Reference

View manipulation functions. More...

Public Member Functions

void SetX (integer viewIndex, number x)
 Sets the x-axis position of the camera for the specified view.
void SetY (integer viewIndex, number y)
 Sets the y-axis position of the camera for the specified view.
void SetZ (integer viewIndex, number z)
 Sets the z-axis position of the camera for the specified view.
void SetPosition (integer viewIndex, number x, number y, number z)
 Sets the position of the camera for the specified view.
void AdjustX (integer viewIndex, number x)
 Adjusts the x-axis position of the camera for the specified view by an amount.
void AdjustY (integer viewIndex, number y)
 Adjusts the y-axis position of the camera for the specified view by an amount.
void AdjustZ (integer viewIndex, number z)
 Adjusts the z-axis position of the camera for the specified view by an amount.
void SetScale (integer viewIndex, number x, number y, number z)
 Sets the scale of the camera for the specified view.
void SetAngle (integer viewIndex, number x, number y, number z)
 Sets the angle of the camera for the specified view.
void SetSize (integer viewIndex, number width, number height)
 Sets the size of the camera for the specified view.
void SetOutputX (integer viewIndex, number x)
 Sets the x-axis output position of the specified view.
void SetOutputY (integer viewIndex, number y)
 Sets the y-axis output position of the specified view.
void SetOutputPosition (integer viewIndex, number x, number y)
 Sets the output position of the specified view.
void SetOutputSize (integer viewIndex, number width, number height)
 Sets the output size of the specified view.
decimal GetX (integer viewIndex)
 Gets the x-axis position of the camera for the specified view.
decimal GetY (integer viewIndex)
 Gets the y-axis position of the camera for the specified view.
decimal GetZ (integer viewIndex)
 Gets the z-axis position of the camera for the specified view.
decimal GetWidth (integer viewIndex)
 Gets the width of the camera for the specified view.
decimal GetHeight (integer viewIndex)
 Gets the height of the camera for the specified view.
decimal GetCenterX (integer viewIndex)
 Gets the x center of the camera for the specified view.
decimal GetCenterY (integer viewIndex)
 Gets the y center of the camera for the specified view.
boolean IsUsingDrawTarget (integer viewIndex)
 Gets whether the specified camera is using a draw target.
void SetUseDrawTarget (integer viewIndex, boolean useDrawTarget)
 Sets the specified camera to use a draw target.
integer GetDrawTarget (integer viewIndex)
 Gets the specified camera's draw target.
void SetShader (integer viewIndex, Shader shader)
 Sets a shader for the specified camera.
Shader GetShader (integer viewIndex)
 Gets the shader of the specified camera.
boolean IsUsingSoftwareRenderer (integer viewIndex)
 Gets whether the specified camera is using the software renderer.
void SetUseSoftwareRenderer (integer viewIndex, boolean useSoftwareRenderer)
 Sets the specified camera to use the software renderer.
void SetUsePerspective ()
boolean IsEnabled (integer viewIndex)
 Gets whether the specified camera is active.
void SetEnabled (integer viewIndex, boolean enabled)
 Sets the specified camera to be active.
boolean IsVisible (integer viewIndex)
 Gets whether the specified camera is visible.
void SetVisible (integer viewIndex, boolean visible)
 Sets the specified camera to be visible.
void SetFieldOfView ()
integer SetPriority (integer viewIndex)
 Gets the specified view's priority.
void GetPriority (integer viewIndex, integer priority)
 Gets the specified view's priority.
integer GetCurrent ()
 Gets the current view index being drawn to.
integer GetCount ()
 Gets the total amount of views.
integer GetActiveCount ()
 Gets the total amount of views currently activated.
boolean CheckOnScreen (Entity entity, decimal rangeX, decimal rangeY)
 Determines whether an instance is on screen.
boolean CheckPosOnScreen (decimal posX, decimal posY, decimal rangeX, decimal rangeY)
 Determines whether a position is on screen.

Detailed Description

View manipulation functions.

Member Function Documentation

◆ AdjustX()

void View.AdjustX ( integer viewIndex,
number x )

Adjusts the x-axis position of the camera for the specified view by an amount.

Parameters
viewIndexIndex of the view.
xDesired X adjust amount.

◆ AdjustY()

void View.AdjustY ( integer viewIndex,
number y )

Adjusts the y-axis position of the camera for the specified view by an amount.

Parameters
viewIndexIndex of the view.
yDesired Y adjust amount.

◆ AdjustZ()

void View.AdjustZ ( integer viewIndex,
number z )

Adjusts the z-axis position of the camera for the specified view by an amount.

Parameters
viewIndexIndex of the view.
zDesired Z adjust amount.

◆ CheckOnScreen()

boolean View.CheckOnScreen ( Entity entity,
decimal rangeX,
decimal rangeY )

Determines whether an instance is on screen.

Parameters
entityThe instance to check.
rangeXThe x range to check, or null if the entity's update region width should be used.
rangeYThe y range to check, or null if the entity's update region height should be used.
Returns
Returns whether the instance is on screen in any view.

◆ CheckPosOnScreen()

boolean View.CheckPosOnScreen ( decimal posX,
decimal posY,
decimal rangeX,
decimal rangeY )

Determines whether a position is on screen.

Parameters
posXThe x position to check.
posYThe y position to check.
rangeXThe x range to check.
rangeYThe y range to check.
Returns
Returns whether the position is on screen in any view.

◆ GetActiveCount()

integer View.GetActiveCount ( )

Gets the total amount of views currently activated.

Returns
Returns an integer value.

◆ GetCenterX()

decimal View.GetCenterX ( integer viewIndex)

Gets the x center of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ GetCenterY()

decimal View.GetCenterY ( integer viewIndex)

Gets the y center of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ GetCount()

integer View.GetCount ( )

Gets the total amount of views.

Returns
Returns an integer value.

◆ GetCurrent()

integer View.GetCurrent ( )

Gets the current view index being drawn to.

Returns
Returns an integer value.

◆ GetDrawTarget()

integer View.GetDrawTarget ( integer viewIndex)

Gets the specified camera's draw target.

Parameters
viewIndexIndex of the view.
Returns
Returns an integer value.

◆ GetHeight()

decimal View.GetHeight ( integer viewIndex)

Gets the height of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ GetPriority()

void View.GetPriority ( integer viewIndex,
integer priority )

Gets the specified view's priority.

Parameters
viewIndexIndex of the view.
priority

◆ GetShader()

Shader View.GetShader ( integer viewIndex)

Gets the shader of the specified camera.

Parameters
viewIndexIndex of the view.
Returns
Returns a Shader, or null.

◆ GetWidth()

decimal View.GetWidth ( integer viewIndex)

Gets the width of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ GetX()

decimal View.GetX ( integer viewIndex)

Gets the x-axis position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ GetY()

decimal View.GetY ( integer viewIndex)

Gets the y-axis position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ GetZ()

decimal View.GetZ ( integer viewIndex)

Gets the z-axis position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
Returns
Returns a decimal value.

◆ IsEnabled()

boolean View.IsEnabled ( integer viewIndex)

Gets whether the specified camera is active.

Parameters
viewIndexIndex of the view.
Returns
Returns a boolean value.

◆ IsUsingDrawTarget()

boolean View.IsUsingDrawTarget ( integer viewIndex)

Gets whether the specified camera is using a draw target.

Parameters
viewIndexIndex of the view.
Returns
Returns a boolean value.

◆ IsUsingSoftwareRenderer()

boolean View.IsUsingSoftwareRenderer ( integer viewIndex)

Gets whether the specified camera is using the software renderer.

Parameters
viewIndexIndex of the view.
Returns
Returns a boolean value.

◆ IsVisible()

boolean View.IsVisible ( integer viewIndex)

Gets whether the specified camera is visible.

Parameters
viewIndexIndex of the view.
Returns
Returns a boolean value.

◆ SetAngle()

void View.SetAngle ( integer viewIndex,
number x,
number y,
number z )

Sets the angle of the camera for the specified view.

Parameters
viewIndexIndex of the view.
xDesired X angle.
yDesired Y angle.
zDesired Z angle.

◆ SetEnabled()

void View.SetEnabled ( integer viewIndex,
boolean enabled )

Sets the specified camera to be active.

Parameters
viewIndexIndex of the view.
enabledWhether the camera should be enabled.

◆ SetOutputPosition()

void View.SetOutputPosition ( integer viewIndex,
number x,
number y )

Sets the output position of the specified view.

Parameters
viewIndexIndex of the view.
xDesired X position.
yDesired Y position.

◆ SetOutputSize()

void View.SetOutputSize ( integer viewIndex,
number width,
number height )

Sets the output size of the specified view.

Parameters
viewIndexIndex of the view.
widthDesired width.
heightDesired height.

◆ SetOutputX()

void View.SetOutputX ( integer viewIndex,
number x )

Sets the x-axis output position of the specified view.

Parameters
viewIndexIndex of the view.
xDesired X position.

◆ SetOutputY()

void View.SetOutputY ( integer viewIndex,
number y )

Sets the y-axis output position of the specified view.

Parameters
viewIndexIndex of the view.
yDesired Y position.

◆ SetPosition()

void View.SetPosition ( integer viewIndex,
number x,
number y,
number z )

Sets the position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
xDesired X position.
yDesired Y position.
zDesired Z position.

◆ SetPriority()

integer View.SetPriority ( integer viewIndex)

Gets the specified view's priority.

Parameters
viewIndexIndex of the view.
Returns
Returns an integer value.

◆ SetScale()

void View.SetScale ( integer viewIndex,
number x,
number y,
number z )

Sets the scale of the camera for the specified view.

Parameters
viewIndexIndex of the view.
xDesired X scale.
yDesired Y scale.
zDesired Z scale.

◆ SetShader()

void View.SetShader ( integer viewIndex,
Shader shader )

Sets a shader for the specified camera.

Parameters
viewIndexIndex of the view.
shaderThe shader, or null to unset the shader.

◆ SetSize()

void View.SetSize ( integer viewIndex,
number width,
number height )

Sets the size of the camera for the specified view.

Parameters
viewIndexIndex of the view.
widthDesired width.
heightDesired height.

◆ SetUseDrawTarget()

void View.SetUseDrawTarget ( integer viewIndex,
boolean useDrawTarget )

Sets the specified camera to use a draw target.

Parameters
viewIndexIndex of the view.
useDrawTargetWhether to use a draw target.

◆ SetUseSoftwareRenderer()

void View.SetUseSoftwareRenderer ( integer viewIndex,
boolean useSoftwareRenderer )

Sets the specified camera to use the software renderer.

Parameters
viewIndexIndex of the view.
useSoftwareRendererWhether to use the software renderer.

◆ SetVisible()

void View.SetVisible ( integer viewIndex,
boolean visible )

Sets the specified camera to be visible.

Parameters
viewIndexIndex of the view.
visibleWhether the camera should be visible.

◆ SetX()

void View.SetX ( integer viewIndex,
number x )

Sets the x-axis position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
xDesired X position.

◆ SetY()

void View.SetY ( integer viewIndex,
number y )

Sets the y-axis position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
yDesired Y position.

◆ SetZ()

void View.SetZ ( integer viewIndex,
number z )

Sets the z-axis position of the camera for the specified view.

Parameters
viewIndexIndex of the view.
zDesired Z position.