Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
SCR_ManualCamera Interface Reference

Entity for managing manual camera and its components. More...

Inheritance diagram for SCR_ManualCamera:
[legend]

Public Member Functions

void SaveComponents (notnull array< ref SCR_ManualCameraComponentSave > outData)
 
void LoadComponents (array< ref SCR_ManualCameraComponentSave > data)
 
void ResetComponents ()
 
SCR_BaseManualCameraComponent FindCameraComponent (TypeName type)
 Find camera component of given type.
 
bool TrySwitchToControlledEntityCamera ()
 
void SwitchToPreviousCamera ()
 
void AttachTo (IEntity parent)
 Attach camera to an entity.
 
void Detach ()
 Detach camera from its parent entity.
 
void SetInputEnabled (bool enable)
 Enable manual input.
 
bool IsInputEnabled ()
 Check if manual input is enabled.
 
float GetDefaultFOV ()
 Get default field of view.
 
bool IsManualInput ()
 Check if the camera was moved manually this frame.
 
void SetDirty (bool isDirty)
 Mark as dirty based on external influence (e.g., when some script teleports the camera)
 
Widget GetWidget ()
 Get widget which individual components can fill.
 
Widget CreateCameraWidget (ResourceName layout, bool isVisible=true)
 Create camera widget.
 
SCR_ManualCameraParam GetCameraParam ()
 Return camera param passed to components in the previous frame.
 
void Terminate ()
 Destroy the camera.
 
void SCR_ManualCamera (IEntitySource src, IEntity parent)
 
void ~SCR_ManualCamera ()
 
- Public Member Functions inherited from SCR_CameraBase
bool IsInView (vector worldPos, WorkspaceWidget workspace=null)
 Check if position is in camera view for given workspace.
 
bool IsInView (vector worldPos, float aspectRatio)
 Check if position is in camera view for given aspect ratio.
 
ScriptInvoker GetOnActivate ()
 
ScriptInvoker GetOnDeactivate ()
 
ScriptInvoker GetOnCameraActivate ()
 
ScriptInvoker GetOnCameraDeactivate ()
 
override void EOnActivate (IEntity owner)
 
override void EOnDeactivate (IEntity owner)
 
override void CameraActivate ()
 Called the moment this camera is activated by CameraManager.
 
override void CameraDeactivate ()
 Called the moment this camera is deactivated by CameraManager.
 
override void _WB_AfterWorldUpdate (float timeSlice)
 
- Public Member Functions inherited from CameraBase
proto external void ApplyTransform (float timeslice)
 Manually applies transformation. This is usually done in EOnPostFrame automatically.
 
proto external void GetWorldCameraTransform (out vector mat[4])
 Get current camera world transformation.
 
proto external IEntity GetCursorTarget ()
 Performs a raycast from the center of this camera in the forward direction.
 
proto external IEntity GetCursorTargetWithPosition (out vector outPosition)
 Performs a raycast from the center of this camera in the forward direction.
 
proto external CameraType GetProjType ()
 Get projection type.
 
proto external float GetVerticalFOV ()
 Get the vertical FOV.
 
proto external float GetNearPlane ()
 Get the current near plane clipping value.
 
proto external float GetFarPlane ()
 Get the current far plane clipping value.
 
proto external void SetFOVDegree (float fovDegrees)
 Set full symmetrical vertical FOV in degrees.
 
proto external void SetVerticalFOV (float fov)
 Set the vertical FOV.
 
proto external void SetNearPlane (float nearPlane)
 Set the current near plane clipping value.
 
proto external void SetFarPlane (float farPlane)
 Set the current far plane value.
 
proto external void SetCameraIndex (int cameraIndex)
 Set the current camera index.
 
proto external int GetCameraIndex ()
 Get the current camera index.
 
proto external void SetLensFlareSet (CameraLensFlareSetType type, string userName)
 Sets camera lens flare set.
 
proto external bool IsAABBVisible (vector mins, vector maxs)
 Test if the AABB is visible against the view frustum of the camera.
 
proto external bool IsSphereVisible (vector origin, float radius)
 Test if the sphere is visible against the view frustum of the camera.
 

Protected Member Functions

void RegisterComponents ()
 
void InitComponents ()
 
void ProcessComponents (float timeSlice=0)
 
void MoveToCamera (CameraBase camera=null)
 
CameraBase GetPreviousCamera ()
 
bool IsFirstCamera ()
 
bool IsDisabledByMenu ()
 
override void EOnPostFrame (IEntity owner, float timeSlice)
 
override void EOnInit (IEntity owner)
 
void CameraActivate ()
 Called the moment this camera is activated by CameraManager.
 
