Ejemplo n.º 1
0
        public static DebugPlace AToB(Pivot pivot, Vector3 a, Vector3 b, Vector3 size, Vector3 up)
        {
            var offset = pivot == Pivot.Center ? Vector3.zero : up * size.y * 0.5f;
            var dir    = b - a;

            return(new DebugPlace(true)
            {
                position = a + dir * 0.5f + offset,
                rotation = Quaternion.LookRotation(Statics.normalize(dir), up),
                extents = Statics.vec3(0, 0, Statics.length(dir) * 0.5f) + size * 0.5f
            });
        }
Ejemplo n.º 2
0
 public static DebugPlace AToB(Pivot pivot, Vector3 a, Vector3 b, Vector3 up)
 {
     return(AToB(pivot, a, b, Statics.vec3(0), Vector3.up));
 }
Ejemplo n.º 3
0
 public static DebugPlace AToB(Vector3 a, Vector3 b, float size, Vector3 up)
 {
     return(AToB(Pivot.Center, a, b, Statics.vec3(size), up));
 }
Ejemplo n.º 4
0
 ///-----------------------------------------------------------------
 public static DebugPlace AToB(Vector3 a, Vector3 b)
 {
     return(AToB(Pivot.Center, a, b, Statics.vec3(0), Vector3.up));
 }
Ejemplo n.º 5
0
 public static DebugPlace At(Pivot pivot, Vector3 position, Quaternion rotation, float size)
 {
     return(At(pivot, position, rotation, Statics.vec3(size)));
 }
Ejemplo n.º 6
0
 ///-----------------------------------------------------------------
 public static DebugPlace At(Pivot pivot, float size)
 {
     return(At(pivot, Vector3.zero, Quaternion.identity, Statics.vec3(size)));
 }
Ejemplo n.º 7
0
 public static DebugPlace At(Vector3 position, float size)
 {
     return(At(Pivot.Center, position, Quaternion.identity, Statics.vec3(size)));
 }
Ejemplo n.º 8
0
 public static DebugPlace Ray(Pivot pivot, Vector3 position, Vector3 dir, float distance, Vector3 up)
 {
     return(Ray(pivot, position, dir, Statics.vec3(distance), up));
 }
Ejemplo n.º 9
0
 ///-----------------------------------------------------------------
 public static DebugPlace Ray(Pivot pivot, Vector3 position, float distance)
 {
     return(Ray(pivot, position, Vector3.forward, Statics.vec3(distance), Vector3.up));
 }
Ejemplo n.º 10
0
 public static DebugPlace Ray(Vector3 position, Vector3 dir, float distance)
 {
     return(Ray(Pivot.Center, position, dir, Statics.vec3(distance), Vector3.up));
 }
Ejemplo n.º 11
0
 public static DebugPlace AToB(Pivot pivot, Vector3 a, Vector3 b, float size)
 {
     return(AToB(pivot, a, b, Statics.vec3(size), Vector3.up));
 }