PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Hologram Class Reference

Private Member Functions

void Hologram (PlayerBase player, vector pos, ItemBase item)
 
void ~Hologram ()
 
void SetAnimations ()
 
void UpdateSelections ()
 
string ProjectionBasedOnParent ()
 
string GetProjectionName (ItemBase item)
 
void UpdateHologram (float timeslice)
 
vector AlignProjectionOnTerrain (float timeslice)
 
vector SmoothProjectionMovement (vector y_p_r, float timeslice)
 
void CreateTrigger ()
 
void RefreshTrigger ()
 
void EvaluateCollision (ItemBase action_item=null)
 
bool IsClippingRoof ()
 
bool IsCollidingAngle ()
 
bool IsCollidingBBox (ItemBase action_item=null)
 
bool IsBaseViable ()
 
bool IsCollidingGPlot ()
 
bool IsCollidingZeroPos ()
 
bool IsBehindObstacle ()
 DEPRECATED.
 
bool IsBaseStatic (Object objectToCheck)
 
bool IsObjectStatic (Object obj)
 
bool IsBaseIntact (Object under_left_close, Object under_right_close, Object under_left_far, Object under_right_far)
 
bool IsBaseFlat (vector contact_pos_left_close, vector contact_pos_right_close, vector contact_pos_left_far, vector contact_pos_right_far)
 
bool IsPlacementPermitted ()
 Checks if the item can be legally placed (usually checked by action as well)
 
bool HeightPlacementCheck ()
 Checks height relative to player's position.
 
bool IsUnderwater ()
 
bool IsInTerrain ()
 
void CheckPowerSource ()
 
EntityAI PlaceEntity (EntityAI entity_for_placing)
 
protected void GetProjectionCollisionBox (out vector min_max[2])
 
protected vector GetCollisionBoxSize (vector min_max[2])
 
vector GetLeftCloseProjectionVector ()
 
vector GetRightCloseProjectionVector ()
 
vector GetLeftFarProjectionVector ()
 
vector GetRightFarProjectionVector ()
 
bool IsSurfaceWater (vector position)
 
bool IsSurfaceSea (vector position)
 
protected vector GetProjectionEntityPosition (PlayerBase player)
 
protected bool SetHologramPosition (vector startPosition, float minProjectionDistance, float maxProjectionDistance, inout vector contactPosition)
 Sets hologram position based on player and projection distance.
 
bool IsFenceOrWatchtowerKit ()
 
vector CorrectForWatchtower (int contactComponent, vector contactPos, PlayerBase player, Object hitObject)
 
bool IsProjectionTrap ()
 
float GetProjectionDiameter ()
 
float GetProjectionRadius ()
 
void SetUpdatePosition (bool state)
 
bool GetUpdatePosition ()
 
EntityAI GetParentEntity ()
 
void SetProjectionEntity (EntityAI projection)
 
EntityAI GetProjectionEntity ()
 
void SetIsFloating (bool is_floating)
 
void SetIsColliding (bool is_colliding)
 
void SetIsHidden (bool is_hidden)
 
void SetIsCollidingPlayer (bool is_colliding)
 
void SetIsCollidingGPlot (bool is_colliding_gplot)
 
bool IsFloating ()
 
bool IsColliding ()
 
bool IsHidden ()
 
bool IsCollidingPlayer ()
 
void SetProjectionPosition (vector position)
 
void SetProjectionOrientation (vector orientation)
 
vector GetProjectionRotation ()
 
void AddProjectionRotation (float addition)
 
void SubtractProjectionRotation (float subtraction)
 
vector SetOnGround (vector position)
 
vector HideWhenClose (vector pos)
 
vector GetProjectionPosition ()
 
vector GetProjectionOrientation ()
 
vector GetDefaultOrientation ()
 
int GetHiddenSelection (string selection)
 
void SetSelectionToRefresh (string selection)
 
void SetSelectionToRefresh (array< string > selection)
 
void RefreshVisual ()
 
string CorrectMaterialPathName ()
 
private bool IsRestrictedFromAdvancedPlacing ()
 

Static Private Member Functions

static bool DoesHaveProjection (ItemBase item)
 DEPRECATED.
 