void CameraDeactivate ()
 Called the moment this camera is deactivated by CameraManager.
 

Additional Inherited Members

- Protected Attributes inherited from SCR_CameraBase
bool m_bShowDebugViewCone
 

Detailed Description

Entity for managing manual camera and its components.

The entity itself does not handle any input. Instead, it calls functions in components which each take care of a specific feature, e.g., a component for basic movement, a component for speed boost, etc.

Constructor & Destructor Documentation

◆ SCR_ManualCamera()

void SCR_ManualCamera.SCR_ManualCamera ( IEntitySource  src,
IEntity  parent 
)
Parameters
src
parent

◆ ~SCR_ManualCamera()

void SCR_ManualCamera.~SCR_ManualCamera ( )

Member Function Documentation

◆ AttachTo()

void SCR_ManualCamera.AttachTo ( IEntity  parent)

Attach camera to an entity.

Parameters
parentTarget entity

◆ CreateCameraWidget()

Widget SCR_ManualCamera.CreateCameraWidget ( ResourceName  layout,
bool  isVisible = true 
)

Create camera widget.

Parameters
layoutGUI layout path
isVisibleTrue if the widget should be visible by default
Returns

◆ Detach()

void SCR_ManualCamera.Detach ( )

Detach camera from its parent entity.

◆ EOnInit()

override void SCR_ManualCamera.EOnInit ( IEntity  owner)
protected

◆ EOnPostFrame()

override void SCR_ManualCamera.EOnPostFrame ( IEntity  owner,
float  timeSlice 
)
protected

◆ FindCameraComponent()

SCR_BaseManualCameraComponent SCR_ManualCamera.FindCameraComponent ( TypeName  type)

Find camera component of given type.

Parameters
typeComponent type
Returns
Component, or null when not found

◆ GetCameraParam()

SCR_ManualCameraParam SCR_ManualCamera.GetCameraParam ( )

Return camera param passed to components in the previous frame.

Returns
Camera param

◆ GetDefaultFOV()

float SCR_ManualCamera.GetDefaultFOV ( )

Get default field of view.

Returns
Default FOV

◆ GetPreviousCamera()

CameraBase SCR_ManualCamera.GetPreviousCamera ( )
protected

◆ GetWidget()

Widget SCR_ManualCamera.GetWidget ( )

Get widget which individual components can fill.

Returns

◆ InitComponents()

void SCR_ManualCamera.InitComponents ( )
protected

◆ IsDisabledByMenu()

bool SCR_ManualCamera.IsDisabledByMenu ( )
protected

◆ IsFirstCamera()

bool SCR_ManualCamera.IsFirstCamera ( )
protected

◆ IsInputEnabled()

bool SCR_ManualCamera.IsInputEnabled ( )

Check if manual input is enabled.

Returns
True when input is enabled

◆ IsManualInput()

bool SCR_ManualCamera.IsManualInput ( )

Check if the camera was moved manually this frame.

Returns
True if manual input was given

◆ LoadComponents()

void SCR_ManualCamera.LoadComponents ( array< ref SCR_ManualCameraComponentSave data)
Parameters
data

◆ MoveToCamera()

void SCR_ManualCamera.MoveToCamera ( CameraBase  camera = null)
protected

◆ ProcessComponents()

void SCR_ManualCamera.ProcessComponents ( float  timeSlice = 0)
protected

SCR_Math3D.MatrixEqual(transform, m_vTransformPrev);

◆ RegisterComponents()

void SCR_ManualCamera.RegisterComponents ( )
protected

◆ ResetComponents()

void SCR_ManualCamera.ResetComponents ( )

◆ SaveComponents()

void SCR_ManualCamera.SaveComponents ( notnull array< ref SCR_ManualCameraComponentSave outData)
Parameters
outData

◆ SetDirty()

void SCR_ManualCamera.SetDirty ( bool  isDirty)

Mark as dirty based on external influence (e.g., when some script teleports the camera)

Parameters
isDirtyTrue when dirty

◆ SetInputEnabled()

void SCR_ManualCamera.SetInputEnabled ( bool  enable)

Enable manual input.

Parameters
enabletrue to enable input, false to disable it

◆ SwitchToPreviousCamera()

void SCR_ManualCamera.SwitchToPreviousCamera ( )

◆ Terminate()

void SCR_ManualCamera.Terminate ( )

Destroy the camera.

Deinitializes components in this frame. Calling 'delete' would also destroy the camera, but components would be terminated only in the next frame when called from destructor.

◆ TrySwitchToControlledEntityCamera()

bool SCR_ManualCamera.TrySwitchToControlledEntityCamera ( )
Returns

The documentation for this interface was generated from the following file: