Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_2DOpticsComponent Class Reference
Inheritance diagram for SCR_2DOpticsComponent:

Protected Member Functions

float GetReticleOffsetX ()
void GetReticleData (out float reticleAngularSize, out float reticlePortion, out float reticleBaseZoom)
float GetObjectiveFov ()
float GetObjectiveScale ()
bool GetIsOpticsHidden ()
float GetMagnification ()
float GetAnimationSpeedBlur ()
override float GetADSActivationPercentageScript ()
override float GetADSDeactivationPercentageScript ()
ScriptInvokerVoid OnSetupOpticImage ()
ScriptInvokerBase< On2DOpticsIlluminationChangeOnIlluminationChange ()
float GetFovZoomed ()
 Get base FOV of the optic, used to determine maximum FOV.
void SetFovZoomed (float value)
 Set base FOV of the optic. Negative value means magnification to compute new m_fFovZoomed with.
float GetNearPlane ()
bool GetIsMoving ()
bool GetIsRotating ()
float GetScratchesRoll ()
override void OnInit (IEntity owner)
void HandleSightActivation ()
void HandleSightDeactivation ()
override void OnSightADSActivated ()
override void OnSightADSDeactivated ()
override void OnSightADSPostFrame (IEntity owner, float timeSlice)
void HideObjects ()
 Hides objects to prevent clipping when entering ADS.
bool IsMoveCloseToLimit (vector move, float limitMin)
 Return true if move X a Y is below limit.
vector GetMisalignmentAngles (notnull CameraBase camera)
vector GetRotation (out vector previousDir, float timeSlice)
vector GetMovement (out vector previousPos, float timeSlice)
vector GetSightsRelPosition ()
void EnableReticleIllumination (bool enable)
 Toggle between illumination modes.
float GetReticleOffsetYTarget ()
float GetCurrentReticleOffsetY ()
float GetCameraPitchTarget ()
float GetCurrentCameraPitchOffset ()
IEntity GetCameraLocalTransform (out vector matrix[4])
void SetObjectiveFov (float objectiveFov)
void SetObjectiveScale (float objectiveScale)
void SetReticleBaseZoom (float reticleBaseZoom)
void SetReticleAngularSize (float reticleAngularSize)
void SetReticlePortion (float reticlePortion)
void SetReticleOffsetX (float reticleOffsetX)
void SetReticleOffsetY (float reticleOffsetY)

Static Protected Member Functions

static float CalculateZoomFOV (float magnification)
 Return camera FOV for given magnification. Focus FOV is used as reference 1x magnification.

Protected Attributes

float m_fReticleOffsetX
float m_fReticleOffsetY
params : "0.001 60 0.001"
params category: "2DSights"
params precision: 3)] protected float m_fObjectiveFov
float m_fObjectiveScale
params : "0 60 0.001"
params : "0 10 0.00001"
float m_fReticleBaseZoom
params : "0.1 200 0.001"
const string ACTION_ZOOM_IN = "WeaponOpticsZoomIn"
const string ACTION_ZOOM_OUT = "WeaponOpticsZoomOut"
const string ACTION_ILLUMINATION = "WeaponToggleSightsIllumination"
const float REFERENCE_FOV = 28
const float OPACITY_INITIAL = 0.75
const float NEAR_PLANE_DEFAULT = 0.05
const float NEAR_PLANE_ZOOMED = 0.05
float m_fCurrentReticleOffsetY
float m_fCurrentCameraPitch
int m_iSelectedZoomLevel
float m_fScratchesRoll
float m_fFovZoomed
float m_fDefaultSize
float m_fNearPlaneCurrent
bool m_bIsMoving
bool m_bIsRotating
bool m_bWasEntityHidden
int m_iHeadBoneId = -1
bool m_bIsOpticsHidden
bool m_bIsIlluminationOn
ChimeraCharacter m_ParentCharacter
ref ScriptInvokerVoid s_OnSetupOpticImage = new ScriptInvokerVoid()
ref ScriptInvokerBase< On2DOpticsIlluminationChanges_OnIlluminationChange = new ScriptInvokerBase<On2DOpticsIlluminationChange>()

Static Protected Attributes

