コード例 #1
0
ファイル: Matrix44.cs プロジェクト: JeffreyZksun/opendraw
 public Matrix44()
 {
     m_Proxy = MathAdaptorFactory.Instance.CreateMatrix44Adaptor();
 }
コード例 #2
0
ファイル: Matrix44.cs プロジェクト: JeffreyZksun/opendraw
 public Matrix44(Matrix44Adaptor proxy)
 {
     m_Proxy = proxy;
 }
コード例 #3
0
ファイル: PointAdaptor.cs プロジェクト: JeffreyZksun/opendraw
 public abstract PointAdaptor Transform(Matrix44Adaptor transProxy);
コード例 #4
0
ファイル: Matrix44.cs プロジェクト: JeffreyZksun/opendraw
 public void LeftMultiply(Matrix44 rhs)
 {
     if (null == rhs) return;
     Matrix44 newMatrix = rhs * this;
     m_Proxy = newMatrix._Proxy;
 }
コード例 #5
0
        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]);
        }
コード例 #6
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;
        }
コード例 #7
0
 protected abstract Matrix44Adaptor OperatorMultiply(Matrix44Adaptor lhs, Matrix44Adaptor rhs);
コード例 #8
0
 protected abstract PointAdaptor OperatorMultiply(Matrix44Adaptor trans, PointAdaptor point);
コード例 #9
0
 public override PointAdaptor Transform(Matrix44Adaptor transProxy)
 {
     Debug.Assert(false, "NO IMP");
     return null;
 }
コード例 #10
0
 protected override Matrix44Adaptor OperatorMultiply(Matrix44Adaptor lhs, Matrix44Adaptor rhs)
 {
     Debug.Assert(false, "NO IMP");
     return null;
 }
コード例 #11
0
 protected override PointAdaptor OperatorMultiply(Matrix44Adaptor trans, PointAdaptor point)
 {
     Debug.Assert(false, "NO IMP");
     return null;
 }