예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Assert(P0 != null);   // Verify proper setting in the editor
        Debug.Assert(P1 != null);
        Debug.Assert(P2 != null);

        #region For visualizing the vectors
        // To support visualizing the vectors
        ShowV1 = new MyVector {
            VectorColor = Color.cyan
        };
        ShowV2 = new MyVector
        {
            VectorColor = Color.magenta
        };
        ShowDot = new MyLineSegment
        {
            VectorAt  = Vector3.zero,
            LineWidth = 0.07f
        };
        ShowPlane = new MyXZPlane
        {
            PlaneColor = new Color(0.3f, 0.8f, 0.3f, 0.5f),
            XSize      = 0.5f,
            YSize      = 0.5f,
            ZSize      = 0.5f
        };
        #endregion
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Assert(P0 != null);   // Verify proper setting in the editor
        Debug.Assert(P1 != null);
        Debug.Assert(P2 != null);

        #region For visualizing the vectors
        // To support visualizing the vectors
        ShowV1 = new MyVector {
            VectorColor = Color.cyan
        };
        ShowV2 = new MyVector
        {
            VectorColor = Color.magenta
        };
        ShowV1xV2 = new MyVector
        {
            VectorColor = V1xV2Color
        };
        ShowV2xV1 = new MyVector
        {
            VectorColor = V2xV1Color
        };
        ShowPlane = new MyXZPlane
        {
            PlaneColor = new Color(0.3f, 0.8f, 0.3f, 0.5f),
            XSize      = 0.5f,
            YSize      = 0.5f,
            ZSize      = 0.5f
        };
        #endregion
    }
예제 #3
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Assert(Pn != null);   // Verify proper setting in the editor
        Debug.Assert(P0 != null);
        Debug.Assert(P1 != null);
        Debug.Assert(Pon != null);

        #region For visualizing the vectors
        // To support visualizing the vectors
        ShowNormal = new MyVector {
            VectorColor = Color.white
        };
        ShowPlane = new MyXZPlane
        {
            PlaneColor = new Color(0.8f, 0.3f, 0.3f, 1.0f),
            XSize      = 0.5f,
            YSize      = 0.5f,
            ZSize      = 0.5f
        };
        ShowLine = new MyLineSegment
        {
            VectorColor = Color.black,
            LineWidth   = 0.05f
        };
        ShowRestOfLine = new MyLineSegment
        {
            VectorColor = Color.red,
            LineWidth   = 0.05f
        };
        #endregion
    }
예제 #4
0
    private MyLineSegment ShowPtLine; // Line to Pt
    #endregion

    // Start is called before the first frame update
    void Start()
    {
        #region Identical to EX_6_2
        Debug.Assert(P0 != null);   // Verify proper setting in the editor
        Debug.Assert(P1 != null);
        Debug.Assert(P2 != null);
        Debug.Assert(Ds != null);
        Debug.Assert(Pn != null);
        Debug.Assert(Pt != null);
        Debug.Assert(Pon != null);
        #endregion

        Debug.Assert(P2p != null);

        #region For visualizing the vectors
        // To support visualizing the vectors
        ShowV1 = new MyVector
        {
            VectorColor = Color.cyan
        };
        ShowV2 = new MyVector
        {
            VectorColor = Color.magenta
        };
        ShowV3 = new MyVector
        {
            VectorColor = Color.green
        };
        ShowNormal = new MyVector {
            VectorColor = Color.white
        };
        ShowVn = new MyVector
        {
            VectorColor = Color.black
        };
        ShowPlane = new MyXZPlane
        {
            PlaneColor = new Color(0.8f, 0.3f, 0.3f, 1.0f),
            XSize      = 0.5f,
            YSize      = 0.5f,
            ZSize      = 0.5f
        };
        ShowPtLine = new MyLineSegment
        {
            VectorColor = Color.black,
            LineWidth   = 0.05f
        };
        #endregion
    }
예제 #5
0
    // Start is called before the first frame update
    void Start()
    {
        Debug.Assert(Pa != null);     // Verify proper setting in the editor
        Debug.Assert(Pb != null);
        Debug.Assert(Pc != null);
        Debug.Assert(Pn != null);
        Debug.Assert(Ps != null);
        Debug.Assert(Pon != null);
        Debug.Assert(Pr != null);
        Debug.Assert(Pt != null);

        #region For visualization
        // To support visualizing the vectors
        ShowAim = new MyVector
        {
            VectorColor = new Color(1.0f, 0f, 0f, 1.0f)
        };

        ShowVrN = new MyVector
        {
            VectorColor = Color.black
        };
        ShowReflectionPlane = new MyXZPlane
        {
            XSize      = 2f,
            ZSize      = 2f,
            PlaneColor = new Color(0.8f, 1.0f, 0.8f, 1.0f)
        };

        /*
         * ShowProj = new MyLineSegment
         * {
         *  VectorColor = Color.black,
         *  LineWidth = 0.02f
         * };
         * ShowToPn = new MyLineSegment
         * {
         *  VectorColor = Color.red,
         *  LineWidth = 0.02f
         * };
         * ShowFromPn = new MyLineSegment
         * {
         *  VectorColor = Color.red,
         *  LineWidth = 0.02f
         * }; */
        #endregion
    }