aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs
diff options
context:
space:
mode:
authorlbsa712007-08-15 16:57:47 +0000
committerlbsa712007-08-15 16:57:47 +0000
commitc47bca94d23420b164e5f32aa5c781009496e0d3 (patch)
tree1334b22e0580c1584a7ef7dfb537339992f2b0ef /OpenSim/Region/Examples/SimpleApp/ComplexObject.cs
parent* Applying ckrinke's LSL baseclass changes (Thanks!) (diff)
downloadopensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.zip
opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.tar.gz
opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.tar.bz2
opensim-SC_OLD-c47bca94d23420b164e5f32aa5c781009496e0d3.tar.xz
* Exploring Group/Part from an app perspective.
Diffstat (limited to 'OpenSim/Region/Examples/SimpleApp/ComplexObject.cs')
-rw-r--r--OpenSim/Region/Examples/SimpleApp/ComplexObject.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs
new file mode 100644
index 0000000..25960b7
--- /dev/null
+++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs
@@ -0,0 +1,46 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Region.Environment.Scenes;
5using Axiom.Math;
6using libsecondlife;
7using OpenSim.Framework.Types;
8
9namespace SimpleApp
10{
11 public class ComplexObject : SceneObjectGroup
12 {
13 private LLQuaternion m_rotationDirection;
14
15 private class RotatingWheel : SceneObjectPart
16 {
17 private static LLQuaternion m_rotationDirection = new LLQuaternion(0.05f, 0, 0);
18
19 public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition)
20 : base(regionHandle, parent, ownerID, localID, BoxShape.Default, groupPosition, offsetPosition )
21 {
22 }
23
24 public override void UpdateMovement()
25 {
26 UpdateRotation(RotationOffset * m_rotationDirection);
27 }
28 }
29
30 public override void UpdateMovement()
31 {
32 UpdateGroupRotation(Rotation * m_rotationDirection);
33
34 base.UpdateMovement();
35 }
36
37 public ComplexObject(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos )
38 : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default )
39 {
40 m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f);
41
42 AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 1f)));
43 AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -1f)));
44 }
45 }
46}