diff options
author | Sean Dague | 2007-09-17 12:52:03 +0000 |
---|---|---|
committer | Sean Dague | 2007-09-17 12:52:03 +0000 |
commit | b8d9737a47696952bedec33dface8f18df47341f (patch) | |
tree | 9279f45510f8a9285ac5b9c9165ab6c741009eac /OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | |
parent | I think this is the last bits for a consistant pristine (diff) | |
download | opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.zip opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.gz opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.bz2 opensim-SC_OLD-b8d9737a47696952bedec33dface8f18df47341f.tar.xz |
fixing me some line endings
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/ComplexObject.cs')
-rw-r--r-- | OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | 156 |
1 files changed, 78 insertions, 78 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs index 01af4f0..50154de 100644 --- a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | |||
@@ -1,78 +1,78 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Region.Environment.Scenes; | 4 | using OpenSim.Region.Environment.Scenes; |
5 | using Axiom.Math; | 5 | using Axiom.Math; |
6 | using libsecondlife; | 6 | using libsecondlife; |
7 | using OpenSim.Framework.Types; | 7 | using OpenSim.Framework.Types; |
8 | using OpenSim.Framework.Interfaces; | 8 | using OpenSim.Framework.Interfaces; |
9 | 9 | ||
10 | namespace SimpleApp | 10 | namespace SimpleApp |
11 | { | 11 | { |
12 | public class ComplexObject : SceneObjectGroup | 12 | public class ComplexObject : SceneObjectGroup |
13 | { | 13 | { |
14 | private LLQuaternion m_rotationDirection; | 14 | private LLQuaternion m_rotationDirection; |
15 | 15 | ||
16 | private class RotatingWheel : SceneObjectPart | 16 | private class RotatingWheel : SceneObjectPart |
17 | { | 17 | { |
18 | private LLQuaternion m_rotationDirection; | 18 | private LLQuaternion m_rotationDirection; |
19 | 19 | ||
20 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) | 20 | public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) |
21 | : base(regionHandle, parent, ownerID, localID, new CylinderShape( 0.5f, 0.2f ), groupPosition, offsetPosition ) | 21 | : base(regionHandle, parent, ownerID, localID, new CylinderShape( 0.5f, 0.2f ), groupPosition, offsetPosition ) |
22 | { | 22 | { |
23 | m_rotationDirection = rotationDirection; | 23 | m_rotationDirection = rotationDirection; |
24 | } | 24 | } |
25 | 25 | ||
26 | public override void UpdateMovement() | 26 | public override void UpdateMovement() |
27 | { | 27 | { |
28 | UpdateRotation(RotationOffset * m_rotationDirection); | 28 | UpdateRotation(RotationOffset * m_rotationDirection); |
29 | } | 29 | } |
30 | } | 30 | } |
31 | 31 | ||
32 | public override void UpdateMovement() | 32 | public override void UpdateMovement() |
33 | { | 33 | { |
34 | UpdateGroupRotation(GroupRotation * m_rotationDirection); | 34 | UpdateGroupRotation(GroupRotation * m_rotationDirection); |
35 | 35 | ||
36 | base.UpdateMovement(); | 36 | base.UpdateMovement(); |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) | 41 | public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos ) |
42 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) | 42 | : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) |
43 | { | 43 | { |
44 | m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); | 44 | m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); |
45 | 45 | ||
46 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), new LLQuaternion(0.05f,0,0))); | 46 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), new LLQuaternion(0.05f,0,0))); |
47 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), new LLQuaternion(-0.05f,0,0))); | 47 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), new LLQuaternion(-0.05f,0,0))); |
48 | 48 | ||
49 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f,0), new LLQuaternion(0.5f, 0, 0.05f))); | 49 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f,0), new LLQuaternion(0.5f, 0, 0.05f))); |
50 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f,0), new LLQuaternion(-0.5f, 0, -0.05f))); | 50 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f,0), new LLQuaternion(-0.5f, 0, -0.05f))); |
51 | 51 | ||
52 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), new LLQuaternion(0, 0.5f, 0.05f))); | 52 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), new LLQuaternion(0, 0.5f, 0.05f))); |
53 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), new LLQuaternion(0, -0.5f, -0.05f))); | 53 | AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), new LLQuaternion(0, -0.5f, -0.05f))); |
54 | 54 | ||
55 | UpdateParentIDs(); | 55 | UpdateParentIDs(); |
56 | } | 56 | } |
57 | 57 | ||
58 | public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) | 58 | public override void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient) |
59 | { | 59 | { |
60 | m_parts.Remove(part.UUID); | 60 | m_parts.Remove(part.UUID); |
61 | remoteClient.SendKillObject(m_regionHandle, part.LocalID); | 61 | remoteClient.SendKillObject(m_regionHandle, part.LocalID); |
62 | remoteClient.AddMoney(1); | 62 | remoteClient.AddMoney(1); |
63 | remoteClient.SendChatMessage("Poof!", 1, this.AbsolutePosition, "Party Party", LLUUID.Zero); | 63 | remoteClient.SendChatMessage("Poof!", 1, this.AbsolutePosition, "Party Party", LLUUID.Zero); |
64 | } | 64 | } |
65 | 65 | ||
66 | public override void OnGrabGroup( LLVector3 offsetPos, IClientAPI remoteClient) | 66 | public override void OnGrabGroup( LLVector3 offsetPos, IClientAPI remoteClient) |
67 | { | 67 | { |
68 | if( m_parts.Count == 1 ) | 68 | if( m_parts.Count == 1 ) |
69 | { | 69 | { |
70 | m_parts.Remove(m_rootPart.UUID); | 70 | m_parts.Remove(m_rootPart.UUID); |
71 | m_scene.RemoveEntity(this); | 71 | m_scene.RemoveEntity(this); |
72 | remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalID); | 72 | remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalID); |
73 | remoteClient.AddMoney(50); | 73 | remoteClient.AddMoney(50); |
74 | remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero); | 74 | remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", LLUUID.Zero); |
75 | } | 75 | } |
76 | } | 76 | } |
77 | } | 77 | } |
78 | } | 78 | } |