Arma Reforger Script API
|
Entity for managing manual camera and its components. More...
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 |
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.
void SCR_ManualCamera.SCR_ManualCamera | ( | IEntitySource | src, |
IEntity | parent | ||
) |
src | |
parent |
void SCR_ManualCamera.~SCR_ManualCamera | ( | ) |
void SCR_ManualCamera.AttachTo | ( | IEntity | parent | ) |
Attach camera to an entity.
parent | Target entity |
Widget SCR_ManualCamera.CreateCameraWidget | ( | ResourceName | layout, |
bool | isVisible = true |
||
) |
Create camera widget.
layout | GUI layout path |
isVisible | True if the widget should be visible by default |
void SCR_ManualCamera.Detach | ( | ) |
Detach camera from its parent entity.
|
protected |
|
protected |
SCR_BaseManualCameraComponent SCR_ManualCamera.FindCameraComponent | ( | TypeName | type | ) |
Find camera component of given type.
type | Component type |
SCR_ManualCameraParam SCR_ManualCamera.GetCameraParam | ( | ) |
Return camera param passed to components in the previous frame.
float SCR_ManualCamera.GetDefaultFOV | ( | ) |
Get default field of view.
|
protected |
Widget SCR_ManualCamera.GetWidget | ( | ) |
Get widget which individual components can fill.
|
protected |
|
protected |
|
protected |
bool SCR_ManualCamera.IsInputEnabled | ( | ) |
Check if manual input is enabled.
bool SCR_ManualCamera.IsManualInput | ( | ) |
Check if the camera was moved manually this frame.
void SCR_ManualCamera.LoadComponents | ( | array< ref SCR_ManualCameraComponentSave > | data | ) |
data |
|
protected |
|
protected |
SCR_Math3D.MatrixEqual(transform, m_vTransformPrev);
|
protected |
void SCR_ManualCamera.ResetComponents | ( | ) |
void SCR_ManualCamera.SaveComponents | ( | notnull array< ref SCR_ManualCameraComponentSave > | outData | ) |
outData |
void SCR_ManualCamera.SetDirty | ( | bool | isDirty | ) |
Mark as dirty based on external influence (e.g., when some script teleports the camera)
isDirty | True when dirty |
void SCR_ManualCamera.SetInputEnabled | ( | bool | enable | ) |
Enable manual input.
enable | true to enable input, false to disable it |
void SCR_ManualCamera.SwitchToPreviousCamera | ( | ) |
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.
bool SCR_ManualCamera.TrySwitchToControlledEntityCamera | ( | ) |