OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
VehicleConstants.cs
Go to the documentation of this file.
1 /*
2  * Copyright (c) Contributors, http://opensimulator.org/
3  * See CONTRIBUTORS.TXT for a full list of copyright holders.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the OpenSimulator Project nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 using System;
29 using OpenMetaverse;
30 
31 namespace OpenSim.Region.PhysicsModules.SharedBase
32 {
33  public enum Vehicle : int
34  {
38  TYPE_NONE = 0,
39 
44  TYPE_SLED = 1,
45 
52  TYPE_CAR = 2,
53  TYPE_BOAT = 3,
54  TYPE_AIRPLANE = 4,
55  TYPE_BALLOON = 5,
65 
74  HOVER_HEIGHT = 24,
75  HOVER_EFFICIENCY = 25,
76  HOVER_TIMESCALE = 26,
77  BUOYANCY = 27,
82 
92  BANKING_EFFICIENCY = 38,
93  BANKING_MIX = 39,
94  BANKING_TIMESCALE = 40,
95  REFERENCE_FRAME = 44,
96  BLOCK_EXIT = 45,
97  ROLL_FRAME = 46
98 
99  }
100 
101  [Flags]
102  public enum VehicleFlag
103  {
104  NO_DEFLECTION_UP = 1,
105  LIMIT_ROLL_ONLY = 2,
106  HOVER_WATER_ONLY = 4,
107  HOVER_TERRAIN_ONLY = 8,
108  HOVER_GLOBAL_HEIGHT = 16,
109  HOVER_UP_ONLY = 32,
110  LIMIT_MOTOR_UP = 64,
111  MOUSELOOK_STEER = 128,
112  MOUSELOOK_BANK = 256,
113  CAMERA_DECOUPLED = 512,
114  NO_X = 1024,
115  NO_Y = 2048,
116  NO_Z = 4096,
117  LOCK_HOVER_HEIGHT = 8192,
118  NO_DEFLECTION = 16392,
119  LOCK_ROTATION = 32784
120  }
121 
122  public struct VehicleData
123  {
124  public Vehicle m_type;
126 
127  // Linear properties
128  public Vector3 m_linearMotorDirection;
132  public Vector3 m_linearMotorOffset;
133 
134  //Angular properties
135  public Vector3 m_angularMotorDirection;
139 
140  //Deflection properties
145 
146  //Banking properties
147  public float m_bankingEfficiency;
148  public float m_bankingMix;
149  public float m_bankingTimescale;
150 
151  //Hover and Buoyancy properties
152  public float m_VhoverHeight;
153  public float m_VhoverEfficiency;
154  public float m_VhoverTimescale;
155  public float m_VehicleBuoyancy;
156 
157  //Attractor properties
160 
161  // Axis
162  public Quaternion m_referenceFrame;
163  }
164 }
Offset from center of mass where linear motor forces are added
No Angular motor, High Left right friction, No Hover, Linear Deflection 1, no angular deflection no v...
vector of timescales for exponential decay of angular velocity about three axis
angular velocity that vehicle will try for
Needs Motors to be driven by timer or control events High left/right friction, No angular friction Li...