BVB Source Codes

CRYENGINE Show TacticalPointQueryEnum.h Source code

Return Download CRYENGINE: download TacticalPointQueryEnum.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /********************************************************************
  4.    ---------------------------------------------------------------------
  5.    File name:   TacticalPointQueryEnum.h
  6.    $Id$
  7.    $DateTime$
  8.    Description: The core enum of the TPS system, listing all query tokens
  9.              Never used it before? There a comprehensive technical word doc!
  10.              If you are ADDING a query, read the short notes below
  11.    ---------------------------------------------------------------------
  12.    History:
  13.    - 30:07:2007 : Separated out by Matthew Jack
  14.  
  15.  *********************************************************************/
  16.  
  17. /* Adding a Query - quickstart - MTJ 11/09/2007
  18.  
  19.    1. Add the query to the appropriate section of the enum below. NOTE that the values and order are important!
  20.    2. Add an entry in the keyword map, to allow the query to be parsed (CTacticalPointSystem::CTacticalPointSystem())
  21.    3. Give it a cost ordering (WIP) for performance purposes (also CTacticalPointSystem::CTacticalPointSystem())
  22.    4. Enter the query in the appropriate switch statement in BoolProperty(), BoolTest(), RealProperty(), RealMeasure().
  23.    5. If it's real-valued, give an _appropriate_ output range in the RealRange() switch statement.
  24.    6. Run.
  25.  */
  26.  
  27. #pragma once
  28.  
  29. #ifndef __TacticalPointQueryEnum_H__
  30.         #define __TacticalPointQueryEnum_H__
  31.  
  32.         #if _MSC_VER > 1000
  33.                 #pragma once
  34.         #endif
  35.  
  36.         #include <CryAISystem/ITacticalPointSystem.h>
  37.  
  38. typedef uint32 TTacticalPointQuery;
  39.  
  40. /*
  41.    This would leave space for 4096 generators without the aux object, but only 8 with.
  42.    Also, in the case of those _O queries, the object would need to be removed to access the actual query
  43.  */
  44.  
  45. // When adding to this enum, remember to add the corresponding string for parsing
  46.  
  47. // The below is NOT a misguided attempt at performance optimization.
  48. // It is a way to greatly simplify the code by making every token output by the string parser
  49. // of a single type which contains simple flags to differentiate types of token and can immediately
  50. // be stored in a Criterion without requiring any further types or classes.
  51. // Saves a whole bunch of functions and if/elses to maintain typing.
  52. // ( But it certainly shouldn't be any slower either mind you ;-) )
  53.  
  54. enum ETacticalPointQuery
  55. {
  56.         eTPQ_None = 0,                    // Useful to indicate "none" or "unrecognised"
  57.         eTPQ_Glue,                        // Useful token to indicate "glue word" but this is never stored
  58.         eTPQ_Around,                      // We take careful note of parsing this particular glueword for Generation,
  59.         //  to make sure that the Object and aux Object (if any) don't get confused
  60.         //  but again it is not explicitly stored
  61.  
  62.         eTPQ_MASK_QUERYSPACE_GEN_O = 0x0000000F,    // Query space for 16 Generator O queries
  63.         eTPQ_MASK_OBJECT_AUX       = 0x00000FF0,    // Only within an eTPQ_FLAG_GENERATOR_O, these nibbles hold an auxiliary object
  64.         eTPQ_MASK_QUERYSPACE       = 0x00000FFF,    // Query space for 4096 queries
  65.  
  66.         eTPQ_FLAG_PROP_BOOL        = 0x00001000,    // Flags queries that depend on no Object and are Boolean-valued
  67.         eTPQ_PB_CoverSoft,
  68.         eTPQ_PB_CoverSuperior,
  69.         eTPQ_PB_CoverInferior,
  70.         eTPQ_PB_CurrentlyUsedObject,
  71.         eTPQ_PB_Reachable,
  72.         eTPQ_PB_IsInNavigationMesh,               // Checks if a point can be associated with a valid mesh triangle
  73.         eTPQ_GAMESTART_PROP_BOOL,
  74.  
  75.         eTPQ_FLAG_PROP_REAL = 0x00002000,           // Flags queries that depend on no Object and are Real-valued
  76.         eTPQ_PR_CoverRadius,
  77.         eTPQ_PR_CoverDensity,
  78.         eTPQ_PR_BulletImpacts,
  79.         eTPQ_PR_HostilesDistance,
  80.         eTPQ_PR_FriendlyDistance,
  81.         eTPQ_PR_CameraVisibility,
  82.         eTPQ_PR_CameraCenter,
  83.         eTPQ_PR_Random,
  84.         eTPQ_PR_Type,
  85.         eTPQ_GAMESTART_PROP_REAL,
  86.  
  87.         eTPQ_FLAG_TEST = 0x00004000,              // Flags queries that use an Object and are Boolean-valued
  88.         eTPQ_T_Visible,
  89.         eTPQ_T_CanShoot,
  90.         eTPQ_T_CanShootTwoRayTest,                // Performs two raycasts horizontally spaced apart from the location of the weapon.
  91.         eTPQ_T_Towards,
  92.         eTPQ_T_CanReachBefore,
  93.         eTPQ_T_CrossesLineOfFire,
  94.         eTPQ_T_HasShootingPosture,
  95.         eTPQ_T_OtherSide,
  96.         eTPQ_GAMESTART_TEST,
  97.  
  98.         eTPQ_FLAG_MEASURE = 0x00008000,             // Flags queries that use an Object and are Real-valued
  99.         eTPQ_M_Distance,
  100.         eTPQ_M_Distance2d,
  101.         eTPQ_M_PathDistance,
  102.         eTPQ_M_ChangeInDistance,
  103.         eTPQ_M_DistanceInDirection,
  104.         eTPQ_M_DistanceLeft,
  105.         eTPQ_M_RatioOfDistanceFromActorAndDistance,
  106.         eTPQ_M_Directness,
  107.         eTPQ_M_Dot,
  108.         eTPQ_M_ObjectsDot,
  109.         eTPQ_M_ObjectsMoveDirDot,
  110.         eTPQ_M_HeightRelative,
  111.         eTPQ_M_AngleOfElevation,
  112.         eTPQ_M_PointDirDot,
  113.         eTPQ_M_CoverHeight,
  114.         eTPQ_M_EffectiveCoverHeight,
  115.         eTPQ_M_DistanceToRay,                     // Smallest distance to ray constructed from an object's pivot and its forward direction.
  116.         eTPQ_M_AbsDistanceToPlaneAtClosestRayPos, // Absolute distance to the plane that is placed at the actor's closest point on a ray
  117.         // (the normal of the plane is that of the ray's direction).
  118.         eTPQ_GAMESTART_MEASURE,
  119.  
  120.         eTPQ_FLAG_GENERATOR = 0x00010000,           // Flags queries that generate points
  121.         eTPQ_G_Grid,
  122.         eTPQ_G_Entities,
  123.         eTPQ_G_Indoor,
  124.         eTPQ_G_CurrentPos,
  125.         eTPQ_G_CurrentCover,
  126.         eTPQ_G_CurrentFormationPos,
  127.         eTPQ_G_Objects,
  128.         eTPQ_G_PointsInNavigationMesh,
  129.         eTPQ_G_PureGrid,
  130.         eTPQ_GAMESTART_GENERATOR,
  131.  
  132.         eTPQ_FLAG_GENERATOR_O = 0x00020000,           // Flags queries that generate points referring to an object
  133.         eTPQ_GO_Hidespots,
  134.         eTPQ_GO_Cover,
  135.         eTPQ_GAMESTART_GENERATOR_O,
  136.  
  137.         eTPQ_MASK_QUERY_TYPE     = 0x000FF000,    // Mask to remove any Limit flags and leave just Query type
  138.         eTPQ_MASK_QUERY          = 0x000FFFFF,    // Mask to remove any Limit flags and leave just Query
  139.  
  140.         eTPQ_FLAG_PRIMARY_OBJECT = 0x00100000,          // Starts range describing the primary Object
  141.         eTPQ_O_Actor,
  142.         eTPQ_O_AttentionTarget,                 // Valid to leave these nibbles blank, for no Object
  143.         eTPQ_O_RealTarget,
  144.         eTPQ_O_ReferencePoint,
  145.         eTPQ_O_ReferencePointOffsettedByItsForwardDirection,
  146.         eTPQ_O_CurrentFormationRef,
  147.         eTPQ_O_Player,
  148.         eTPQ_O_Leader,
  149.         eTPQ_O_LastOp,
  150.         eTPQ_O_None,
  151.         eTPQ_O_Entity,
  152.         eTPQ_GAMESTART_PRIMARY_OBJECT,
  153.  
  154.         eTPQ_MASK_OBJECT = 0x0FF00000,            // Mask to just leave the primary Object
  155.  
  156.         eTPQ_L_Min       = 0x10000000,          // Start range describing any Limit that should be applied
  157.         eTPQ_L_Max       = 0x20000000,          // Limits effectively provide conversion from Real to Boolean
  158.         eTPQ_L_Equal     = 0x30000000,          // Limits effectively provide conversion from Real to Boolean
  159.  
  160.         eTPQ_MASK_LIMIT  = 0xF0000000,            // Mask to remove Query and leave just Limit flags
  161. };
  162.  
  163. enum ETacticalPointQueryParameter
  164. {
  165.         eTPQP_Invalid        = 0,
  166.  
  167.         eTPQP_FLAG_PROP_BOOL = 0x00001000,
  168.  
  169.         eTPQP_FLAG_PROP_REAL = 0x00002000,
  170.         eTPQP_ObjectsType,
  171.         eTPQP_Density,
  172.         eTPQP_Height,
  173.         eTPQP_HorizontalSpacing,
  174.  
  175.         eTPQP_FLAG_PROP_STRING = 0x00004000,
  176.         eTPQP_OptionLabel,
  177.         eTPQP_TagPointPostfix,
  178.         eTPQP_ExtenderStringParameter,
  179.         eTPQP_NavigationAgentType,
  180.  
  181.         eTPQP_MASK_TYPE = 0x000FF000,
  182. };
  183.  
  184. enum ETPSRelativeValueSource
  185. {
  186.         eTPSRVS_Invalid      = 0,
  187.  
  188.         eTPSRVS_objectRadius = 0x00000001,
  189. };
  190.  
  191. #endif // __TacticalPointQueryEnum_H__
  192.  
downloadTacticalPointQueryEnum.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top