static ref ScriptInvokerBase< OnSightsADSChangeds_OnSightsADSChanged = new ScriptInvokerBase<OnSightsADSChanged>()
static ref ScriptInvokerBase< On2DOpticsADSChanges_On2DOpticADSChanged = new ScriptInvokerBase<On2DOpticsADSChange>()

Detailed Description

Base class for 2D optics Unifiying binoculars and optic sight

Definition at line 293 of file SCR_2DOpticsComponent.c.

Member Function Documentation

◆ CalculateZoomFOV()

float SCR_2DOpticsComponent::CalculateZoomFOV ( float magnification)
inlinestaticprotected

Return camera FOV for given magnification. Focus FOV is used as reference 1x magnification.

Definition at line 614 of file SCR_2DOpticsComponent.c.

◆ EnableReticleIllumination()

void SCR_2DOpticsComponent::EnableReticleIllumination ( bool enable)
inlineprotected

Toggle between illumination modes.

Definition at line 758 of file SCR_2DOpticsComponent.c.

◆ GetADSActivationPercentageScript()

override float SCR_2DOpticsComponent::GetADSActivationPercentageScript ( )
inlineprotected

Definition at line 383 of file SCR_2DOpticsComponent.c.

◆ GetADSDeactivationPercentageScript()

override float SCR_2DOpticsComponent::GetADSDeactivationPercentageScript ( )
inlineprotected

Definition at line 393 of file SCR_2DOpticsComponent.c.

◆ GetAnimationSpeedBlur()

float SCR_2DOpticsComponent::GetAnimationSpeedBlur ( )
inlineprotected

Definition at line 373 of file SCR_2DOpticsComponent.c.

◆ GetCameraLocalTransform()

IEntity SCR_2DOpticsComponent::GetCameraLocalTransform ( out vector matrix[4])
inlineprotected

Return actual parent (weapon) with calculated transformation in relation to it.

Parameters
matrixOut rotation in relation to new parent
Returns
Returns new parent to use, usually the weapon

These multiplications will run even if we have no weapon, but it shouldn't be that big of a deal for now, weapon should exist regardless

Definition at line 819 of file SCR_2DOpticsComponent.c.

◆ GetCameraPitchTarget()

float SCR_2DOpticsComponent::GetCameraPitchTarget ( )
inlineprotected

Definition at line 795 of file SCR_2DOpticsComponent.c.

◆ GetCurrentCameraPitchOffset()

float SCR_2DOpticsComponent::GetCurrentCameraPitchOffset ( )
inlineprotected

Definition at line 808 of file SCR_2DOpticsComponent.c.

◆ GetCurrentReticleOffsetY()

float SCR_2DOpticsComponent::GetCurrentReticleOffsetY ( )
inlineprotected

Definition at line 789 of file SCR_2DOpticsComponent.c.

◆ GetFovZoomed()

float SCR_2DOpticsComponent::GetFovZoomed ( )
inlineprotected

Get base FOV of the optic, used to determine maximum FOV.

Definition at line 443 of file SCR_2DOpticsComponent.c.

◆ GetIsMoving()

bool SCR_2DOpticsComponent::GetIsMoving ( )
inlineprotected

Definition at line 467 of file SCR_2DOpticsComponent.c.

◆ GetIsOpticsHidden()

bool SCR_2DOpticsComponent::GetIsOpticsHidden ( )
inlineprotected

Definition at line 361 of file SCR_2DOpticsComponent.c.

◆ GetIsRotating()

bool SCR_2DOpticsComponent::GetIsRotating ( )
inlineprotected

Definition at line 473 of file SCR_2DOpticsComponent.c.

◆ GetMagnification()

float SCR_2DOpticsComponent::GetMagnification ( )
inlineprotected

Definition at line 367 of file SCR_2DOpticsComponent.c.

◆ GetMisalignmentAngles()

vector SCR_2DOpticsComponent::GetMisalignmentAngles ( notnull CameraBase camera)
inlineprotected

Get sight angles in camera space !

Parameters
cameraentity to get misalignment against !
Returns
angles sight yaw, pitch and roll in camera space

Definition at line 646 of file SCR_2DOpticsComponent.c.

◆ GetMovement()

vector SCR_2DOpticsComponent::GetMovement ( out vector previousPos,
float timeSlice )
inlineprotected

Definition at line 715 of file SCR_2DOpticsComponent.c.

