public override void Rotate(float Angle, float Ox, float Oy, float Oz)
        {
            float[] p1  = LightPos;
            _Affine rot = new _Affine();

            rot.Rotate(Angle, Ox, Oy, Oz);
            p1 = rot.ConvertPoint(p1);
            _Math3D.CopyMatrix(LightPos, p1);
            ChangeMatrix();
        }
예제 #2
0
        // Quay quanh truc bat ky
        public void Rotate(float angle, _Vector3D p0, _Vector3D p1)
        {
            _Vector3D v     = p1 - p0;
            _Affine   tran1 = new _Affine();
            _Affine   rot   = new _Affine();
            _Affine   tran2 = new _Affine();

            tran1.Translate(-p0.x, -p0.y, -p0.z);
            rot.Rotate(angle, v);
            tran2.Translate(p0.x, p0.y, p0.z);
            _Affine temp = tran1 + rot + tran2;

            _Math3D.CopyMatrix(mMatrix, temp.mMatrix);
        }
예제 #3
0
        public override void Rotate(float Angle, float Ox, float Oy, float Oz)
        {
            float[] p1 = new float[3] {
                pBegin.x, pBegin.y, pBegin.z
            };
            float[] p2 = new float[3] {
                pEnd.x, pEnd.y, pEnd.z
            };
            _Affine rot = new _Affine();

            rot.Rotate(Angle, Ox, Oy, Oz);
            p1     = rot.ConvertPoint(p1);
            p2     = rot.ConvertPoint(p2);
            mBegin = new _Vector3D(p1);
            mEnd   = new _Vector3D(p2);
            ChangeMatrix();
        }