Private Member Functions | |
| void | ActionTargets (PlayerBase player) |
| void | Clear () |
| void | Update () |
| protected array< int > | SortResultsDistance (array< ref RaycastRVResult > results) |
| private bool | IsObstructed (Object object) |
| private bool | IsObstructedEx (Object object, IsObjectObstructedCache cache) |
| int | GetTargetsCount () |
| returns count of founded targets | |
| ActionTarget | GetTarget (int index) |
| returns action target at index | |
| private void | StoreTarget (ActionTarget pActionTarget) |
| inserts action into sorted array based on utility | |
| private int | FindIndexForStoring (float value) |
| binary search algorithm | |
| private float | ComputeUtility (Object pTarget, vector pRayStart, vector pRayEnd, Object cursorTarget, vector hitPos) |
| computes utility of target | |
| private float | DistSqrPoint2Line (vector pPoint, vector pL1, vector pL2) |
| distance between point and line | |
| private void | FilterDuplicateVicinityObjects (inout array< Object > vicinityObjectsOutput, array< RaycastRVResult > sortedRaycastResults) |
| private void | FilterObstructedObjectsEx (Object cursor_target, array< Object > vicinityObjects) |
| private void | FilterObstructedObjects (Object cursor_target) |
| vector | CalculateRayStart () |
| DEPRECATED. | |
Static Private Member Functions | |
| static array< Object > | GetVicinityObjects () |
Private Attributes | |
| private ref map< int, ref array< RaycastRVResult > > | m_SortedResults = new map<int, ref array<RaycastRVResult>>() |
| private PlayerBase | m_Player |
| player owner | |
| private ref array< ref ActionTarget > | m_Targets |
| selected & sorted targets by utility function | |
| private vector | m_RayEnd |
| private vector | m_HitPos |
| private const float | c_RayDistance = 5.0 |
| first valid hitpos! Used only as rough reference value for conecasted results. | |
| private const float | c_MaxTargetDistance = 3.0 |
| private const float | c_MaxActionDistance = UAMaxDistances.DEFAULT |
| private const float | c_ConeAngle = 30.0 |
| private const float | c_ConeHeightMin = -0.5 |
| private const float | c_ConeHeightMax = 2.0 |
| private const float | c_DistanceDelta = 0.3 |
| private const float | c_UtilityMaxValue = 10000 |
| utility constants | |
| private const float | c_UtilityMaxDistFromRaySqr = 0.8 * 0.8 |
| private const string | CE_CENTER = "ce_center" |
| p3d | |
| private const float | HEIGHT_OFFSET = 0.2 |
| private const int | OBSTRUCTED_COUNT_THRESHOLD = 3 |
| misc | |
| private const int | GROUPING_COUNT_THRESHOLD = 10 |
Static Private Attributes | |
| static private ref VicinityObjects m_VicinityObjects private bool m_Debug private vector | m_RayStart |
| objects in vicinity | |
|
inlineprivate |
|
private |
DEPRECATED.
|
inlineprivate |
References m_HitPos, m_SortedResults, m_Targets, and vector::Zero.
Referenced by ActionManagerClient::Update().
|
inlineprivate |
computes utility of target
out of reach
ground and static objects
basebuilding objects
References c_MaxTargetDistance, c_UtilityMaxDistFromRaySqr, c_UtilityMaxValue, vector::DistanceSq(), and DistSqrPoint2Line().
distance between point and line
References vector::DistanceSq(), and vector::Dot().
Referenced by ComputeUtility().
|
inlineprivate |
|
inlineprivate |
check if targets are not obstructed (eg.: wall)
check for object obstruction(if the object is not a proxy - has no parent)
when the number of obstructed items is higher than OBSTRUCTED_COUNT_THRESHOLD remove do no run obstruction check and skip these items
obstruction check
References IsObjectObstructedCache(), IsObstructedEx(), m_RayStart, m_VicinityObjects, and OBSTRUCTED_COUNT_THRESHOLD.
Referenced by FilterObstructedObjectsEx().
|
inlineprivate |
returns action target at index
References m_Targets.
Referenced by ActionManagerClient::FindActionTarget().
|
inlineprivate |
returns count of founded targets
References m_Targets.
Referenced by ActionManagerClient::FindActionTarget().
References m_VicinityObjects.
References IsObjectObstructedCache(), IsObstructedEx(), and m_RayStart.
|
inlineprivate |
Referenced by FilterObstructedObjects(), and IsObstructed().
|
inlineprivate |
References vector::DistanceSq(), m_RayStart, and m_SortedResults.
|
inlineprivate |
inserts action into sorted array based on utility
References FindIndexForStoring(), and m_Targets.
|
inlineprivate |
clear state
camera & ray properties
if the cursor target is a proxy
ignores attachments on player and objects with invalid IDs
spacial search
removes player from the vicinity
transformation of array of Objects to hashmap (VicinityObjects)
removes Vicinity objects that are not directly visible from player position
select & sort targets based on utility function
action target for surface actions (lowest utility)
Referenced by ActionManagerClient::Update().
|
private |
|
private |
|
private |
|
private |
Referenced by FilterObstructedObjectsEx().
|
private |
|
private |
Referenced by ComputeUtility(), and FilterObstructedObjectsEx().
|
private |
first valid hitpos! Used only as rough reference value for conecasted results.
searching properties
|
private |
Referenced by ComputeUtility().
|
private |
utility constants
Referenced by ComputeUtility().
|
private |
p3d
|
private |
Referenced by FilterObstructedObjectsEx().
|
private |
|
private |
player owner
|
private |
|
staticprivate |
objects in vicinity
Referenced by FilterObstructedObjects(), FilterObstructedObjectsEx(), IsObstructed(), and SortResultsDistance().
|
private |
Referenced by Clear(), and SortResultsDistance().
|
private |
selected & sorted targets by utility function
Referenced by Clear(), FindIndexForStoring(), GetRawVicinityObjects(), GetTarget(), GetTargetsCount(), and StoreTarget().
|
private |
misc
Referenced by FilterObstructedObjects().