From bcca860e88fec80d558f22501eee3f4cd0c75c31 Mon Sep 17 00:00:00 2001 From: Jon Cundill Date: Fri, 8 Jul 2011 18:57:07 +0100 Subject: [PATCH] initial commit --- CONTRIBUTORS.txt | 4 + Flocking/Boid.cs | 340 ++++++++++++++++++ Flocking/Flocking.csproj | 138 +++++++ Flocking/Flocking.csproj.user | 12 + Flocking/Flocking.dll.build | 60 ++++ Flocking/Flocking.pidb | Bin 0 -> 18380 bytes Flocking/FlockingModel.cs | 58 +++ Flocking/FlockingModule.cs | 155 ++++++++ Flocking/FlockingView.cs | 145 ++++++++ Flocking/Util.cs | 51 +++ .../Flocking.Resources.Flocking.addin.xml | 13 + .../Flocking.csproj.FilesWrittenAbsolute.txt | 5 + Flocking/obj/Debug/Flocking.dll | Bin 0 -> 11264 bytes Flocking/obj/Debug/Flocking.dll.mdb | Bin 0 -> 3533 bytes Flocking/resources/Flocking.addin.xml | 13 + README | 16 + prebuild.xml | 35 ++ 17 files changed, 1045 insertions(+) create mode 100644 CONTRIBUTORS.txt create mode 100644 Flocking/Boid.cs create mode 100644 Flocking/Flocking.csproj create mode 100644 Flocking/Flocking.csproj.user create mode 100644 Flocking/Flocking.dll.build create mode 100644 Flocking/Flocking.pidb create mode 100644 Flocking/FlockingModel.cs create mode 100644 Flocking/FlockingModule.cs create mode 100644 Flocking/FlockingView.cs create mode 100644 Flocking/Util.cs create mode 100644 Flocking/obj/Debug/Flocking.Resources.Flocking.addin.xml create mode 100644 Flocking/obj/Debug/Flocking.csproj.FilesWrittenAbsolute.txt create mode 100755 Flocking/obj/Debug/Flocking.dll create mode 100644 Flocking/obj/Debug/Flocking.dll.mdb create mode 100644 Flocking/resources/Flocking.addin.xml create mode 100644 README create mode 100644 prebuild.xml diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt new file mode 100644 index 0000000..0ecda72 --- /dev/null +++ b/CONTRIBUTORS.txt @@ -0,0 +1,4 @@ +The following people have contributed to the development of the osboids module + +* Jon Cundill - initial implementation + diff --git a/Flocking/Boid.cs b/Flocking/Boid.cs new file mode 100644 index 0000000..00be5f1 --- /dev/null +++ b/Flocking/Boid.cs @@ -0,0 +1,340 @@ +/* + * Copyright (c) Contributors, https://github.com/jonc/osboids + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using OpenMetaverse; + +namespace Flocking +{ + public class Boid + { + private string m_id; + + private Vector3 m_loc; + private Quaternion m_rotation; + private Vector3 m_vel; + private Vector3 m_acc; + private Random m_rndnums = new Random (Environment.TickCount); + private float m_tolerance; // how close can we get to things witout being edgy + private float m_maxForce; // Maximum steering force + private float m_maxSpeed; // Maximum speed + + private float m_width = 255f; + private float m_height = 255f; + + private float m_neighborDist = 25.0f; + private float m_desiredSeparation = 20.0f; + + + /// + /// Initializes a new instance of the class. + /// + /// + /// L. the initial position of this boid + /// + /// + /// Ms. max speed this boid can attain + /// + /// + /// Mf. max force / acceleration this boid can extert + /// + public Boid (string id, float ms, float mf) + { + m_id = id; + m_acc = Vector3.Zero; + m_vel = new Vector3 (m_rndnums.Next (-1, 1), m_rndnums.Next (-1, 1), m_rndnums.Next (-1, 1)); + + m_tolerance = 2.0f; + m_maxSpeed = ms; + m_maxForce = mf; + } + + public Vector3 Location { + get { return m_loc;} + set { m_loc = value; } + } + + public Vector3 Velocity { + get { return m_vel;} + } + + public Quaternion Rotation { + get { return m_rotation; } + } + + public String Id { + get {return m_id;} + } + + /// + /// Moves our boid in the scene relative to the rest of the flock. + /// + /// + /// Boids. all the other chaps in the scene + /// + public void MoveInSceneRelativeToFlock (List boids) + { + Vector3 previousLoc = new Vector3( m_loc ); + Flock (boids); + UpdatePositionInScene (); + AvoidBorders (); + + m_rotation = Vector3.RotationBetween( previousLoc, m_loc ); + + //render(); + } + + /// + /// Move within our flock + /// + /// We accumulate a new acceleration each time based on three rules + /// these are: + /// our separation from our closest neighbours, + /// our desire to keep travelling within the local flock, + /// our desire to move towards the flock centre + /// + /// + void Flock (List boids) + { + + // calc the force vectors on this boid + Vector3 sep = Separate (boids); // Separation + Vector3 ali = Align (boids); // Alignment + Vector3 coh = Cohesion (boids); // Cohesion + + // Arbitrarily weight these forces + //TODO: expose these consts + sep *= 1.5f; //.mult(1.5); + //ali.mult(1.0); + ali *= 1.0f; + //coh.mult(1.0); + coh *= 1.0f; + + // Add the force vectors to the current acceleration of the boid + //acc.add(sep); + m_acc += sep; + //acc.add(ali); + m_acc += ali; + //acc.add(coh); + m_acc += coh; + } + + + /// + /// Method to update our location within the scene. + /// update our location in the world based on our + /// current location, velocity and acceleration + /// taking into account our max speed + /// + /// + void UpdatePositionInScene () + { + // Update velocity + //vel.add(acc); + m_vel += m_acc; + // Limit speed + //m_vel.limit(maxspeed); + m_vel = Util.Limit (m_vel, m_maxSpeed); + m_loc += m_vel; + // Reset accelertion to 0 each cycle + m_acc *= 0.0f; + } + + /// + /// Seek the specified target. Move into that flock + /// Accelerate us towards where we want to go + /// + /// + /// Target. the position within the flock we would like to achieve + /// + void Seek (Vector3 target) + { + m_acc += Steer (target, false); + } + + /// + /// Arrive the specified target. Slow us down, as we are almost there + /// + /// + /// Target. the flock we would like to think ourselves part of + /// + void arrive (Vector3 target) + { + m_acc += Steer (target, true); + } + + /// A method that calculates a steering vector towards a target + /// Takes a second argument, if true, it slows down as it approaches the target + Vector3 Steer (Vector3 target, bool slowdown) + { + Vector3 steer; // The steering vector + Vector3 desired = Vector3.Subtract(target, m_loc); // A vector pointing from the location to the target + float d = desired.Length (); // Distance from the target is the magnitude of the vector + // If the distance is greater than 0, calc steering (otherwise return zero vector) + if (d > 0) { + // Normalize desired + desired.Normalize (); + // Two options for desired vector magnitude (1 -- based on distance, 2 -- maxspeed) + if ((slowdown) && (d < 100.0f)) { + desired *= (m_maxSpeed * (d / 100.0f)); // This damping is somewhat arbitrary + } else { + desired *= m_maxSpeed; + } + // Steering = Desired minus Velocity + //steer = target.sub(desired,m_vel); + steer = Vector3.Subtract (desired, m_vel); + //steer.limit(maxforce); // Limit to maximum steering force + steer = Util.Limit (steer, m_maxForce); + } else { + steer = Vector3.Zero; + } + return steer; + } + + + /// + /// Borders this instance. + /// if we get too close wrap us around + /// CHANGE THIS to navigate away from whatever it is we are too close to + /// + void AvoidBorders () + { + if (m_loc.X < 5 || m_loc.X > 250) + m_vel.X = -m_vel.X; + if (m_loc.Y < 5 || m_loc.Y > 250) + m_vel.Y = -m_vel.Y; + if (m_loc.Z < 21 || m_loc.Z > 271 ) + m_vel.Z = -m_vel.Z; + } + + /// + /// Separate ourselves from the specified boids. + /// keeps us a respectable distance from our closest neighbours whilst still + /// being part of our local flock + /// + /// + /// Boids. all the boids in the scene + /// + Vector3 Separate (List boids) + { + Vector3 steer = new Vector3 (0, 0, 0); + int count = 0; + // For every boid in the system, check if it's too close + foreach (Boid other in boids) { + float d = Vector3.Distance (m_loc, other.Location); + // If the distance is greater than 0 and less than an arbitrary amount (0 when you are yourself) + if ((d > 0) && (d < m_desiredSeparation)) { + // Calculate vector pointing away from neighbor + Vector3 diff = Vector3.Subtract (m_loc, other.Location); + diff.Normalize (); + diff = Vector3.Divide (diff, d); + steer = Vector3.Add (steer, diff); + count++; // Keep track of how many + } + } + // Average -- divide by how many + if (count > 0) { + steer /= (float)count; + } + + // As long as the vector is greater than 0 + if (steer.Length () > 0) { + // Implement Reynolds: Steering = Desired - Velocity + steer.Normalize (); + steer *= m_maxSpeed; + steer -= m_vel; + //steer.limit(maxforce); + steer = Util.Limit (steer, m_maxForce); + } + return steer; + } + + /// + /// Align our boid within the flock. + /// For every nearby boid in the system, calculate the average velocity + /// and move us towards that - this keeps us moving with the flock. + /// + /// + /// Boids. all the boids in the scene - we only really care about those in the neighbourdist + /// + Vector3 Align (List boids) + { + Vector3 steer = new Vector3 (0, 0, 0); + int count = 0; + foreach (Boid other in boids) { + float d = Vector3.Distance (m_loc, other.Location); + if ((d > 0) && (d < m_neighborDist)) { + steer += other.Velocity; + count++; + } + } + if (count > 0) { + steer /= (float)count; + } + + // As long as the vector is greater than 0 + if (steer.Length () > 0) { + // Implement Reynolds: Steering = Desired - Velocity + steer.Normalize (); + steer *= m_maxSpeed; + steer -= m_vel; + //steer.limit(maxforce); + steer = Util.Limit (steer, m_maxForce); + + } + return steer; + } + + /// + /// MAintain the cohesion of our local flock + /// For the average location (i.e. center) of all nearby boids, calculate our steering vector towards that location + /// + /// + /// Boids. the boids in the scene + /// + Vector3 Cohesion (List boids) + { + + Vector3 sum = Vector3.Zero; // Start with empty vector to accumulate all locations + int count = 0; + + foreach (Boid other in boids) { + float d = Vector3.Distance (m_loc, other.Location); + if ((d > 0) && (d < m_neighborDist)) { + sum += other.Location; // Add location + count++; + } + } + if (count > 0) { + sum /= (float)count; + return Steer (sum, false); // Steer towards the location + } + return sum; + } + } +} + diff --git a/Flocking/Flocking.csproj b/Flocking/Flocking.csproj new file mode 100644 index 0000000..5dc2063 --- /dev/null +++ b/Flocking/Flocking.csproj @@ -0,0 +1,138 @@ + + + + Local + 9.0.21022 + 2.0 + {7BC283D1-0000-0000-0000-000000000000} + Debug + + + Flocking + JScript + Grid + IE50 + false + v3.5 + Library + + + Flocking + + + + + AnyCPU + + + 285212672 + + + TRACE;DEBUG + + + true + 4096 + false + ..\..\..\bin\ + False + False + 4 + AnyCPU + full + + + 285212672 + + + TRACE + + + 4096 + true + ..\..\..\bin\ + False + False + 4 + AnyCPU + none + + + + System + False + + + System.Drawing + False + + + System.Xml + False + + + ..\..\..\bin\log4net.dll + False + + + ..\..\..\bin\Nini.dll + False + + + ..\..\..\bin\OpenMetaverse.dll + False + + + ..\..\..\bin\OpenMetaverseTypes.dll + False + + + + + {7404933D-0000-0000-0000-000000000000} + OpenSim.Framework + False + + + {7667FA4E-0000-0000-0000-000000000000} + OpenSim.Framework.Communications + False + + + {16759386-0000-0000-0000-000000000000} + OpenSim.Framework.Console + False + + + {9169B545-0000-0000-0000-000000000000} + OpenSim.Region.Framework + False + + + + + Code + + + Code + + + Code + + + Code + + + Code + + + + + + + + + + + + diff --git a/Flocking/Flocking.csproj.user b/Flocking/Flocking.csproj.user new file mode 100644 index 0000000..6fb9ffe --- /dev/null +++ b/Flocking/Flocking.csproj.user @@ -0,0 +1,12 @@ + + + Debug + AnyCPU + /Users/jon/osim/opensim/bin/ + 9.0.21022 + ProjectFiles + 0 + + + + diff --git a/Flocking/Flocking.dll.build b/Flocking/Flocking.dll.build new file mode 100644 index 0000000..5260a51 --- /dev/null +++ b/Flocking/Flocking.dll.build @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Flocking/Flocking.pidb b/Flocking/Flocking.pidb new file mode 100644 index 0000000000000000000000000000000000000000..f68b0d9837a1d0c4912a7eaaf24fabe27af947a5 GIT binary patch literal 18380 zcmeHPO>i8?b>0DX7rP7ofcl}VA4@}0qW-`INl}ypk(5AyARz%H1%Q-nhJgmV4Pc1b znbpiJz@-$KlxSJD6331$J9e(gF|N`nm8u+c$R&s5oMVoz9FwXXgM8ncpPgCkE&-ZU z*(rCSd%NGfe(&|`*WIssdXUjFnaly?zUkOr`JCac_{O58 z27pkSc8uzzQSlvj;IeW(U=+rkTHSD!TOj6~c|&F2R!uK|*{~YQ8&V%M49oPJ5mqMC zm&xV&1`CBu=FKRhrnSg1z;;n#MA$lwwv|$2t-~tHFnYHq)T884wlde%y z>yEoxp0a)AE*TZ&5&IhA-l_ABJ-32>sRq~qaXjf1*vM7HTy4Q}mf7rE)aD4HjwoTn z!p{I6AG4KDHZ{cT)U?C4CxeZ`KyAURC|fir4LAbeo(OBhLGG!pt(jv@X-OS;IVna} z!`~0^3m(v^vM8?bcnQEqBg73Vkzf~bXQWJML9rdl;GvMOEv%VpJtlPwux~|3F)1IA z9TBO^z>hG(-v)k*wFPB!xKv|e#{nLSQ2W=AgXpd@s?8YXl@to;0%eK)8>76IMA>m2 zr9C0arFzxy)huF+Jc`E;BT6W8P&5%sQ?}`w7)xHuw8sEXnKl835hoEj0E0kH-ayQI zPQ$Gz0d9PVpTYB{ZDPW(m&|1%eT2AkDk#sjaHT?!kiqj&`OlCkj#Wb=rTjAB&HQqd#e_mJ5U3=Ym}L5B(V%XpIFP5?!IA8|8x z0Pnz;^$!RdlADO&TXWV_z&&pDBA%r95F^1PxpB)$7}1XbN>L!-5yYP$wgg8(LO;^|h>--Mbk17w3?XPpWGcfi$E?ul z>*FKNRV?!NX+({Z?way~2``xHQp7nYr36GdL*SE$v=kxUFT|a&$X`w;+HE8c&8oVE z36>)}o^4Yseh#cnEC{54zd#fg4+)De!y`KeScmWUM z>3Vkqr4sxxizzIwD*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h zgHO2XD@_kOa|^d?;r8TfKXK3@}Uc*UZ23kbsM6J*GWzryO% U1YjTXV09Zw#A@*NK>=p|54~1Hn*aa+ literal 0 HcmV?d00001 diff --git a/Flocking/FlockingModel.cs b/Flocking/FlockingModel.cs new file mode 100644 index 0000000..0fe3613 --- /dev/null +++ b/Flocking/FlockingModel.cs @@ -0,0 +1,58 @@ +/* + * Copyright (c) Contributors, https://github.com/jonc/osboids + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using OpenMetaverse; + +namespace Flocking +{ + public class FlockingModel + { + private List flock = new List(); + + + public void Initialise (int num, int xRange, int yRange, int zRange) + { + //TODO: fill in the initial Flock array properly + for (int i = 0; i < num; i++) { + Boid boid = new Boid ("boid"+i, 3.0f, 0.05f); + boid.Location = new Vector3 (xRange / 2f, yRange / 2f, zRange / 2f); + flock.Add (boid); + } + } + + public List UpdateFlockPos () + { + foreach (Boid b in flock) { + b.MoveInSceneRelativeToFlock(flock); // Passing the entire list of boids to each boid individually + } + + return flock; + } + } +} + diff --git a/Flocking/FlockingModule.cs b/Flocking/FlockingModule.cs new file mode 100644 index 0000000..63a9bfe --- /dev/null +++ b/Flocking/FlockingModule.cs @@ -0,0 +1,155 @@ +/* + * Copyright (c) Contributors, https://github.com/jonc/osboids + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Timers; +using System.Collections.Generic; +using OpenMetaverse; +using System.IO; +using Nini.Config; +using System.Threading; +using log4net; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Framework; +using OpenSim.Framework.Console; + + + +namespace Flocking +{ + public class FlockingModule : INonSharedRegionModule + { + + private static readonly ILog m_log = LogManager.GetLogger (System.Reflection.MethodBase.GetCurrentMethod ().DeclaringType); + + private Scene m_scene; + + private FlockingModel m_model; + private FlockingView m_view; + + private bool m_enabled = false; + private bool m_ready = false; + + private uint m_frame = 0; + private int m_frameUpdateRate = 1; + + + #region IRegionModule Members + + + + public void Initialise (IConfigSource source) + { + //TODO: check if we are in the ini files + //TODO: if so get some physical constants out of them and pass into the model + m_enabled = true; + } + + public void AddRegion (Scene scene) + { + m_log.Info("ADDING FLOCKING"); + m_scene = scene; + if (m_enabled) { + m_scene.EventManager.OnFrame += FlockUpdate; + + m_model = new FlockingModel(); + m_view = new FlockingView (m_scene); + + m_scene.AddCommand (this, "flocking", "I haz got a Flocking Module", "wotever" , null); + } + } + + public void RegionLoaded (Scene scene) + { + if (m_enabled) { + // Generate initial flock values + m_model.Initialise( 200, 255, 255, 255); + m_view.PostInitialize(); + + // Mark Module Ready for duty + m_ready = true; + } + } + + public void RemoveRegion (Scene scene) + { + if (m_enabled) { + m_scene.EventManager.OnFrame -= FlockUpdate; + } + } + + + public string Name { + get { return "FlockingModule"; } + } + + public bool IsSharedModule { + get { return false; } + } + + #endregion + + #region EventHandlers + + public void FlockUpdate() + { + if (((m_frame++ % m_frameUpdateRate) != 0) || !m_ready) + { + return; + } + + //m_log.InfoFormat("update my boids"); + + // work out where everyone has moved to + // and tell the scene to render the new positions + List boids = m_model.UpdateFlockPos(); + m_view.Render(boids); + } + + #endregion + + + + + #region IRegionModuleBase Members + + + + public void Close () + { + } + + + + public Type ReplaceableInterface { + get { return null; } + } + + #endregion + } + +} diff --git a/Flocking/FlockingView.cs b/Flocking/FlockingView.cs new file mode 100644 index 0000000..120dae1 --- /dev/null +++ b/Flocking/FlockingView.cs @@ -0,0 +1,145 @@ +/* + * Copyright (c) Contributors, https://github.com/jonc/osboids + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.Framework.Scenes; + +namespace Flocking +{ + public class FlockingView + { + private const float DEG_TO_RAD = 0.01745329238f; + + private Scene m_scene; + private UUID m_owner; + + private Dictionary m_sogMap = new Dictionary (); + + public FlockingView (Scene scene) + { + m_scene = scene; + } + + public void PostInitialize () + { + m_owner = m_scene.RegionInfo.EstateSettings.EstateOwner; + } + + public void Render (List boids) + { + foreach (Boid boid in boids) { + SceneObjectGroup sog = DrawBoid (boid); + //sog.ScheduleGroupForTerseUpdate (); + } + } + + private SceneObjectGroup DrawBoid (Boid boid) + { + SceneObjectPart existing = m_scene.GetSceneObjectPart (boid.Id); + + + SceneObjectGroup copy; + if (existing == null) { + SceneObjectGroup group = findByName ("boidPrim"); + copy = CopyPrim (group, boid.Id); + m_sogMap [boid.Id] = copy; + m_scene.AddNewSceneObject (copy, false); + } else { + copy = existing.ParentGroup; + } + + Quaternion rotation = CalcRotationToEndpoint (copy, copy.AbsolutePosition, boid.Location); + copy.UpdateGroupRotationPR (boid.Location, rotation); + return copy; + } + + private static Quaternion CalcRotationToEndpoint (SceneObjectGroup copy, Vector3 sv, Vector3 ev) + { + Vector3 currDirVec = Vector3.UnitX; + float angle = 0f; + + copy.GroupRotation.GetAxisAngle (out currDirVec, out angle); + currDirVec.Normalize (); + + + Vector3 desiredDirVec = Vector3.Subtract (ev, sv); + desiredDirVec.Normalize (); + + Quaternion rot = Vector3.RotationBetween (currDirVec, desiredDirVec); + + //Quaternion x90 = Quaternion.CreateFromEulers (90f * DEG_TO_RAD, 0f, 0f); + //rot = rot * x90; + + return rot; + } + + private SceneObjectGroup CopyPrim (SceneObjectGroup prim, string name) + { + SceneObjectGroup copy = prim.Copy (true); + copy.Name = name; + copy.DetachFromBackup (); + return copy; + } + + private SceneObjectGroup findByName (string name) + { + SceneObjectGroup retVal = null; + foreach (EntityBase e in m_scene.GetEntities()) { + if (e.Name == name) { + retVal = (SceneObjectGroup)e; + break; + } + } + + // can't find it so make a default one + if (retVal == null) { + retVal = MakeDefaultPrim (name); + } + + return retVal; + } + + private SceneObjectGroup MakeDefaultPrim (string name) + { + PrimitiveBaseShape shape = PrimitiveBaseShape.CreateSphere (); + shape.Scale = new Vector3 (0.5f, 0.5f, 2.5f); + + SceneObjectGroup prim = new SceneObjectGroup (m_owner, new Vector3 (128f, 128f, 25f), shape); + prim.Name = name; + prim.DetachFromBackup (); + m_scene.AddNewSceneObject (prim, false); + + return prim; + } + + + + } +} + diff --git a/Flocking/Util.cs b/Flocking/Util.cs new file mode 100644 index 0000000..b988eb6 --- /dev/null +++ b/Flocking/Util.cs @@ -0,0 +1,51 @@ +/* + * Copyright (c) Contributors, https://github.com/jonc/osboids + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using OpenMetaverse; + +namespace Flocking +{ + public class Util + { + public static Vector3 Limit (Vector3 initial, float maxLen) + { + float currLen = initial.Length (); + float ratio = 1.0f; + + if (currLen > maxLen) { + ratio = currLen / maxLen; + } + + return initial /= ratio; + + } + + + + } +} + diff --git a/Flocking/obj/Debug/Flocking.Resources.Flocking.addin.xml b/Flocking/obj/Debug/Flocking.Resources.Flocking.addin.xml new file mode 100644 index 0000000..5e1cfcd --- /dev/null +++ b/Flocking/obj/Debug/Flocking.Resources.Flocking.addin.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/Flocking/obj/Debug/Flocking.csproj.FilesWrittenAbsolute.txt b/Flocking/obj/Debug/Flocking.csproj.FilesWrittenAbsolute.txt new file mode 100644 index 0000000..c214cf1 --- /dev/null +++ b/Flocking/obj/Debug/Flocking.csproj.FilesWrittenAbsolute.txt @@ -0,0 +1,5 @@ +/Users/jon/osim/opensim/bin/Flocking.dll.mdb +/Users/jon/osim/opensim/bin/Flocking.dll +/Users/jon/osim/opensim/addon-modules/flocking/Flocking/obj/Debug/Flocking.dll +/Users/jon/osim/opensim/addon-modules/flocking/Flocking/obj/Debug/Flocking.dll.mdb +/Users/jon/osim/opensim/addon-modules/flocking/Flocking/obj/Debug/Flocking.Resources.Flocking.addin.xml diff --git a/Flocking/obj/Debug/Flocking.dll b/Flocking/obj/Debug/Flocking.dll new file mode 100755 index 0000000000000000000000000000000000000000..277aed5e187f406aaaac06e63055639ce08f4280 GIT binary patch literal 11264 zcmeHN4{#jSdH;6zZuf3=KKo9V$wpNEgZ>y}AoA*NC7pG5 zd+ePg%g%wAQVK0$$Ye?hNeV+kN!rqoflO#?T0%)dLhOC^Mc9P4MnV0&a z5BCubC>ovr_r`;j*43s6q7~xb!qZ2Y z0oN*v=nyxK6TJa>ORjmM$P(f&CakcCLN#n@;MdmR$&z!j1bny^0DZ#N3+4y;c+x9+ zDRc|nj-$bbUWU8o>ViX(o|ARKD0H1iC(CNXU2}C2?X5vY^ZdpY7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>esw?lJBmKJjVI8D5hmXi?wF}i@8#CoinJ;G&Y%i))D%as=WGv-{)KQvI15?RO z-7Z%-SM$_T>6$e&H*FBz_hrflGrO$rsbW%EN7LOaC>?mS=$=El$W2=n*V`6|t;nuq z%8z?jdi#VlgvgRA`A{_xm$b*LyyktQuR#C?Xb+^?k9n0Y?`hFagnl^nh;gNVdX>+- z7p-ooIo#AFnu{o360GChp_Sdj>M5VH%=f%ccu!gJGGSFld7WF$(kg__E}yd7*V)%* zxUiW38*UBKQzspu3Vvh+OIt0U+xzk9U{jj1ZzQ$ zC=|o~1e@kjE@d!E8ykiF7QeE?|0~$1Mo&^Mw8#8Pm;ZRL_7QvVbAILT{%)b}Q(#&0 zGat@B^ph87sjXR0Wu-=wrT&!vRj4;-sqI-?pq7YTJ*)ndNv6@zy9!Dv4dfG9mhw|& z#73)ZTOj)H%~JoA^&$GpMAhc$W)e3Pp>oKGw-DxNNEl6VDya!0Su1X1oG;dl2TVzE z&BJ2Qp_H%VV|e4EYufp^c2g`^`Er)JA+R$b#&w075{U{uFO998j+XzQ90~q@uEnCQ&{ySZaCtdA7PayFFWYQW9En zdTj*pTc=X`aH1LxCM#|h#Ck5F?7JnY_saW($7z&f + + + + + + + + + + + + diff --git a/README b/README new file mode 100644 index 0000000..6792399 --- /dev/null +++ b/README @@ -0,0 +1,16 @@ +Placeholder.... - preliminary commit + +Region Module - ability to control flocks within an OpenSim scene + +Build instructions +Add source tree under opensim/addon-modules + +./runprebuild.sh to build the module into a local server + +Prebuilt binaries etc.. to follow + +Currently only tested against opensim master + +Status: pre alpha + +Licence: all files released under a BSD licence diff --git a/prebuild.xml b/prebuild.xml new file mode 100644 index 0000000..9680676 --- /dev/null +++ b/prebuild.xml @@ -0,0 +1,35 @@ + + + + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + + + +