From a4602515ce5dd50b7391269f2c706269d4ec833f Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 15 Aug 2007 18:02:05 +0000 Subject: * Added more spinning parts to ComplexObject. * We now have CylinderShape * This commit dedicated to the birth of techno house. --- OpenSim/Region/Examples/SimpleApp/ComplexObject.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Examples') diff --git a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs index b21e4aa..b1da33a 100644 --- a/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/ComplexObject.cs @@ -14,11 +14,12 @@ namespace SimpleApp private class RotatingWheel : SceneObjectPart { - private static LLQuaternion m_rotationDirection = new LLQuaternion(0.05f, 0, 0); + private LLQuaternion m_rotationDirection; - public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition) - : base(regionHandle, parent, ownerID, localID, BoxShape.Default, groupPosition, offsetPosition ) + public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection) + : base(regionHandle, parent, ownerID, localID, new CylinderShape( 0.5f, 0.2f ), groupPosition, offsetPosition ) { + m_rotationDirection = rotationDirection; } public override void UpdateMovement() @@ -38,10 +39,16 @@ namespace SimpleApp : base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default ) { m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f); - - AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 1f))); - AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -1f))); + AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), new LLQuaternion(0.05f,0,0))); + AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), new LLQuaternion(-0.05f,0,0))); + + AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f,0), new LLQuaternion(0.5f, 0, 0.05f))); + AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f,0), new LLQuaternion(-0.5f, 0, -0.05f))); + + AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), new LLQuaternion(0, 0.5f, 0.05f))); + AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), new LLQuaternion(0, -0.5f, -0.05f))); + UpdateParentIDs(); } } -- cgit v1.1