Example #1
0
 public Matrix44()
 {
     m_Proxy = MathAdaptorFactory.Instance.CreateMatrix44Adaptor();
 }
Example #2
0
 public Matrix44(Matrix44Adaptor proxy)
 {
     m_Proxy = proxy;
 }
Example #3
0
 public abstract PointAdaptor Transform(Matrix44Adaptor transProxy);
Example #4
0
 public void LeftMultiply(Matrix44 rhs)
 {
     if (null == rhs) return;
     Matrix44 newMatrix = rhs * this;
     m_Proxy = newMatrix._Proxy;
 }
        protected override PointAdaptor OperatorMultiply(Matrix44Adaptor trans, PointAdaptor point)
        {
            Debug.Assert(point != null && trans != null);
            if (null == point || null == trans) return null;

            double[,] data = new double[4, 1];
            data[0, 0] = point.X;
            data[1, 0] = point.Y;
            data[2, 0] = point.Z;
            data[3, 0] = 1;
            NativeMatrix44Adaptor nativeTrans = trans as NativeMatrix44Adaptor;
            NativeMatrix2dAdaptor pointMatrix = new NativeMatrix2dAdaptor(data);

            NativeMatrix2dAdaptor resulr = nativeTrans.GetNativeMatrix2dProxy() * pointMatrix;
            resulr = resulr / resulr[3, 0];

            return new NativePointAdaptor(resulr[0, 0], resulr[1, 0], resulr[2, 0]);
        }
        protected override Matrix44Adaptor OperatorMultiply(Matrix44Adaptor lhs, Matrix44Adaptor rhs)
        {
            if (null == lhs || null == rhs) return null;
            NativeMatrix44Adaptor nativeLhs = lhs as NativeMatrix44Adaptor;
            NativeMatrix44Adaptor nativeRhs = rhs as NativeMatrix44Adaptor;

            NativeMatrix2dAdaptor ret = nativeLhs.m_Matrix2d * nativeRhs.m_Matrix2d;

            if (ret != null)
            {
                return new NativeMatrix44Adaptor(ret);
            }

            return null;
        }
Example #7
0
 protected abstract Matrix44Adaptor OperatorMultiply(Matrix44Adaptor lhs, Matrix44Adaptor rhs);
Example #8
0
 protected abstract PointAdaptor OperatorMultiply(Matrix44Adaptor trans, PointAdaptor point);
 public override PointAdaptor Transform(Matrix44Adaptor transProxy)
 {
     Debug.Assert(false, "NO IMP");
     return null;
 }
 protected override Matrix44Adaptor OperatorMultiply(Matrix44Adaptor lhs, Matrix44Adaptor rhs)
 {
     Debug.Assert(false, "NO IMP");
     return null;
 }
 protected override PointAdaptor OperatorMultiply(Matrix44Adaptor trans, PointAdaptor point)
 {
     Debug.Assert(false, "NO IMP");
     return null;
 }