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

Public Member Functions

void SetEnabled (bool enabled)
 
void SCR_PIPSightsComponent (IEntityComponentSource src, IEntity ent, IEntity parent)
 Constructor.
 
void ~SCR_PIPSightsComponent ()
 Destructor.
 
- Public Member Functions inherited from ScriptedSightsComponent
void OnInit (IEntity owner)
 Called during EOnInit.
 
void OnSightADSActivated ()
 Called every time the sight is activated.
 
void OnSightADSPostFrame (IEntity owner, float timeSlice)
 Called on post-frame as long as sights ADS is active.
 
void OnSightADSDeactivated ()
 Called every time the sight is deactivated.
 
float GetADSActivationPercentageScript ()
 Called to get the ADS percentage when the sights go active.
 
float GetADSDeactivationPercentageScript ()
 Called to get the ADS percentage when the sights go inactive.
 
- Public Member Functions inherited from SightsComponent
void ApplyRecoilToCamera (inout vector pOutCameraTransform[4], vector aimModAngles)
 Applies the given recoil angles to the camera transform according to the type of sight By default this method is empty.
 
bool CanFreelook ()
 
bool GetDOFRelatedPrefabData (out int opticDOFDistanceScale=-1, out bool forceSimpleDOF=false)
 Used by SCR_DepthOfFieldEffect to scale the DOF based on each particular ironsight-distance.
 
- Public Member Functions inherited from BaseSightsComponent
proto external IEntity GetOwner ()
 
proto external void ForceSightsZeroValue (vector offset, vector angles, vector turnOffset)
 Allow to override Zeroing via aim modifier (only works in Workbench)
 
proto external void ForceSightsZeroValueEnablel (bool bOnOff)
 Disable forced zeroing data.
 
proto external bool IsSightADSActive ()
 
proto external float GetADSActivationPercentage ()
 
proto external float GetADSDeactivationPercentage ()
 
proto external bool AreSightsValid (bool front=true, bool rear=true)
 
proto external vector GetSightsRearPosition (bool localSpace=false)
 Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets Start position should be the one closer to eye position than end position.
 
proto external vector GetSightsFrontPosition (bool localSpace=false)
 Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets End position should be the one further from eye position than start position.
 
proto external vector GetSightsDirection (bool localSpace=false, bool normalize=true)
 Returns a direction vector from the rear sight position to the front sight position A vector is calculated from the rear sight to the front sight in such a way that GetSightsRearPosition() + GetSightsDirection() == GetSightsFrontPosition()
 
proto external vector GetSightsDirectionUntransformed (bool localSpace=false, bool normalize=true)
 Like GetSightsDirection, but ignores and bones associated with the sight points.
 
proto external vector GetSightsOffset ()
 Returns the local sights reference point offset.
 
proto external bool GetSightsTransform (out vector transform[4], bool localSpace=false)
 Returns the transform matrix of the local sights.
 
proto external float GetFOV ()
 Returns current value of field of view.
 
proto external vector GetCurrentSightsRange ()
 Returns current range info value where x: animation value y: distance z: unused.
 
proto external SightsFOVInfo GetFOVInfo ()
 Returns currently selected sights FOV info or null if none.
 
proto external float GetCameraRecoilAmount ()
 Percentage 0...1 of recoil that should be applied to camera when using this sights component.
 
proto external bool GetSightsPriority ()
 Boolean indicating whether this sight component is prioritized.
 
proto external bool GetSightsSkipSwitch ()
 Return true if the sights can be switched to.
 
proto external void SetSightsVisibility (float visFactor)
 Hide parts of the sight on ADS. 0 means completely visible, 1 means completely hidden.
 
proto external PointInfo GetPositionPointInfo ()
 
proto external PointInfo GetRearPositionPointInfo ()
 
proto external PointInfo GetFrontPositionPointInfo ()
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

override void _WB_AfterWorldUpdate (IEntity owner, float timeSlice)
 
Widget CreateUI (string layout, string rtTextureName, string rtName, out RTTextureWidget RTTexture, out RenderTargetWidget RTWidget)
 
void DestroyUI (Widget root)
 
ScriptCamera CreateCamera (IEntity parent, vector position, int cameraIndex, float fov, float nearPlane, float farPlane)
 
void DestroyCamera (ScriptCamera camera)
 
void Destroy ()
 
override void OnSightADSActivated ()
 Called every time the sight is activated.
 
override void OnSightADSDeactivated ()
 Called every time the sight is deactivated.
 
override void OnInit (IEntity owner)
 Called during EOnInit.
 
- Protected Member Functions inherited from SightsComponent
override bool WB_GetZeroingData (IEntity owner, BaseSightsComponent sights, float weaponAngle, out vector offset, out vector angles)
 Positive weapon angle tilts weapon upwards (muzzle goes up, stock goes down) Negative weapon angle tilts weapon downwards (muzzle goes down, stock goes up) Called from GameCode, do not remove!
 
bool FindParent (IEntity owner, string eyeBoneName, out IEntity parentWeapon, out int boneIndex)
 
bool WB_GetZeroingData (IEntity owner, BaseSightsComponent sights, float weaponAngle, out vector offset, out vector angles)
 Positive weapon angle tilts weapon upwards (muzzle goes up, stock goes down) Negative weapon angle tilts weapon downwards (muzzle goes down, stock goes up) Called from GameCode, do not remove!
 

Protected Attributes

ResourceName m_sLayoutResource
 
string m_sRTTextureWidgetName
 