◆ GetNearPlane()

float SCR_2DOpticsComponent::GetNearPlane ( )
inlineprotected

Definition at line 461 of file SCR_2DOpticsComponent.c.

◆ GetObjectiveFov()

float SCR_2DOpticsComponent::GetObjectiveFov ( )
inlineprotected

Definition at line 349 of file SCR_2DOpticsComponent.c.

◆ GetObjectiveScale()

float SCR_2DOpticsComponent::GetObjectiveScale ( )
inlineprotected

Definition at line 355 of file SCR_2DOpticsComponent.c.

◆ GetReticleData()

void SCR_2DOpticsComponent::GetReticleData ( out float reticleAngularSize,
out float reticlePortion,
out float reticleBaseZoom )
inlineprotected

Definition at line 341 of file SCR_2DOpticsComponent.c.

◆ GetReticleOffsetX()

float SCR_2DOpticsComponent::GetReticleOffsetX ( )
inlineprotected

Definition at line 335 of file SCR_2DOpticsComponent.c.

◆ GetReticleOffsetYTarget()

float SCR_2DOpticsComponent::GetReticleOffsetYTarget ( )
inlineprotected

Definition at line 783 of file SCR_2DOpticsComponent.c.

◆ GetRotation()

vector SCR_2DOpticsComponent::GetRotation ( out vector previousDir,
float timeSlice )
inlineprotected

Definition at line 683 of file SCR_2DOpticsComponent.c.

◆ GetScratchesRoll()

float SCR_2DOpticsComponent::GetScratchesRoll ( )
inlineprotected

Definition at line 479 of file SCR_2DOpticsComponent.c.

◆ GetSightsRelPosition()

vector SCR_2DOpticsComponent::GetSightsRelPosition ( )
inlineprotected

Definition at line 747 of file SCR_2DOpticsComponent.c.

◆ HandleSightActivation()

void SCR_2DOpticsComponent::HandleSightActivation ( )
inlineprotected

Definition at line 499 of file SCR_2DOpticsComponent.c.

◆ HandleSightDeactivation()

void SCR_2DOpticsComponent::HandleSightDeactivation ( )
inlineprotected

Definition at line 520 of file SCR_2DOpticsComponent.c.

◆ HideObjects()

void SCR_2DOpticsComponent::HideObjects ( )
inlineprotected

Hides objects to prevent clipping when entering ADS.

Definition at line 581 of file SCR_2DOpticsComponent.c.

◆ IsMoveCloseToLimit()

bool SCR_2DOpticsComponent::IsMoveCloseToLimit ( vector move,
float limitMin )
inlineprotected

Return true if move X a Y is below limit.

Definition at line 633 of file SCR_2DOpticsComponent.c.

◆ OnIlluminationChange()

ScriptInvokerBase< On2DOpticsIlluminationChange > SCR_2DOpticsComponent::OnIlluminationChange ( )
inlineprotected

Definition at line 436 of file SCR_2DOpticsComponent.c.

◆ OnInit()

override void SCR_2DOpticsComponent::OnInit ( IEntity owner)
inlineprotected

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Definition at line 489 of file SCR_2DOpticsComponent.c.

◆ OnSetupOpticImage()

ScriptInvokerVoid SCR_2DOpticsComponent::OnSetupOpticImage ( )
inlineprotected

Definition at line 430 of file SCR_2DOpticsComponent.c.

◆ OnSightADSActivated()

override void SCR_2DOpticsComponent::OnSightADSActivated ( )
inlineprotected

Definition at line 549 of file SCR_2DOpticsComponent.c.

◆ OnSightADSDeactivated()

override void SCR_2DOpticsComponent::OnSightADSDeactivated ( )
inlineprotected

Definition at line 557 of file SCR_2DOpticsComponent.c.

◆ OnSightADSPostFrame()

override void SCR_2DOpticsComponent::OnSightADSPostFrame ( IEntity owner,
float timeSlice )
inlineprotected

Definition at line 565 of file SCR_2DOpticsComponent.c.

◆ SetFovZoomed()

void SCR_2DOpticsComponent::SetFovZoomed ( float value)
inlineprotected

Set base FOV of the optic. Negative value means magnification to compute new m_fFovZoomed with.

