// Token: 0x06000204 RID: 516 RVA: 0x00009198 File Offset: 0x00007398 public static double DistanceTo(this Vector3 vector3, AxisAlignedBox3 axisAlignedBox3) { Box3 box = new Box3(axisAlignedBox3.Center, UnitVector3.UnitX, UnitVector3.UnitY, UnitVector3.UnitZ, axisAlignedBox3.ExtentX, axisAlignedBox3.ExtentY, axisAlignedBox3.ExtentZ); DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(vector3, box); return(distanceVector3Box.Distance); }
// Token: 0x06000205 RID: 517 RVA: 0x000091E8 File Offset: 0x000073E8 public static Segment3 ShortestSegmentTo(this Vector3 vector3, AxisAlignedBox3 axisAlignedBox3) { Box3 box = new Box3(axisAlignedBox3.Center, UnitVector3.UnitX, UnitVector3.UnitY, UnitVector3.UnitZ, axisAlignedBox3.ExtentX, axisAlignedBox3.ExtentY, axisAlignedBox3.ExtentZ); DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(vector3, box); return(new Segment3(distanceVector3Box.ClosestPointOnVector, distanceVector3Box.ClosestPointOnBox)); }
// Token: 0x060001A8 RID: 424 RVA: 0x00007B9C File Offset: 0x00005D9C public DistanceSegment3Box3(Segment3 segment, Box3 box) { this = default(DistanceSegment3Box3); Line3 line = new Line3(segment.Origin, segment.Direction); DistanceLine3Box3 distanceLine3Box = new DistanceLine3Box3(line, box); if (distanceLine3Box.LineParameter < -segment.Extent) { DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(segment.NegativeEnd, box); this.SquaredDistance = distanceVector3Box.SquaredDistance; this.ClosestPointOnSegment = distanceVector3Box.ClosestPointOnVector; this.ClosestPointOnBox = distanceVector3Box.ClosestPointOnBox; return; } if (distanceLine3Box.LineParameter <= segment.Extent) { this.SquaredDistance = distanceLine3Box.SquaredDistance; this.ClosestPointOnSegment = distanceLine3Box.ClosestPointOnLine; this.ClosestPointOnBox = distanceLine3Box.ClosestPointOnBox; return; } DistanceVector3Box3 distanceVector3Box2 = new DistanceVector3Box3(segment.PositiveEnd, box); this.SquaredDistance = distanceVector3Box2.SquaredDistance; this.ClosestPointOnSegment = distanceVector3Box2.ClosestPointOnVector; this.ClosestPointOnBox = distanceVector3Box2.ClosestPointOnBox; }
// Token: 0x06000008 RID: 8 RVA: 0x00002110 File Offset: 0x00000310 public static Vector3 ClosestPointTo(this AxisAlignedBox3 axisAlignedBox3, Vector3 vector3) { Box3 box = new Box3(axisAlignedBox3.Center, UnitVector3.UnitX, UnitVector3.UnitY, UnitVector3.UnitZ, axisAlignedBox3.ExtentX, axisAlignedBox3.ExtentY, axisAlignedBox3.ExtentZ); DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(vector3, box); return(distanceVector3Box.ClosestPointOnBox); }
// Token: 0x06000215 RID: 533 RVA: 0x0000949C File Offset: 0x0000769C public DistanceVector3Box3(Vector3 vector, Box3 box) { this = default(DistanceVector3Box3); Vector3 diff = vector - box.Center; Vector3 right; double num = DistanceVector3Box3.CalcAxis(diff, box.Axis0, box.Extent0, out right); Vector3 right2; double num2 = DistanceVector3Box3.CalcAxis(diff, box.Axis1, box.Extent1, out right2); Vector3 right3; double num3 = DistanceVector3Box3.CalcAxis(diff, box.Axis2, box.Extent2, out right3); this.ClosestPointOnVector = vector; this.ClosestPointOnBox = box.Center + right + right2 + right3; this.SquaredDistance = num + num2 + num3; }
// Token: 0x06000135 RID: 309 RVA: 0x000066CC File Offset: 0x000048CC public DistanceRay3Box3(Ray3 ray, Box3 box) { this = default(DistanceRay3Box3); Line3 line = new Line3(ray.Origin, ray.Direction); DistanceLine3Box3 distanceLine3Box = new DistanceLine3Box3(line, box); if (distanceLine3Box.LineParameter >= 0.0) { this.SquaredDistance = distanceLine3Box.SquaredDistance; this.ClosestPointOnRay = distanceLine3Box.ClosestPointOnLine; this.ClosestPointOnBox = distanceLine3Box.ClosestPointOnBox; return; } DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(ray.Origin, box); this.SquaredDistance = distanceVector3Box.SquaredDistance; this.ClosestPointOnRay = distanceVector3Box.ClosestPointOnVector; this.ClosestPointOnBox = distanceVector3Box.ClosestPointOnBox; }
// Token: 0x06000203 RID: 515 RVA: 0x0000916C File Offset: 0x0000736C public static Segment3 ShortestSegmentTo(this Vector3 vector3, Box3 box3) { DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(vector3, box3); return(new Segment3(distanceVector3Box.ClosestPointOnVector, distanceVector3Box.ClosestPointOnBox)); }
// Token: 0x06000202 RID: 514 RVA: 0x0000914C File Offset: 0x0000734C public static double DistanceTo(this Vector3 vector3, Box3 box3) { DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(vector3, box3); return(distanceVector3Box.Distance); }
// Token: 0x0600002E RID: 46 RVA: 0x00002980 File Offset: 0x00000B80 public static Vector3 ClosestPointTo(this Box3 box3, Vector3 vector3) { DistanceVector3Box3 distanceVector3Box = new DistanceVector3Box3(vector3, box3); return(distanceVector3Box.ClosestPointOnBox); }