aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-28 05:25:21 +0000
committerTeravus Ovares2007-12-28 05:25:21 +0000
commit67bbed820290b0307f09f29343e5fc96bdfc669a (patch)
tree154efd468369742724b06589e167b66a6de937ba /OpenSim/Framework
parentAdd missing "System." to System.NullReferenceException (diff)
downloadopensim-SC_OLD-67bbed820290b0307f09f29343e5fc96bdfc669a.zip
opensim-SC_OLD-67bbed820290b0307f09f29343e5fc96bdfc669a.tar.gz
opensim-SC_OLD-67bbed820290b0307f09f29343e5fc96bdfc669a.tar.bz2
opensim-SC_OLD-67bbed820290b0307f09f29343e5fc96bdfc669a.tar.xz
* Added ability to create new prim on existing prim (rezzing prim from inventory on other prim coming soon). No more new prim buried in the ground by accident.
* The prim are at the absolute position of the prim you rezzed it on top of + (0,0,0.5) for now.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Framework/Util.cs12
2 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 8ef5576..9072035 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -332,7 +332,7 @@ namespace OpenSim.Framework
332 332
333 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 333 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
334 334
335 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, LLQuaternion rot, PrimitiveBaseShape shape); 335 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection);
336 336
337 public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client); 337 public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, IClientAPI remote_client);
338 338
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 3654a7d..e6512c2 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -46,6 +46,8 @@ namespace OpenSim.Framework
46 private static object XferLock = new object(); 46 private static object XferLock = new object();
47 private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>(); 47 private static Dictionary<LLUUID, string> capsURLS = new Dictionary<LLUUID, string>();
48 48
49 #region Vector Equasions
50
49 public static double GetDistanceTo(LLVector3 a, LLVector3 b) 51 public static double GetDistanceTo(LLVector3 a, LLVector3 b)
50 { 52 {
51 float dx = a.X - b.X; 53 float dx = a.X - b.X;
@@ -53,6 +55,16 @@ namespace OpenSim.Framework
53 float dz = a.Z - b.Z; 55 float dz = a.Z - b.Z;
54 return Math.Sqrt(dx*dx + dy*dy + dz*dz); 56 return Math.Sqrt(dx*dx + dy*dy + dz*dz);
55 } 57 }
58 public static double GetMagnitude(LLVector3 a) {
59 return Math.Sqrt((a.X * a.X) + (a.Y * a.Y) + (a.Z * a.Z));
60 }
61 public static LLVector3 GetNormal(LLVector3 a)
62 {
63 float Mag = (float)GetMagnitude(a);
64 return new LLVector3(a.X / Mag, a.Y / Mag, a.Z / Mag);
65
66 }
67 # endregion
56 68
57 public static ulong UIntsToLong(uint X, uint Y) 69 public static ulong UIntsToLong(uint X, uint Y)
58 { 70 {