Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_SightsZoomFOVInfo Interface Reference
Inheritance diagram for SCR_SightsZoomFOVInfo:
[legend]

Public Member Functions

override int GetCount ()
 Returns the number of available elements.
 
override int GetCurrentIndex ()
 Returns currently selected element or -1 if none.
 
override void SetIndex (int index)
 Set provided element as the current one.
 
array< float > ZoomsToArray ()
 Get array of each zoom based on min-max and steps in between.
 
void InsertFov (float fov)
 Add new fov based on reticle range and zoom.
 
int GetStepsCount ()
 
void SetCurrentFov (float fov)
 
float GetCurrentZoom ()
 
float GetBaseZoom ()
 
override float GetBaseFOV ()
 Returns max field of view provided by this info.
 
override bool IsAdjusting ()
 Returns true when current FOV of the optic does not match the target FOV.
 
void ForceUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
 
ScriptInvoker GetEventOnZoomChanged ()
 
- Public Member Functions inherited from SCR_BaseVariableSightsFOVInfo
int GetCount ()
 Returns the number of available elements.
 
int GetCurrentIndex ()
 Returns currently selected element or -1 if none.
 
bool SetNext (bool allowOverflow=true)
 Selects next available element.
 
bool SetPrevious (bool allowUnderflow=true)
 Selects previous available element.
 
bool IsAdjusting ()
 Returns true when current FOV of the optic does not match the target FOV.
 
float GetBaseFOV ()
 Returns true when current FOV of the optic does not match the target FOV.
 
- Public Member Functions inherited from SightsFOVInfo
proto external float GetFOV ()
 Returns current field of view provided by this info.
 

Protected Member Functions

override void OnInit (IEntity owner, BaseSightsComponent sights)
 Called on initialization.
 
override void OnUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
 Called every frame when active to update current state.
 
override float GetCurrentFOV ()
 Returns current field of view provided by this info.
 
float GetZoom (int i, int count)
 
void InvokeOnZoomChanged (float zoom, float fov)
 
- Protected Member Functions inherited from SCR_BaseVariableSightsFOVInfo
int GetNextIndex (bool allowOverflow=true)
 Returns the index of next available element.
 
int GetPreviousIndex (bool allowUnderflow=true)
 Returns the index of previous available element.
 
void SetIndex (int index)
 Set provided element as the current one.
 
void OnInit (IEntity owner, BaseSightsComponent sights)
 Called on initialization.
 
void OnUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
 Called every frame when active to update current state.
 
float GetCurrentFOV ()
 Return current field of view of this info.
 

Protected Attributes

float m_fBaseZoom
 
float m_fZoomMax
 
float m_fStepZoomSize
 
float m_fInterpolationSpeed
 
ref array< float > m_aFOVs = new array<float>
 
int m_iStepsCount = 1
 
float m_fCurrentFOV
 Immediate field of view value.
 
int m_iCurrentIndex = 0
 Currently selected FOV or 0 (as base fov) if none.
 
ref ScriptInvoker< float, float > event_OnZoomChanged
 

Member Function Documentation

◆ ForceUpdate()

void SCR_SightsZoomFOVInfo.ForceUpdate ( IEntity  owner,
BaseSightsComponent  sights,
float  timeSlice 
)

◆ GetBaseFOV()

override float SCR_SightsZoomFOVInfo.GetBaseFOV ( )

Returns max field of view provided by this info.

Assumes that first FOV is the largest one. Returns zero if FOVs array is empty.

Returns
Returns field of view in degrees.

Implements SCR_BaseVariableSightsFOVInfo.

◆ GetBaseZoom()

float SCR_SightsZoomFOVInfo.GetBaseZoom ( )

◆ GetCount()

override int SCR_SightsZoomFOVInfo.GetCount ( )

Returns the number of available elements.

Implements SCR_BaseVariableSightsFOVInfo.

◆ GetCurrentFOV()

override float SCR_SightsZoomFOVInfo.GetCurrentFOV ( )
protected

Returns current field of view provided by this info.

Returns
Returns field of view in degrees.

Implements ScriptedSightsFOVInfo.

◆ GetCurrentIndex()

override int SCR_SightsZoomFOVInfo.GetCurrentIndex ( )

Returns currently selected element or -1 if none.

Implements SCR_BaseVariableSightsFOVInfo.

◆ GetCurrentZoom()

float SCR_SightsZoomFOVInfo.GetCurrentZoom ( )

◆ GetEventOnZoomChanged()

ScriptInvoker SCR_SightsZoomFOVInfo.GetEventOnZoomChanged ( )

◆ GetStepsCount()

int SCR_SightsZoomFOVInfo.GetStepsCount ( )

◆ GetZoom()

float SCR_SightsZoomFOVInfo.GetZoom ( int  i,
int  count 
)
protected

◆ InsertFov()

void SCR_SightsZoomFOVInfo.InsertFov ( float  fov)

Add new fov based on reticle range and zoom.

◆ InvokeOnZoomChanged()

void SCR_SightsZoomFOVInfo.InvokeOnZoomChanged ( float  zoom,
float  fov 
)
protected

◆ IsAdjusting()

override bool SCR_SightsZoomFOVInfo.IsAdjusting ( )

Returns true when current FOV of the optic does not match the target FOV.

Implements SCR_BaseVariableSightsFOVInfo.

◆ OnInit()

override void SCR_SightsZoomFOVInfo.OnInit ( IEntity  owner,
BaseSightsComponent  sights 
)
protected

Called on initialization.

Parameters
ownerParent entity.
sightsParent sights component.

Implements ScriptedSightsFOVInfo.

◆ OnUpdate()

override void SCR_SightsZoomFOVInfo.OnUpdate ( IEntity  owner,
BaseSightsComponent  sights,
float  timeSlice 
)
protected

Called every frame when active to update current state.

Parameters
ownerParent weapon entity.
sightsParent sights component.
timeSliceDelta of time since last update.

Implements ScriptedSightsFOVInfo.

◆ SetCurrentFov()

void SCR_SightsZoomFOVInfo.SetCurrentFov ( float  fov)

◆ SetIndex()

override void SCR_SightsZoomFOVInfo.SetIndex ( int  index)

Set provided element as the current one.

Parameters
indexIndex of FOV element.

Implements SCR_BaseVariableSightsFOVInfo.

◆ ZoomsToArray()

array< float > SCR_SightsZoomFOVInfo.ZoomsToArray ( )

Get array of each zoom based on min-max and steps in between.

Member Data Documentation

◆ event_OnZoomChanged

ref ScriptInvoker<float, float> SCR_SightsZoomFOVInfo.event_OnZoomChanged
protected

◆ m_aFOVs

ref array<float> SCR_SightsZoomFOVInfo.m_aFOVs = new array<float>
protected

◆ m_fBaseZoom

float SCR_SightsZoomFOVInfo.m_fBaseZoom
protected

◆ m_fCurrentFOV

float SCR_SightsZoomFOVInfo.m_fCurrentFOV
protected

Immediate field of view value.

◆ m_fInterpolationSpeed

float SCR_SightsZoomFOVInfo.m_fInterpolationSpeed
protected

◆ m_fStepZoomSize

float SCR_SightsZoomFOVInfo.m_fStepZoomSize
protected

◆ m_fZoomMax

float SCR_SightsZoomFOVInfo.m_fZoomMax
protected

◆ m_iCurrentIndex

int SCR_SightsZoomFOVInfo.m_iCurrentIndex = 0
protected

Currently selected FOV or 0 (as base fov) if none.

◆ m_iStepsCount

int SCR_SightsZoomFOVInfo.m_iStepsCount = 1
protected

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