PageRenderTime 38ms CodeModel.GetById 33ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llmessage/llvehicleparams.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 123 lines | 64 code | 20 blank | 39 comment | 0 complexity | 13cb66e3e5bcf549839c8828a0a1d9e0 MD5 | raw file
  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=viewerlgpl$
  7 * Second Life Viewer Source Code
  8 * Copyright (C) 2010, Linden Research, Inc.
  9 * 
 10 * This library is free software; you can redistribute it and/or
 11 * modify it under the terms of the GNU Lesser General Public
 12 * License as published by the Free Software Foundation;
 13 * version 2.1 of the License only.
 14 * 
 15 * This library is distributed in the hope that it will be useful,
 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 18 * Lesser General Public License for more details.
 19 * 
 20 * You should have received a copy of the GNU Lesser General Public
 21 * License along with this library; if not, write to the Free Software
 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 23 * 
 24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 25 * $/LicenseInfo$
 26 */
 27
 28#ifndef LL_VEHICLE_PARAMS_H
 29#define LL_VEHICLE_PARAMS_H
 30
 31/** 
 32 * The idea is that the various parameters that control vehicle
 33 * behavior can be tweeked by name using general-purpose script calls.
 34 */
 35
 36typedef enum e_vehicle_param
 37{
 38	VEHICLE_TYPE_NONE,		// TYPE_0
 39	VEHICLE_TYPE_SLED,
 40	VEHICLE_TYPE_CAR,
 41	VEHICLE_TYPE_BOAT,
 42	VEHICLE_TYPE_AIRPLANE,
 43	VEHICLE_TYPE_BALLOON,	// TYPE_5
 44	VEHICLE_TYPE_6,
 45	VEHICLE_TYPE_7,
 46	VEHICLE_TYPE_8,
 47	VEHICLE_TYPE_9,
 48	VEHICLE_TYPE_10,
 49	VEHICLE_TYPE_11,
 50	VEHICLE_TYPE_12,
 51	VEHICLE_TYPE_13,
 52	VEHICLE_TYPE_14,
 53	VEHICLE_TYPE_15,
 54
 55	// vector parameters
 56	VEHICLE_LINEAR_FRICTION_TIMESCALE,
 57	VEHICLE_ANGULAR_FRICTION_TIMESCALE,
 58	VEHICLE_LINEAR_MOTOR_DIRECTION,
 59	VEHICLE_ANGULAR_MOTOR_DIRECTION,
 60	VEHICLE_LINEAR_MOTOR_OFFSET,
 61	VEHICLE_VECTOR_PARAM_5,
 62	VEHICLE_VECTOR_PARAM_6,
 63	VEHICLE_VECTOR_PARAM_7,
 64
 65	// floating point parameters
 66	VEHICLE_HOVER_HEIGHT,
 67	VEHICLE_HOVER_EFFICIENCY,
 68	VEHICLE_HOVER_TIMESCALE,
 69	VEHICLE_BUOYANCY,
 70
 71	VEHICLE_LINEAR_DEFLECTION_EFFICIENCY,
 72	VEHICLE_LINEAR_DEFLECTION_TIMESCALE,
 73	VEHICLE_LINEAR_MOTOR_TIMESCALE,
 74	VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE,
 75
 76	VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY,
 77	VEHICLE_ANGULAR_DEFLECTION_TIMESCALE,
 78	VEHICLE_ANGULAR_MOTOR_TIMESCALE,
 79	VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE,
 80
 81	VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY,
 82	VEHICLE_VERTICAL_ATTRACTION_TIMESCALE,
 83
 84	VEHICLE_BANKING_EFFICIENCY,
 85	VEHICLE_BANKING_MIX,
 86	VEHICLE_BANKING_TIMESCALE,
 87
 88	VEHICLE_FLOAT_PARAM_17,	
 89	VEHICLE_FLOAT_PARAM_18,	
 90	VEHICLE_FLOAT_PARAM_19,	
 91
 92	// rotation parameters
 93	VEHICLE_REFERENCE_FRAME,
 94	VEHICLE_ROTATION_PARAM_1,
 95	VEHICLE_ROTATION_PARAM_2,
 96	VEHICLE_ROTATION_PARAM_3,
 97
 98} EVehicleParam;
 99
100
101// some flags that effect how the vehicle moves
102
103// zeros world-z component of linear deflection
104const U32 VEHICLE_FLAG_NO_DEFLECTION_UP = 1 << 0;
105
106// spring-loads roll only
107const U32 VEHICLE_FLAG_LIMIT_ROLL_ONLY	= 1 << 1;
108
109// hover flags
110const U32 VEHICLE_FLAG_HOVER_WATER_ONLY		= 1 << 2;
111const U32 VEHICLE_FLAG_HOVER_TERRAIN_ONLY	= 1 << 3;
112const U32 VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT 	= 1 << 4;
113const U32 VEHICLE_FLAG_HOVER_UP_ONLY 		= 1 << 5;
114
115// caps world-z component of linear motor to prevent 
116// climbing up into the sky
117const U32 VEHICLE_FLAG_LIMIT_MOTOR_UP		= 1 << 6;
118
119const U32 VEHICLE_FLAG_MOUSELOOK_STEER 		= 1 << 7;
120const U32 VEHICLE_FLAG_MOUSELOOK_BANK 		= 1 << 8;
121const U32 VEHICLE_FLAG_CAMERA_DECOUPLED 	= 1 << 9;
122
123#endif