Private Attributes

protected const int SPAWN_FLAGS = ECE_LOCAL
 
protected const string SUFFIX_MATERIAL_DEPLOYABLE = "_deployable.rvmat"
 
protected const string SUFFIX_MATERIAL_UNDEPLOYABLE = "_undeployable.rvmat"
 
protected const string SUFFIX_MATERIAL_POWERED = "_powered.rvmat"
 
protected const vector PLACEMENT_RC_START_OFFSET = "0 1 0"
 
protected const vector PLACEMENT_RC_END_OFFSET = "0 -2 0"
 
protected ItemBase m_Parent
 
protected EntityAI m_Projection
 
protected PlayerBase m_Player
 
protected ProjectionTrigger m_ProjectionTrigger
 
protected string m_ProjectionTypename
 
protected bool m_IsColliding
 
protected bool m_IsCollidingGPlot
 
protected bool m_IsSlope
 
protected bool m_IsCollidingPlayer
 
protected bool m_IsFloating
 
protected bool m_UpdatePosition
 
protected bool m_IsHidden
 
protected vector m_DefaultOrientation
 
protected vector m_Rotation
 
protected vector m_y_p_r_previous
 
protected vector m_ContactDir
 
protected vector m_FromAdjusted
 
protected const string ANIMATION_PLACING = "Placing"
 
protected const string ANIMATION_INVENTORY = "Inventory"
 
protected const string SELECTION_PLACING = "placing"
 
protected const string SELECTION_INVENTORY = "inventory"
 
protected const float SMALL_PROJECTION_RADIUS = 1
 
protected const float SMALL_PROJECTION_GROUND = 2
 
protected const float DISTANCE_SMALL_PROJECTION = 1
 
protected const float LARGE_PROJECTION_DISTANCE_LIMIT = 6
 Deprecated.
 
protected const float PROJECTION_TRANSITION_MIN = 1
 
protected const float PROJECTION_TRANSITION_MAX = 0.25
 
protected const float LOOKING_TO_SKY = 0.75
 
protected float m_SlopeTolerance
 
protected bool m_AlignToTerrain
 
protected vector m_YawPitchRollLimit
 
protected int m_ContactComponent
 
protected ref set< stringm_SelectionsToRefresh = new set<string>
 

Static Private Attributes

static const float DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF = 1.5
 
static const protected ref array< stringm_WatchtowerIgnoreComponentNames = new array<string>
 
static const protected ref array< stringm_WatchtowerBlockedComponentNames = new array<string>
 

Constructor & Destructor Documentation

◆ Hologram()

◆ ~Hologram()

Member Function Documentation

◆ AddProjectionRotation()

void AddProjectionRotation ( float  addition)
inlineprivate

References m_Rotation.

◆ AlignProjectionOnTerrain()

◆ CheckPowerSource()

void CheckPowerSource ( )
inlineprivate

References GetGame(), m_Parent, and m_Player.

Referenced by UpdateHologram().

◆ CorrectForWatchtower()

vector CorrectForWatchtower ( int  contactComponent,
vector  contactPos,
PlayerBase  player,
Object  hitObject 
)
inlineprivate

◆ CorrectMaterialPathName()

◆ CreateTrigger()

◆ DoesHaveProjection()

static bool DoesHaveProjection ( ItemBase  item)
inlinestaticprivate

◆ EvaluateCollision()

◆ GetCollisionBoxSize()

protected vector GetCollisionBoxSize ( vector  min_max[2])
inlineprivate

◆ GetDefaultOrientation()

◆ GetHiddenSelection()

int GetHiddenSelection ( string  selection)
inlineprivate

References m_Projection.

Referenced by RefreshVisual().

◆ GetLeftCloseProjectionVector()

vector GetLeftCloseProjectionVector ( )
inlineprivate

◆ GetLeftFarProjectionVector()

vector GetLeftFarProjectionVector ( )
inlineprivate

◆ GetParentEntity()

EntityAI GetParentEntity ( )
inlineprivate

References m_Parent.

Referenced by GetDefaultOrientation().

◆ GetProjectionCollisionBox()

