Esempio n. 1
0
    } = 0;                                  //tamamlanan basamak sayısı

    //Editör debugging için
    public void OnDrawGizmos()
    {
        EzySlice.Plane cuttingPlane = new EzySlice.Plane();

        cuttingPlane.Compute(knifeBlade.transform);
        cuttingPlane.OnDebugDraw();
    }
    /**
     * This is for Visual debugging purposes in the editor
     */
    public void OnDrawGizmos()
    {
        EzySlice.Plane cuttingPlane = new EzySlice.Plane();

        // the plane will be set to the same coordinates as the object that this
        // script is attached to
        // NOTE -> Debug Gizmo drawing only works if we pass the transform
        cuttingPlane.Compute(transform);

        // draw gizmos for the plane
        // NOTE -> Debug Gizmo drawing is ONLY available in editor mode. Do NOT try
        // to run this in the final build or you'll get crashes (most likey)
        cuttingPlane.OnDebugDraw();
    }
Esempio n. 3
0
    void OnDrawGizmos()
    {
        if (triPisitionA == null || triPositionB == null || triPositionC == null || plane == null)
        {
            return;
        }

        Triangle newTri = new Triangle(triPisitionA.transform.position, triPositionB.transform.position, triPositionC.transform.position);

        EzySlice.Plane newPlane = new EzySlice.Plane();
        newPlane.Compute(plane);

        newTri.OnDebugDraw(Color.yellow);
        newPlane.OnDebugDraw(Color.yellow);

        IntersectionResult newResult = new IntersectionResult();

        bool result = newTri.Split(newPlane, newResult);

        if (result)
        {
            newResult.OnDebugDraw(Color.green);
        }
    }
 private void OnDrawGizmos()
 {
     plane.OnDebugDraw();
 }
Esempio n. 5
0
 public void OnDrawGizmos()
 {
     EzySlice.Plane cuttingPlane = new EzySlice.Plane(transform.position, transform.up);
     cuttingPlane.Compute(transform);
     cuttingPlane.OnDebugDraw();
 }