Definition at line 455 of file SCR_2DOpticsComponent.c.

◆ SetObjectiveFov()

void SCR_2DOpticsComponent::SetObjectiveFov ( float objectiveFov)
inlineprotected

Definition at line 887 of file SCR_2DOpticsComponent.c.

◆ SetObjectiveScale()

void SCR_2DOpticsComponent::SetObjectiveScale ( float objectiveScale)
inlineprotected

Definition at line 893 of file SCR_2DOpticsComponent.c.

◆ SetReticleAngularSize()

void SCR_2DOpticsComponent::SetReticleAngularSize ( float reticleAngularSize)
inlineprotected

Definition at line 905 of file SCR_2DOpticsComponent.c.

◆ SetReticleBaseZoom()

void SCR_2DOpticsComponent::SetReticleBaseZoom ( float reticleBaseZoom)
inlineprotected

Definition at line 899 of file SCR_2DOpticsComponent.c.

◆ SetReticleOffsetX()

void SCR_2DOpticsComponent::SetReticleOffsetX ( float reticleOffsetX)
inlineprotected

Definition at line 917 of file SCR_2DOpticsComponent.c.

◆ SetReticleOffsetY()

void SCR_2DOpticsComponent::SetReticleOffsetY ( float reticleOffsetY)
inlineprotected

Definition at line 923 of file SCR_2DOpticsComponent.c.

◆ SetReticlePortion()

void SCR_2DOpticsComponent::SetReticlePortion ( float reticlePortion)
inlineprotected

Definition at line 911 of file SCR_2DOpticsComponent.c.

Member Data Documentation

◆ __pad0__

params SCR_2DOpticsComponent::__pad0__
protected

Definition at line 301 of file SCR_2DOpticsComponent.c.

◆ __pad1__

params SCR_2DOpticsComponent::__pad1__
protected

Definition at line 307 of file SCR_2DOpticsComponent.c.

◆ __pad2__

params SCR_2DOpticsComponent::__pad2__
protected

Definition at line 310 of file SCR_2DOpticsComponent.c.

◆ __pad3__

params SCR_2DOpticsComponent::__pad3__
protected

Definition at line 316 of file SCR_2DOpticsComponent.c.

◆ ACTION_ILLUMINATION

const string SCR_2DOpticsComponent::ACTION_ILLUMINATION = "WeaponToggleSightsIllumination"
protected

Definition at line 322 of file SCR_2DOpticsComponent.c.

◆ ACTION_ZOOM_IN

const string SCR_2DOpticsComponent::ACTION_ZOOM_IN = "WeaponOpticsZoomIn"
protected

Definition at line 320 of file SCR_2DOpticsComponent.c.

◆ ACTION_ZOOM_OUT

const string SCR_2DOpticsComponent::ACTION_ZOOM_OUT = "WeaponOpticsZoomOut"
protected

Definition at line 321 of file SCR_2DOpticsComponent.c.

◆ category

params SCR_2DOpticsComponent::category
protected

Definition at line 301 of file SCR_2DOpticsComponent.c.

◆ m_bIsIlluminationOn

bool SCR_2DOpticsComponent::m_bIsIlluminationOn
protected

Definition at line 419 of file SCR_2DOpticsComponent.c.

◆ m_bIsMoving

bool SCR_2DOpticsComponent::m_bIsMoving
protected

Definition at line 413 of file SCR_2DOpticsComponent.c.

◆ m_bIsOpticsHidden

bool SCR_2DOpticsComponent::m_bIsOpticsHidden
protected

Definition at line 418 of file SCR_2DOpticsComponent.c.

◆ m_bIsRotating

bool SCR_2DOpticsComponent::m_bIsRotating
protected

Definition at line 414 of file SCR_2DOpticsComponent.c.

◆ m_bWasEntityHidden

bool SCR_2DOpticsComponent::m_bWasEntityHidden
protected

Definition at line 415 of file SCR_2DOpticsComponent.c.

◆ m_fCurrentCameraPitch

float SCR_2DOpticsComponent::m_fCurrentCameraPitch
protected

Definition at line 331 of file SCR_2DOpticsComponent.c.

◆ m_fCurrentReticleOffsetY

float SCR_2DOpticsComponent::m_fCurrentReticleOffsetY
protected

