llvehicleparams.h
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:4k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. /** 
  2.  * @file llvehicleparams.h
  3.  * @brief For parameter names that must be shared between the
  4.  * scripting language and the LLVehicleAction class on the simulator.
  5.  *
  6.  * $LicenseInfo:firstyear=2003&license=viewergpl$
  7.  * 
  8.  * Copyright (c) 2003-2010, Linden Research, Inc.
  9.  * 
  10.  * Second Life Viewer Source Code
  11.  * The source code in this file ("Source Code") is provided by Linden Lab
  12.  * to you under the terms of the GNU General Public License, version 2.0
  13.  * ("GPL"), unless you have obtained a separate licensing agreement
  14.  * ("Other License"), formally executed by you and Linden Lab.  Terms of
  15.  * the GPL can be found in doc/GPL-license.txt in this distribution, or
  16.  * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  17.  * 
  18.  * There are special exceptions to the terms and conditions of the GPL as
  19.  * it is applied to this Source Code. View the full text of the exception
  20.  * in the file doc/FLOSS-exception.txt in this software distribution, or
  21.  * online at
  22.  * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  23.  * 
  24.  * By copying, modifying or distributing this software, you acknowledge
  25.  * that you have read and understood your obligations described above,
  26.  * and agree to abide by those obligations.
  27.  * 
  28.  * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  29.  * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  30.  * COMPLETENESS OR PERFORMANCE.
  31.  * $/LicenseInfo$
  32.  */
  33. #ifndef LL_VEHICLE_PARAMS_H
  34. #define LL_VEHICLE_PARAMS_H
  35. /** 
  36.  * The idea is that the various parameters that control vehicle
  37.  * behavior can be tweeked by name using general-purpose script calls.
  38.  */
  39. typedef enum e_vehicle_param
  40. {
  41. VEHICLE_TYPE_NONE, // TYPE_0
  42. VEHICLE_TYPE_SLED,
  43. VEHICLE_TYPE_CAR,
  44. VEHICLE_TYPE_BOAT,
  45. VEHICLE_TYPE_AIRPLANE,
  46. VEHICLE_TYPE_BALLOON, // TYPE_5
  47. VEHICLE_TYPE_6,
  48. VEHICLE_TYPE_7,
  49. VEHICLE_TYPE_8,
  50. VEHICLE_TYPE_9,
  51. VEHICLE_TYPE_10,
  52. VEHICLE_TYPE_11,
  53. VEHICLE_TYPE_12,
  54. VEHICLE_TYPE_13,
  55. VEHICLE_TYPE_14,
  56. VEHICLE_TYPE_15,
  57. // vector parameters
  58. VEHICLE_LINEAR_FRICTION_TIMESCALE,
  59. VEHICLE_ANGULAR_FRICTION_TIMESCALE,
  60. VEHICLE_LINEAR_MOTOR_DIRECTION,
  61. VEHICLE_ANGULAR_MOTOR_DIRECTION,
  62. VEHICLE_LINEAR_MOTOR_OFFSET,
  63. VEHICLE_VECTOR_PARAM_5,
  64. VEHICLE_VECTOR_PARAM_6,
  65. VEHICLE_VECTOR_PARAM_7,
  66. // floating point parameters
  67. VEHICLE_HOVER_HEIGHT,
  68. VEHICLE_HOVER_EFFICIENCY,
  69. VEHICLE_HOVER_TIMESCALE,
  70. VEHICLE_BUOYANCY,
  71. VEHICLE_LINEAR_DEFLECTION_EFFICIENCY,
  72. VEHICLE_LINEAR_DEFLECTION_TIMESCALE,
  73. VEHICLE_LINEAR_MOTOR_TIMESCALE,
  74. VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE,
  75. VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY,
  76. VEHICLE_ANGULAR_DEFLECTION_TIMESCALE,
  77. VEHICLE_ANGULAR_MOTOR_TIMESCALE,
  78. VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE,
  79. VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY,
  80. VEHICLE_VERTICAL_ATTRACTION_TIMESCALE,
  81. VEHICLE_BANKING_EFFICIENCY,
  82. VEHICLE_BANKING_MIX,
  83. VEHICLE_BANKING_TIMESCALE,
  84. VEHICLE_FLOAT_PARAM_17,
  85. VEHICLE_FLOAT_PARAM_18,
  86. VEHICLE_FLOAT_PARAM_19,
  87. // rotation parameters
  88. VEHICLE_REFERENCE_FRAME,
  89. VEHICLE_ROTATION_PARAM_1,
  90. VEHICLE_ROTATION_PARAM_2,
  91. VEHICLE_ROTATION_PARAM_3,
  92. } EVehicleParam;
  93. // some flags that effect how the vehicle moves
  94. // zeros world-z component of linear deflection
  95. const U32 VEHICLE_FLAG_NO_DEFLECTION_UP = 1 << 0;
  96. // spring-loads roll only
  97. const U32 VEHICLE_FLAG_LIMIT_ROLL_ONLY = 1 << 1;
  98. // hover flags
  99. const U32 VEHICLE_FLAG_HOVER_WATER_ONLY = 1 << 2;
  100. const U32 VEHICLE_FLAG_HOVER_TERRAIN_ONLY = 1 << 3;
  101. const U32 VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT  = 1 << 4;
  102. const U32 VEHICLE_FLAG_HOVER_UP_ONLY  = 1 << 5;
  103. // caps world-z component of linear motor to prevent 
  104. // climbing up into the sky
  105. const U32 VEHICLE_FLAG_LIMIT_MOTOR_UP = 1 << 6;
  106. const U32 VEHICLE_FLAG_MOUSELOOK_STEER  = 1 << 7;
  107. const U32 VEHICLE_FLAG_MOUSELOOK_BANK  = 1 << 8;
  108. const U32 VEHICLE_FLAG_CAMERA_DECOUPLED  = 1 << 9;
  109. #endif