◆ GetProjectionDiameter()

float GetProjectionDiameter ( )
inlineprivate

◆ GetProjectionEntity()

EntityAI GetProjectionEntity ( )
inlineprivate

◆ GetProjectionEntityPosition()

◆ GetProjectionName()

string GetProjectionName ( ItemBase  item)
inlineprivate

◆ GetProjectionOrientation()

vector GetProjectionOrientation ( )
inlineprivate

◆ GetProjectionPosition()

◆ GetProjectionRadius()

float GetProjectionRadius ( )
inlineprivate

◆ GetProjectionRotation()

vector GetProjectionRotation ( )
inlineprivate

References m_Rotation.

Referenced by AlignProjectionOnTerrain().

◆ GetRightCloseProjectionVector()

vector GetRightCloseProjectionVector ( )
inlineprivate

◆ GetRightFarProjectionVector()

vector GetRightFarProjectionVector ( )
inlineprivate

◆ GetUpdatePosition()

bool GetUpdatePosition ( )
inlineprivate

References m_UpdatePosition.

Referenced by UpdateHologram().

◆ HeightPlacementCheck()

bool HeightPlacementCheck ( )
inlineprivate

◆ HideWhenClose()

vector HideWhenClose ( vector  pos)
inlineprivate

◆ IsBaseFlat()

bool IsBaseFlat ( vector  contact_pos_left_close,
vector  contact_pos_right_close,
vector  contact_pos_left_far,
vector  contact_pos_right_far 
)
inlineprivate

◆ IsBaseIntact()

bool IsBaseIntact ( Object  under_left_close,
Object  under_right_close,
Object  under_left_far,
Object  under_right_far 
)
inlineprivate

Referenced by IsBaseViable().

◆ IsBaseStatic()

bool IsBaseStatic ( Object  objectToCheck)
inlineprivate

References IsObjectStatic().

Referenced by IsBaseViable().

◆ IsBaseViable()

◆ IsBehindObstacle()

bool IsBehindObstacle ( )
inlineprivate

DEPRECATED.

References ErrorEx.

◆ IsClippingRoof()

◆ IsColliding()

bool IsColliding ( )
inlineprivate

◆ IsCollidingAngle()

◆ IsCollidingBBox()

◆ IsCollidingGPlot()

bool IsCollidingGPlot ( )
inlineprivate

◆ IsCollidingPlayer()

bool IsCollidingPlayer ( )
inlineprivate

◆ IsCollidingZeroPos()

bool IsCollidingZeroPos ( )
inlineprivate

References GetProjectionPosition(), and Vector().

Referenced by EvaluateCollision().

◆ IsFenceOrWatchtowerKit()

bool IsFenceOrWatchtowerKit ( )
inlineprivate

◆ IsFloating()

bool IsFloating ( )
inlineprivate

◆ IsHidden()

bool IsHidden ( )
inlineprivate

References m_IsHidden.

Referenced by EvaluateCollision().

◆ IsInTerrain()

◆ IsObjectStatic()

bool IsObjectStatic ( Object  obj)
inlineprivate

◆ IsPlacementPermitted()

bool IsPlacementPermitted ( )
inlineprivate

Checks if the item can be legally placed (usually checked by action as well)

References ItemBase::CanBePlaced(), CfgGameplayHandler::GetDisableIsPlacementPermittedCheck(), GetProjectionPosition(), m_Parent, and m_Player.

Referenced by EvaluateCollision().

◆ IsProjectionTrap()

bool IsProjectionTrap ( )
inlineprivate

References m_Projection.

◆ IsRestrictedFromAdvancedPlacing()

private bool IsRestrictedFromAdvancedPlacing ( )
inlineprivate

References m_Player.

Referenced by UpdateHologram().

◆ IsSurfaceSea()

bool IsSurfaceSea ( vector  position)
inlineprivate

References GetGame(), and CGame::SurfaceIsSea().

◆ IsSurfaceWater()

bool IsSurfaceWater ( vector  position)
inlineprivate

◆ IsUnderwater()

◆ PlaceEntity()

EntityAI PlaceEntity ( EntityAI  entity_for_placing)
inlineprivate