Definition at line 330 of file SCR_2DOpticsComponent.c.

◆ m_fDefaultSize

float SCR_2DOpticsComponent::m_fDefaultSize
protected

Definition at line 409 of file SCR_2DOpticsComponent.c.

◆ m_fFovZoomed

float SCR_2DOpticsComponent::m_fFovZoomed
protected

Definition at line 408 of file SCR_2DOpticsComponent.c.

◆ m_fNearPlaneCurrent

float SCR_2DOpticsComponent::m_fNearPlaneCurrent
protected

Definition at line 410 of file SCR_2DOpticsComponent.c.

◆ m_fObjectiveScale

float SCR_2DOpticsComponent::m_fObjectiveScale
protected

Definition at line 305 of file SCR_2DOpticsComponent.c.

◆ m_fReticleBaseZoom

float SCR_2DOpticsComponent::m_fReticleBaseZoom
protected

Definition at line 314 of file SCR_2DOpticsComponent.c.

◆ m_fReticleOffsetX

float SCR_2DOpticsComponent::m_fReticleOffsetX
protected

Definition at line 296 of file SCR_2DOpticsComponent.c.

◆ m_fReticleOffsetY

float SCR_2DOpticsComponent::m_fReticleOffsetY
protected

Definition at line 299 of file SCR_2DOpticsComponent.c.

◆ m_fScratchesRoll

float SCR_2DOpticsComponent::m_fScratchesRoll
protected

Definition at line 405 of file SCR_2DOpticsComponent.c.

◆ m_iHeadBoneId

int SCR_2DOpticsComponent::m_iHeadBoneId = -1
protected

Definition at line 416 of file SCR_2DOpticsComponent.c.

◆ m_iSelectedZoomLevel

int SCR_2DOpticsComponent::m_iSelectedZoomLevel
protected

Definition at line 402 of file SCR_2DOpticsComponent.c.

◆ m_ParentCharacter

ChimeraCharacter SCR_2DOpticsComponent::m_ParentCharacter
protected

Definition at line 422 of file SCR_2DOpticsComponent.c.

◆ NEAR_PLANE_DEFAULT

const float SCR_2DOpticsComponent::NEAR_PLANE_DEFAULT = 0.05
protected

Definition at line 327 of file SCR_2DOpticsComponent.c.

◆ NEAR_PLANE_ZOOMED

const float SCR_2DOpticsComponent::NEAR_PLANE_ZOOMED = 0.05
protected

Definition at line 328 of file SCR_2DOpticsComponent.c.

◆ OPACITY_INITIAL

const float SCR_2DOpticsComponent::OPACITY_INITIAL = 0.75
protected

Definition at line 325 of file SCR_2DOpticsComponent.c.

◆ precision

params SCR_2DOpticsComponent::precision
protected

Definition at line 301 of file SCR_2DOpticsComponent.c.

◆ REFERENCE_FOV

const float SCR_2DOpticsComponent::REFERENCE_FOV = 28
protected

Definition at line 324 of file SCR_2DOpticsComponent.c.

◆ s_On2DOpticADSChanged

ref ScriptInvokerBase<On2DOpticsADSChange> SCR_2DOpticsComponent::s_On2DOpticADSChanged = new ScriptInvokerBase<On2DOpticsADSChange>()
staticprotected

Definition at line 425 of file SCR_2DOpticsComponent.c.

◆ s_OnIlluminationChange

ref ScriptInvokerBase<On2DOpticsIlluminationChange> SCR_2DOpticsComponent::s_OnIlluminationChange = new ScriptInvokerBase<On2DOpticsIlluminationChange>()
protected

Definition at line 427 of file SCR_2DOpticsComponent.c.

◆ s_OnSetupOpticImage

ref ScriptInvokerVoid SCR_2DOpticsComponent::s_OnSetupOpticImage = new ScriptInvokerVoid()
protected

Definition at line 426 of file SCR_2DOpticsComponent.c.

◆ s_OnSightsADSChanged

ref ScriptInvokerBase<OnSightsADSChanged> SCR_2DOpticsComponent::s_OnSightsADSChanged = new ScriptInvokerBase<OnSightsADSChanged>()
staticprotected

Definition at line 424 of file SCR_2DOpticsComponent.c.


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