Пример #1
0
        public void Create(udContext context)
        {
            udError error = vdkConvert_CreateContext(context.pContext, ref pConvertContext);

            if (error != Vault.udError.udE_Success)
            {
                throw new Exception("vdkConvertContext.Create failed.");
            }
        }
Пример #2
0
        public void Load(udContext context, string modelLocation, ref udPointCloudHeader header)
        {
            udError error = udPointCloud_Load(context.pContext, ref pModel, modelLocation, ref header);

            if (error != Vault.udError.udE_Success)
            {
                throw new Exception("udPointCloud.Load failed: " + error.ToString());
            }

            this.context = context;
        }
Пример #3
0
        public void Create(udContext context, udRenderContext renderer, UInt32 width, UInt32 height)
        {
            if (context.pContext == IntPtr.Zero)
            {
                throw new Exception("context not instantiated");
            }

            if (renderer.pRenderer == IntPtr.Zero)
            {
                throw new Exception("renderer not instantiated");
            }

            udError error = udRenderTarget_Create(context.pContext, ref pRenderView, renderer.pRenderer, width, height);

            if (error != Vault.udError.udE_Success)
            {
                throw new Exception("vdkRenderView.Create failed: " + error.ToString());
            }

            this.context = context;
        }
Пример #4
0
        public void Create(udContext context)
        {
            //ensure we destroy the existing context if we are creating a new one:
            if (pRenderer != IntPtr.Zero)
            {
                Destroy();
            }

            if (context.pContext == IntPtr.Zero)
            {
                throw new Exception("context not instantiatiated");
            }

            udError error = udRenderContext_Create(context.pContext, ref pRenderer);

            if (error != Vault.udError.udE_Success)
            {
                throw new Exception("vdkRenderContext.Create failed: " + error.ToString());
            }

            this.context = context;
        }