Exemplo n.º 1
0
        public ViewForm()
        {
            InitializeComponent();

            vaultCtx = new udContext();

            LoginBox box = new LoginBox(ref vaultCtx);

            box.ShowDialog();

            if (box.GetLoginInfo())
            {
                renderCtx  = new udRenderContext();
                renderView = new udRenderTarget();

                vdkWidth  = (uint)panel1.Width;
                vdkHeight = (uint)panel1.Height;

                vdkColorBuffer = new uint[vdkWidth * vdkHeight];
                vdkDepthBuffer = new float[vdkWidth * vdkHeight];

                renderCtx.Create(vaultCtx);
                renderView.Create(vaultCtx, renderCtx, vdkWidth, vdkHeight);
                renderView.SetTargets(ref vdkColorBuffer, 0, ref vdkDepthBuffer);

                bmp = new Bitmap((int)vdkWidth, (int)vdkHeight, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
            }
            else
            {
                closeWhenPossible = true;
            }
        }
Exemplo n.º 2
0
            public udRenderContext(udContext context)
            {
                udError error = udRenderContext_Create(context.pContext, ref pRenderer);

                if (error != udError.udE_Success)
                {
                    throw new UDException(error);
                }

                this.context = context;
            }
Exemplo n.º 3
0
            public udRenderTarget(udContext context, udRenderContext renderer, UInt32 width, UInt32 height)
            {
                udError error = udRenderTarget_Create(context.pContext, ref pRenderTarget, renderer.pRenderer, width, height);

                if (error != udError.udE_Success)
                {
                    throw new UDException(error);
                }

                this.context = context;
            }
Exemplo n.º 4
0
        public PointCloud(string filename, udContext vaultCtx)
        {
            this.filename = filename;

            udPointCloudHeader header = new udPointCloudHeader();

            pointCloud = new udPointCloud();
            pointCloud.Load(vaultCtx, filename, ref header);

            matrix = header.storedMatrix;
        }
Exemplo n.º 5
0
            public udConvertContext(udContext context)
            {
                udError error = udConvert_CreateContext(context.pContext, ref pConvertContext);

                udConvert_GetInfo(pConvertContext, ref pInfo);
                metadata   = new ConversionMetadata(this);
                inputItems = new InputItems(this);
                if (error != udError.udE_Success)
                {
                    throw new UDException(error);
                }
            }
Exemplo n.º 6
0
        public LoginBox(ref udContext vaultCtx)
        {
            InitializeComponent();

            this.vaultCtx = vaultCtx;
        }