◆ ProjectionBasedOnParent()

string ProjectionBasedOnParent ( )
inlineprivate

References GetProjectionName(), and m_Parent.

Referenced by Hologram().

◆ RefreshTrigger()

void RefreshTrigger ( )
inlineprivate

◆ RefreshVisual()

◆ SetAnimations()

◆ SetHologramPosition()

protected bool SetHologramPosition ( vector  startPosition,
float  minProjectionDistance,
float  maxProjectionDistance,
inout vector  contactPosition 
)
inlineprivate

Sets hologram position based on player and projection distance.

Parameters
startPositionstart position
minProjectionDistancelower distance limit
maxProjectionDistancehigher distance limit
inoutcontactPosition is position of the hologram contact with ground/object
Returns
true if hologram is floating (is on the near or far edge)

References vector::Distance(), m_IsHidden, vector::Normalize(), PROJECTION_TRANSITION_MAX, and PROJECTION_TRANSITION_MIN.

Referenced by GetProjectionEntityPosition().

◆ SetIsColliding()

void SetIsColliding ( bool  is_colliding)
inlineprivate

References m_IsColliding.

Referenced by EvaluateCollision().

◆ SetIsCollidingGPlot()

void SetIsCollidingGPlot ( bool  is_colliding_gplot)
inlineprivate

◆ SetIsCollidingPlayer()

void SetIsCollidingPlayer ( bool  is_colliding)
inlineprivate

References m_IsCollidingPlayer.

◆ SetIsFloating()

void SetIsFloating ( bool  is_floating)
inlineprivate

References m_IsFloating.

Referenced by GetProjectionEntityPosition().

◆ SetIsHidden()

void SetIsHidden ( bool  is_hidden)
inlineprivate

References m_IsHidden.

◆ SetOnGround()

◆ SetProjectionEntity()

void SetProjectionEntity ( EntityAI  projection)
inlineprivate

References m_Projection.

Referenced by Hologram().

◆ SetProjectionOrientation()

void SetProjectionOrientation ( vector  orientation)
inlineprivate

References m_Projection.

Referenced by UpdateHologram().

◆ SetProjectionPosition()

void SetProjectionPosition ( vector  position)
inlineprivate

References IsFloating(), m_Projection, and SetOnGround().

Referenced by UpdateHologram().

◆ SetSelectionToRefresh() [1/2]

void SetSelectionToRefresh ( array< string selection)
inlineprivate

References m_SelectionsToRefresh.

◆ SetSelectionToRefresh() [2/2]

void SetSelectionToRefresh ( string  selection)
inlineprivate

References m_SelectionsToRefresh.

Referenced by SetAnimations().

◆ SetUpdatePosition()

void SetUpdatePosition ( bool  state)
inlineprivate

References m_UpdatePosition.

◆ SmoothProjectionMovement()

vector SmoothProjectionMovement ( vector  y_p_r,
float  timeslice 
)
inlineprivate

◆ SubtractProjectionRotation()

void SubtractProjectionRotation ( float  subtraction)
inlineprivate

References m_Rotation.

◆ UpdateHologram()

◆ UpdateSelections()

void UpdateSelections ( )
inlineprivate

Field Documentation

◆ ANIMATION_INVENTORY

protected const string ANIMATION_INVENTORY = "Inventory"
private

Referenced by SetAnimations().

◆ ANIMATION_PLACING

protected const string ANIMATION_PLACING = "Placing"
private

Referenced by SetAnimations().

◆ DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF

const float DEFAULT_MAX_PLACEMENT_HEIGHT_DIFF = 1.5
staticprivate

Referenced by HeightPlacementCheck().

◆ DISTANCE_SMALL_PROJECTION

protected const float DISTANCE_SMALL_PROJECTION = 1
private

◆ LARGE_PROJECTION_DISTANCE_LIMIT

protected const float LARGE_PROJECTION_DISTANCE_LIMIT = 6
private

Deprecated.

Referenced by GetProjectionEntityPosition().

◆ LOOKING_TO_SKY

protected const float LOOKING_TO_SKY = 0.75
private

Referenced by HideWhenClose().

◆ m_AlignToTerrain

