aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
diff options
context:
space:
mode:
authorRobert Adams2015-09-08 04:54:16 -0700
committerRobert Adams2015-09-08 04:54:16 -0700
commite5367d822be9b05e74c859afe2d2956a3e95aa33 (patch)
treee904050a30715df587aa527d7f313755177726a7 /OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
parentadd lost admin_reset_land method (diff)
parentDeleted access control spec from [LoginService] section of standalone config.... (diff)
downloadopensim-SC_OLD-e5367d822be9b05e74c859afe2d2956a3e95aa33.zip
opensim-SC_OLD-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.gz
opensim-SC_OLD-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.bz2
opensim-SC_OLD-e5367d822be9b05e74c859afe2d2956a3e95aa33.tar.xz
Merge of ubitworkvarnew with opensim/master as of 20150905.
This integrates the OpenSim refactoring to make physics, etc into modules. AVN physics hasn't been moved to new location. Does not compile yet. Merge branch 'osmaster' into mbworknew1
Diffstat (limited to 'OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs164
1 files changed, 164 insertions, 0 deletions
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
new file mode 100644
index 0000000..e850b11
--- /dev/null
+++ b/OpenSim/Region/PhysicsModules/SharedBase/VehicleConstants.cs
@@ -0,0 +1,164 @@
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
28using System;
29using OpenMetaverse;
30
31namespace OpenSim.Region.PhysicsModules.SharedBase
32{
33 public enum Vehicle : int
34 {
35 /// <summary>
36 /// Turns off Vehicle Support
37 /// </summary>
38 TYPE_NONE = 0,
39
40 /// <summary>
41 /// No Angular motor, High Left right friction, No Hover, Linear Deflection 1, no angular deflection
42 /// no vertical attractor, No banking, Identity rotation frame
43 /// </summary>
44 TYPE_SLED = 1,
45
46 /// <summary>
47 /// Needs Motors to be driven by timer or control events High left/right friction, No angular friction
48 /// Linear Motor wins in a second, decays in 60 seconds. Angular motor wins in a second, decays in 8/10ths of a second
49 /// linear deflection 2 seconds
50 /// Vertical Attractor locked UP
51 /// </summary>
52 TYPE_CAR = 2,
53 TYPE_BOAT = 3,
54 TYPE_AIRPLANE = 4,
55 TYPE_BALLOON = 5,
56 LINEAR_FRICTION_TIMESCALE = 16,
57 /// <summary>
58 /// vector of timescales for exponential decay of angular velocity about three axis
59 /// </summary>
60 ANGULAR_FRICTION_TIMESCALE = 17,
61 /// <summary>
62 /// linear velocity vehicle will try for
63 /// </summary>
64 LINEAR_MOTOR_DIRECTION = 18,
65
66 /// <summary>
67 /// Offset from center of mass where linear motor forces are added
68 /// </summary>
69 LINEAR_MOTOR_OFFSET = 20,
70 /// <summary>
71 /// angular velocity that vehicle will try for
72 /// </summary>
73 ANGULAR_MOTOR_DIRECTION = 19,
74 HOVER_HEIGHT = 24,
75 HOVER_EFFICIENCY = 25,
76 HOVER_TIMESCALE = 26,
77 BUOYANCY = 27,
78 LINEAR_DEFLECTION_EFFICIENCY = 28,
79 LINEAR_DEFLECTION_TIMESCALE = 29,
80 LINEAR_MOTOR_TIMESCALE = 30,
81 LINEAR_MOTOR_DECAY_TIMESCALE = 31,
82
83 /// <summary>
84 /// slide between 0 and 1
85 /// </summary>
86 ANGULAR_DEFLECTION_EFFICIENCY = 32,
87 ANGULAR_DEFLECTION_TIMESCALE = 33,
88 ANGULAR_MOTOR_TIMESCALE = 34,
89 ANGULAR_MOTOR_DECAY_TIMESCALE = 35,
90 VERTICAL_ATTRACTION_EFFICIENCY = 36,
91 VERTICAL_ATTRACTION_TIMESCALE = 37,
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;
125 public VehicleFlag m_flags;
126
127 // Linear properties
128 public Vector3 m_linearMotorDirection;
129 public Vector3 m_linearFrictionTimescale;
130 public float m_linearMotorDecayTimescale;
131 public float m_linearMotorTimescale;
132 public Vector3 m_linearMotorOffset;
133
134 //Angular properties
135 public Vector3 m_angularMotorDirection;
136 public float m_angularMotorTimescale;
137 public float m_angularMotorDecayTimescale;
138 public Vector3 m_angularFrictionTimescale;
139
140 //Deflection properties
141 public float m_angularDeflectionEfficiency;
142 public float m_angularDeflectionTimescale;
143 public float m_linearDeflectionEfficiency;
144 public float m_linearDeflectionTimescale;
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
158 public float m_verticalAttractionEfficiency;
159 public float m_verticalAttractionTimescale;
160
161 // Axis
162 public Quaternion m_referenceFrame;
163 }
164}