Ejemplo n.º 1
0
        internal static void DrawBox(Vector3 center, DrawBoxStructure structure, LineDelegateSimple lineDelegate)
        {
            Vector3
                posUFL = structure.UFL + center,
                posUFR = structure.UFR + center,
                posUBL = structure.UBL + center,
                posUBR = structure.UBR + center,
                posDFL = structure.DFL + center,
                posDFR = structure.DFR + center,
                posDBL = structure.DBL + center,
                posDBR = structure.DBR + center;

            //up
            lineDelegate(posUFL, posUFR);
            lineDelegate(posUFR, posUBR);
            lineDelegate(posUBR, posUBL);
            lineDelegate(posUBL, posUFL);
            //down
            lineDelegate(posDFL, posDFR);
            lineDelegate(posDFR, posDBR);
            lineDelegate(posDBR, posDBL);
            lineDelegate(posDBL, posDFL);
            //down to up
            lineDelegate(posDFL, posUFL);
            lineDelegate(posDFR, posUFR);
            lineDelegate(posDBR, posUBR);
            lineDelegate(posDBL, posUBL);
        }
Ejemplo n.º 2
0
        internal static void DrawBox(
            Vector3 center,
            Vector3 halfExtents,
            Quaternion orientation,
            LineDelegateSimple lineDelegate)
        {
            DrawBoxStructure box = new DrawBoxStructure(halfExtents, orientation);

            DrawBox(center, box, lineDelegate);
        }
Ejemplo n.º 3
0
        internal static void DrawBox2DFast(
            Vector2 offset,
            DrawBoxStructure2D boxStructure2D,
            LineDelegateSimple lineDelegate)
        {
            Vector2 uRPosition = offset + boxStructure2D.UR;
            Vector2 uLPosition = offset + boxStructure2D.UL;
            Vector2 bRPosition = offset + boxStructure2D.BR;
            Vector2 bLPosition = offset + boxStructure2D.BL;

            lineDelegate(uLPosition, uRPosition);
            lineDelegate(uRPosition, bRPosition);
            lineDelegate(bRPosition, bLPosition);
            lineDelegate(bLPosition, uLPosition);
        }