string m_sRTargetWidgetName
 
int m_iCameraIndex
 
float m_fCameraFOV
 
float m_fNearPlane
 
float m_fFarPlane
 
float m_fResolutionScale
 
vector m_vCameraPoint
 
bool m_bIsEnabled
 Is this PIP currently enabled?
 
ref Widget m_wRoot
 The root layout hierarchy widget.
 
IEntity m_pOwner
 Parent entity owner.
 
RTTextureWidget m_wRenderTargetTextureWidget
 The render target texture found within our layout.
 
RenderTargetWidget m_wRenderTargetWidget
 The render target found within our layout.
 
ScriptCamera m_PIPCamera
 The camera to be used by this pip component.
 

Additional Inherited Members

- Static Public Member Functions inherited from SightsComponent
static ZeroingGeneratedData CalculateDataWithParent (BaseSightsComponent sights, IEntity owner, IEntity parent, float desiredAngle)
 Takes front sights position as the anchor around which it rotates both the owner and the parent under desiredAngle (or rather negative desired angle, as we are pivoting around our target) and calculates new transformation that needs to be applied to reach desired angle.
 
- Static Public Attributes inherited from SightsComponent
const string EYE_BONE = "eye"
 

Constructor & Destructor Documentation

◆ SCR_PIPSightsComponent()

void SCR_PIPSightsComponent.SCR_PIPSightsComponent ( IEntityComponentSource  src,
IEntity  ent,
IEntity  parent 
)

Constructor.

◆ ~SCR_PIPSightsComponent()

void SCR_PIPSightsComponent.~SCR_PIPSightsComponent ( )

Destructor.

Member Function Documentation

◆ _WB_AfterWorldUpdate()

override void SCR_PIPSightsComponent._WB_AfterWorldUpdate ( IEntity  owner,
float  timeSlice 
)
protected

◆ CreateCamera()

ScriptCamera SCR_PIPSightsComponent.CreateCamera ( IEntity  parent,
vector  position,
int  cameraIndex,
float  fov,
float  nearPlane,
float  farPlane 
)
protected
Parameters
parentParent entity this camera should be attached to
positionLocal offset from parent entity
cameraIndexThe index created camera should use, 0-31
fovThe field of view of camera 0-89
nearPlaneNear clipping plane of the camera in metres
farPlaneFar clipping plane of the camera in metres

◆ CreateUI()

Widget SCR_PIPSightsComponent.CreateUI ( string  layout,
string  rtTextureName,
string  rtName,
out RTTextureWidget  RTTexture,
out RenderTargetWidget  RTWidget 
)
protected

◆ Destroy()

void SCR_PIPSightsComponent.Destroy ( )
protected

◆ DestroyCamera()

void SCR_PIPSightsComponent.DestroyCamera ( ScriptCamera  camera)
protected

◆ DestroyUI()

void SCR_PIPSightsComponent.DestroyUI ( Widget  root)
protected

◆ OnInit()

override void SCR_PIPSightsComponent.OnInit ( IEntity  owner)
protected

Called during EOnInit.

Parameters
ownerEntity this component is attached to.

Implements ScriptedSightsComponent.

◆ OnSightADSActivated()

override void SCR_PIPSightsComponent.OnSightADSActivated ( )
protected

Called every time the sight is activated.

Implements ScriptedSightsComponent.

◆ OnSightADSDeactivated()

override void SCR_PIPSightsComponent.OnSightADSDeactivated ( )
protected

Called every time the sight is deactivated.

Implements ScriptedSightsComponent.

◆ SetEnabled()

void SCR_PIPSightsComponent.SetEnabled ( bool  enabled)

Member Data Documentation

◆ m_bIsEnabled

bool SCR_PIPSightsComponent.m_bIsEnabled
protected

Is this PIP currently enabled?

◆ m_fCameraFOV

float SCR_PIPSightsComponent.m_fCameraFOV
protected

◆ m_fFarPlane

float SCR_PIPSightsComponent.m_fFarPlane
protected

◆ m_fNearPlane

float SCR_PIPSightsComponent.m_fNearPlane
protected

◆ m_fResolutionScale

float SCR_PIPSightsComponent.m_fResolutionScale
protected

◆ m_iCameraIndex

int SCR_PIPSightsComponent.m_iCameraIndex
protected

◆ m_PIPCamera

ScriptCamera SCR_PIPSightsComponent.m_PIPCamera
protected

The camera to be used by this pip component.

◆ m_pOwner

IEntity SCR_PIPSightsComponent.m_pOwner
protected

Parent entity owner.

◆ m_sLayoutResource

ResourceName SCR_PIPSightsComponent.m_sLayoutResource
protected

◆ m_sRTargetWidgetName

string SCR_PIPSightsComponent.m_sRTargetWidgetName
protected

◆ m_sRTTextureWidgetName

string SCR_PIPSightsComponent.m_sRTTextureWidgetName
protected

◆ m_vCameraPoint

vector SCR_PIPSightsComponent.m_vCameraPoint
protected

◆ m_wRenderTargetTextureWidget

RTTextureWidget SCR_PIPSightsComponent.m_wRenderTargetTextureWidget
protected

The render target texture found within our layout.

◆ m_wRenderTargetWidget

RenderTargetWidget SCR_PIPSightsComponent.m_wRenderTargetWidget
protected

The render target found within our layout.

◆ m_wRoot

ref Widget SCR_PIPSightsComponent.m_wRoot
protected

The root layout hierarchy widget.


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