aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
index afb0ba2..a288048 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSApiTemplate.cs
@@ -121,6 +121,14 @@ public struct SweepHit
121 public float Fraction; 121 public float Fraction;
122 public Vector3 Normal; 122 public Vector3 Normal;
123 public Vector3 Point; 123 public Vector3 Point;
124
125 public bool hasHit()
126 {
127 float sum = Fraction
128 + Normal.X + Normal.Y + Normal.Z
129 + Point.X + Point.Y + Point.Z;
130 return (sum != 0) || (ID != 0);
131 }
124} 132}
125[StructLayout(LayoutKind.Sequential)] 133[StructLayout(LayoutKind.Sequential)]
126public struct RaycastHit 134public struct RaycastHit
@@ -129,6 +137,12 @@ public struct RaycastHit
129 public float Fraction; 137 public float Fraction;
130 public Vector3 Normal; 138 public Vector3 Normal;
131 public Vector3 Point; 139 public Vector3 Point;
140
141 public bool hasHit()
142 {
143 float sum = Normal.X + Normal.Y + Normal.Z + Point.X + Point.Y + Point.Z;
144 return (sum != 0);
145 }
132} 146}
133[StructLayout(LayoutKind.Sequential)] 147[StructLayout(LayoutKind.Sequential)]
134public struct CollisionDesc 148public struct CollisionDesc