public override void Translate(float Ox, float Oy, float Oz)
        {
            float[] p1   = LightPos;
            _Affine tran = new _Affine();

            tran.Translate(Ox, Oy, Oz);
            p1 = tran.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 Translate(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 tran = new _Affine();

            tran.Translate(Ox, Oy, Oz);
            p1     = tran.ConvertPoint(p1);
            p2     = tran.ConvertPoint(p2);
            mBegin = new _Vector3D(p1);
            mEnd   = new _Vector3D(p2);
            ChangeMatrix();
        }