protected bool m_AlignToTerrain
private

◆ m_ContactComponent

protected int m_ContactComponent
private

◆ m_ContactDir

protected vector m_ContactDir
private

◆ m_DefaultOrientation

protected vector m_DefaultOrientation
private

Referenced by GetDefaultOrientation().

◆ m_FromAdjusted

protected vector m_FromAdjusted
private

◆ m_IsColliding

protected bool m_IsColliding
private

Referenced by IsColliding(), and SetIsColliding().

◆ m_IsCollidingGPlot

protected bool m_IsCollidingGPlot
private

◆ m_IsCollidingPlayer

protected bool m_IsCollidingPlayer
private

◆ m_IsFloating

protected bool m_IsFloating
private

Referenced by IsFloating(), and SetIsFloating().

◆ m_IsHidden

protected bool m_IsHidden
private

◆ m_IsSlope

protected bool m_IsSlope
private

◆ m_Parent

◆ m_Player

◆ m_Projection

◆ m_ProjectionTrigger

protected ProjectionTrigger m_ProjectionTrigger
private

◆ m_ProjectionTypename

protected string m_ProjectionTypename
private

Referenced by GetProjectionName(), and Hologram().

◆ m_Rotation

◆ m_SelectionsToRefresh

protected ref set<string> m_SelectionsToRefresh = new set<string>
private

◆ m_SlopeTolerance

protected float m_SlopeTolerance
private

Referenced by Hologram(), and IsBaseFlat().

◆ m_UpdatePosition

protected bool m_UpdatePosition
private

◆ m_WatchtowerBlockedComponentNames

const protected ref array<string> m_WatchtowerBlockedComponentNames = new array<string>
staticprivate

Referenced by Hologram(), and IsObjectStatic().

◆ m_WatchtowerIgnoreComponentNames

const protected ref array<string> m_WatchtowerIgnoreComponentNames = new array<string>
staticprivate

◆ m_y_p_r_previous

protected vector m_y_p_r_previous
private

◆ m_YawPitchRollLimit

protected vector m_YawPitchRollLimit
private

Referenced by Hologram(), and IsCollidingAngle().

◆ PLACEMENT_RC_END_OFFSET

protected const vector PLACEMENT_RC_END_OFFSET = "0 -2 0"
private

Referenced by IsBaseViable().

◆ PLACEMENT_RC_START_OFFSET

protected const vector PLACEMENT_RC_START_OFFSET = "0 1 0"
private

Referenced by IsBaseViable().

◆ PROJECTION_TRANSITION_MAX

protected const float PROJECTION_TRANSITION_MAX = 0.25
private

Referenced by SetHologramPosition().

◆ PROJECTION_TRANSITION_MIN

protected const float PROJECTION_TRANSITION_MIN = 1
private

Referenced by SetHologramPosition().

◆ SELECTION_INVENTORY

protected const string SELECTION_INVENTORY = "inventory"
private

Referenced by SetAnimations().

◆ SELECTION_PLACING

protected const string SELECTION_PLACING = "placing"
private

Referenced by SetAnimations().

◆ SMALL_PROJECTION_GROUND

protected const float SMALL_PROJECTION_GROUND = 2
private

Referenced by SetOnGround().

◆ SMALL_PROJECTION_RADIUS

protected const float SMALL_PROJECTION_RADIUS = 1
private

◆ SPAWN_FLAGS

protected const int SPAWN_FLAGS = ECE_LOCAL
private

Referenced by CreateTrigger().

◆ SUFFIX_MATERIAL_DEPLOYABLE

protected const string SUFFIX_MATERIAL_DEPLOYABLE = "_deployable.rvmat"
private

Referenced by CorrectMaterialPathName().

◆ SUFFIX_MATERIAL_POWERED

protected const string SUFFIX_MATERIAL_POWERED = "_powered.rvmat"
private

Referenced by CorrectMaterialPathName().

◆ SUFFIX_MATERIAL_UNDEPLOYABLE

protected const string SUFFIX_MATERIAL_UNDEPLOYABLE = "_undeployable.rvmat"
private

Referenced by CorrectMaterialPathName().


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