internal static HandleRef getCPtr(VectorConsumer obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Child child = Factory.GimmeAChild();
            Parent parent = Factory.GimmeAParent();
            Parent parent2 = Factory.GimmeAChildAsAParent();

            child.DoEvenMore();
            child.DoSomething(3, 4);
            parent.DoSomething(2, 3);
            parent2.DoSomething(1, 2);
            Child child2 = (Child)parent2;

            // SIZE howbig = SIZE.MEDIUM;
            // parent2.MethodWithRefSize(ref howbig);
            Vector3D v3 = new Vector3D(11, 22, 33);
            Vector4D v4 = new Vector4D(1, 2, 3, 4);
            Matrix4D mtx = new Matrix4D(11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44);
            int res;

            // Handmade Matrix and Vector wrapping test
            // Note: This tests the mapping of C++ Matrix and Vector types
            // to exsiting C# Matrix and Vector types (and not wrapper classes)
            res = HandmadeWrappers.HandMadeVectorTaker(ref v4);
            //res = HandmadeWrappers.HandMadeMatrixTakerWrapper(ref mtx);
            Vector4D vRes = HandmadeWrappers.HandMadeVectorReturner();
            //Matrix4D mRes = HandmadeWrappers.HandMadeMatrixReturnerWrapper();
            Vector4D vRes2 = HandmadeWrappers.HandMadeVectorPtrReturnerWrapper();

            // Swig generated Matrix and Vector wrapping test
            // Note: This tests the mapping of C++ Matrix and Vector types
            // to exsiting C# Matrix and Vector types (and not wrapper classes generated by Swig).
            // The mapping of the types is done by Swig, though
            VectorConsumer vc = new VectorConsumer();
            //Matrix4D mRes2 = vc.GimmeSomeMatrix();

            res = vc.VectorTakerPtr3(ref v3);
            res = vc.VectorTakerRef3(ref v3);
            res = vc.VectorTakerVal3(v3);
            Vector3D vRet = vc.GimmeSomeVector();
            Vector3D vOld = vc.VV;
            vc.VV = vRet;
            vOld = vc.VV;

            res = vc.VectorTakerPtr4(ref v4);
            res = vc.VectorTakerRef4(ref v4);
            res = vc.VectorTakerVal4(v4);
            //res = vc.MatrixTakerPtr(ref mtx);
            //res = vc.MatrixTakerRef(ref mtx);
            //res = vc.MatrixTakerVal(mtx);

            MyVectorConsumer myVc = new MyVectorConsumer();
            VectorConsumerCaller.CallVectorConsumer(myVc);

            AParamType param = null;
            RefRefTest.ParameterTaker(ref param);
            int i = 8;
        }
Exemplo n.º 3
0
 public static void CallVectorConsumer(VectorConsumer pConsumer)
 {
     CppApiPINVOKE.VectorConsumerCaller_CallVectorConsumer(VectorConsumer.getCPtr(pConsumer));
 }
Exemplo n.º 4
0
 internal static HandleRef getCPtr(VectorConsumer obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
 public static extern void VectorConsumer_director_connect(HandleRef jarg1, VectorConsumer.SwigDelegateVectorConsumer_0 delegate0, VectorConsumer.SwigDelegateVectorConsumer_1 delegate1, VectorConsumer.SwigDelegateVectorConsumer_2 delegate2, VectorConsumer.SwigDelegateVectorConsumer_3 delegate3, VectorConsumer.SwigDelegateVectorConsumer_4 delegate4, VectorConsumer.SwigDelegateVectorConsumer_5 delegate5, VectorConsumer.SwigDelegateVectorConsumer_6 delegate6);
 public static void CallVectorConsumer(VectorConsumer pConsumer)
 {
     CppApiPINVOKE.VectorConsumerCaller_CallVectorConsumer(VectorConsumer.getCPtr(pConsumer));
 }