diff options
author | Jeff Ames | 2008-06-26 00:30:33 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-26 00:30:33 +0000 |
commit | e75dc1bd230700c4b5f17caea49879517d065251 (patch) | |
tree | 1c9db8aa919ce2a623cf7657e2cd4f83ff358d5a /OpenSim/Region/Physics/POSPlugin/POSCharacter.cs | |
parent | added the flag param to IClientAPI.SendMapBlock (diff) | |
download | opensim-SC_OLD-e75dc1bd230700c4b5f17caea49879517d065251.zip opensim-SC_OLD-e75dc1bd230700c4b5f17caea49879517d065251.tar.gz opensim-SC_OLD-e75dc1bd230700c4b5f17caea49879517d065251.tar.bz2 opensim-SC_OLD-e75dc1bd230700c4b5f17caea49879517d065251.tar.xz |
Separate POS classes into mutiple files.
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSCharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/POSPlugin/POSCharacter.cs | 262 |
1 files changed, 262 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs new file mode 100644 index 0000000..d146b60 --- /dev/null +++ b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs | |||
@@ -0,0 +1,262 @@ | |||
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 OpenSim 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 System.Collections.Generic; | ||
30 | using Axiom.Math; | ||
31 | using Nini.Config; | ||
32 | using OpenSim.Framework; | ||
33 | using OpenSim.Region.Physics.Manager; | ||
34 | |||
35 | namespace OpenSim.Region.Physics.POSPlugin | ||
36 | { | ||
37 | public class POSCharacter : PhysicsActor | ||
38 | { | ||
39 | private PhysicsVector _position; | ||
40 | public PhysicsVector _velocity; | ||
41 | public PhysicsVector _target_velocity = PhysicsVector.Zero; | ||
42 | private PhysicsVector _acceleration; | ||
43 | private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; | ||
44 | private bool flying; | ||
45 | private bool iscolliding; | ||
46 | |||
47 | public POSCharacter() | ||
48 | { | ||
49 | _velocity = new PhysicsVector(); | ||
50 | _position = new PhysicsVector(); | ||
51 | _acceleration = new PhysicsVector(); | ||
52 | } | ||
53 | |||
54 | public override int PhysicsActorType | ||
55 | { | ||
56 | get { return (int) ActorTypes.Agent; } | ||
57 | set { return; } | ||
58 | } | ||
59 | |||
60 | public override PhysicsVector RotationalVelocity | ||
61 | { | ||
62 | get { return m_rotationalVelocity; } | ||
63 | set { m_rotationalVelocity = value; } | ||
64 | } | ||
65 | |||
66 | public override bool SetAlwaysRun | ||
67 | { | ||
68 | get { return false; } | ||
69 | set { return; } | ||
70 | } | ||
71 | |||
72 | public override uint LocalID | ||
73 | { | ||
74 | set { return; } | ||
75 | } | ||
76 | |||
77 | public override bool Grabbed | ||
78 | { | ||
79 | set { return; } | ||
80 | } | ||
81 | |||
82 | public override bool Selected | ||
83 | { | ||
84 | set { return; } | ||
85 | } | ||
86 | |||
87 | public override float Buoyancy | ||
88 | { | ||
89 | get { return 0f; } | ||
90 | set { return; } | ||
91 | } | ||
92 | |||
93 | public override bool FloatOnWater | ||
94 | { | ||
95 | set { return; } | ||
96 | } | ||
97 | |||
98 | public override bool IsPhysical | ||
99 | { | ||
100 | get { return false; } | ||
101 | set { return; } | ||
102 | } | ||
103 | |||
104 | public override bool ThrottleUpdates | ||
105 | { | ||
106 | get { return false; } | ||
107 | set { return; } | ||
108 | } | ||
109 | |||
110 | public override bool Flying | ||
111 | { | ||
112 | get { return flying; } | ||
113 | set { flying = value; } | ||
114 | } | ||
115 | |||
116 | public override bool IsColliding | ||
117 | { | ||
118 | get { return iscolliding; } | ||
119 | set { iscolliding = value; } | ||
120 | } | ||
121 | |||
122 | public override bool CollidingGround | ||
123 | { | ||
124 | get { return false; } | ||
125 | set { return; } | ||
126 | } | ||
127 | |||
128 | public override bool CollidingObj | ||
129 | { | ||
130 | get { return false; } | ||
131 | set { return; } | ||
132 | } | ||
133 | |||
134 | public override bool Stopped | ||
135 | { | ||
136 | get { return false; } | ||
137 | } | ||
138 | |||
139 | public override PhysicsVector Position | ||
140 | { | ||
141 | get { return _position; } | ||
142 | set { _position = value; } | ||
143 | } | ||
144 | |||
145 | public override PhysicsVector Size | ||
146 | { | ||
147 | get { return new PhysicsVector(0.5f, 0.5f, 1.0f); } | ||
148 | set { } | ||
149 | } | ||
150 | |||
151 | public override float Mass | ||
152 | { | ||
153 | get { return 0f; } | ||
154 | } | ||
155 | |||
156 | public override PhysicsVector Force | ||
157 | { | ||
158 | get { return PhysicsVector.Zero; } | ||
159 | } | ||
160 | |||
161 | public override PhysicsVector CenterOfMass | ||
162 | { | ||
163 | get { return PhysicsVector.Zero; } | ||
164 | } | ||
165 | |||
166 | public override PhysicsVector GeometricCenter | ||
167 | { | ||
168 | get { return PhysicsVector.Zero; } | ||
169 | } | ||
170 | |||
171 | public override PrimitiveBaseShape Shape | ||
172 | { | ||
173 | set { return; } | ||
174 | } | ||
175 | |||
176 | public override PhysicsVector Velocity | ||
177 | { | ||
178 | get { return _velocity; } | ||
179 | set { _target_velocity = value; } | ||
180 | } | ||
181 | |||
182 | public override float CollisionScore | ||
183 | { | ||
184 | get { return 0f; } | ||
185 | set { } | ||
186 | } | ||
187 | |||
188 | public override Quaternion Orientation | ||
189 | { | ||
190 | get { return Quaternion.Identity; } | ||
191 | set { } | ||
192 | } | ||
193 | |||
194 | public override PhysicsVector Acceleration | ||
195 | { | ||
196 | get { return _acceleration; } | ||
197 | } | ||
198 | |||
199 | public override bool Kinematic | ||
200 | { | ||
201 | get { return true; } | ||
202 | set { } | ||
203 | } | ||
204 | |||
205 | public override void link(PhysicsActor obj) | ||
206 | { | ||
207 | } | ||
208 | |||
209 | public override void delink() | ||
210 | { | ||
211 | } | ||
212 | |||
213 | public override void LockAngularMotion(PhysicsVector axis) | ||
214 | { | ||
215 | } | ||
216 | |||
217 | public void SetAcceleration(PhysicsVector accel) | ||
218 | { | ||
219 | _acceleration = accel; | ||
220 | } | ||
221 | |||
222 | public override void AddForce(PhysicsVector force, bool pushforce) | ||
223 | { | ||
224 | } | ||
225 | |||
226 | public override void SetMomentum(PhysicsVector momentum) | ||
227 | { | ||
228 | } | ||
229 | |||
230 | public override void CrossingFailure() | ||
231 | { | ||
232 | } | ||
233 | |||
234 | public override PhysicsVector PIDTarget | ||
235 | { | ||
236 | set { return; } | ||
237 | } | ||
238 | |||
239 | public override bool PIDActive | ||
240 | { | ||
241 | set { return; } | ||
242 | } | ||
243 | |||
244 | public override float PIDTau | ||
245 | { | ||
246 | set { return; } | ||
247 | } | ||
248 | |||
249 | public override void SubscribeEvents(int ms) | ||
250 | { | ||
251 | } | ||
252 | |||
253 | public override void UnSubscribeEvents() | ||
254 | { | ||
255 | } | ||
256 | |||
257 | public override bool SubscribedEvents() | ||
258 | { | ||
259 | return false; | ||
260 | } | ||
261 | } | ||
262 | } | ||