public void Connect(string pURL, string pApplicationName, string pUsername, string pPassword) { udError error = udContext.udContext_TryResume(ref pContext, pURL, pApplicationName, pUsername, true); if (error != udError.udE_Success) { error = udContext_Connect(ref pContext, pURL, pApplicationName, pUsername, pPassword); } if (error == Vault.udError.udE_ConnectionFailure) { throw new Exception("Could not connect to server."); } else if (error == Vault.udError.udE_AuthFailure) { throw new Exception("Username or Password incorrect."); } else if (error == Vault.udError.udE_OutOfSync) { throw new Exception("Your clock doesn't match the remote server clock."); } else if (error == Vault.udError.udE_SecurityFailure) { throw new Exception("Could not open a secure channel to the server."); } else if (error == Vault.udError.udE_ServerFailure) { throw new Exception("Unable to negotiate with server, please confirm the server address"); } else if (error != Vault.udError.udE_Success) { throw new Exception("Unknown error occurred: " + error.ToString() + ", please try again later."); } }
public void Render(udRenderTarget renderView, udRenderInstance[] pModels, int modelCount, RenderOptions options) { if (modelCount == 0) { return; } if (renderView == null) { throw new Exception("renderView is null"); } if (renderView.pRenderView == IntPtr.Zero) { throw new Exception("RenderView not initialised"); } if (pRenderer == IntPtr.Zero) { throw new Exception("renderContext not initialised"); } udError error = udRenderContext_Render(pRenderer, renderView.pRenderView, pModels, modelCount, options.options); if (error != Vault.udError.udE_Success) { Debug.Log("vdkRenderContext.Render failed: " + error.ToString()); } options.pickRendered = true; }
public void Unload() { udError error = udPointCloud_Unload(ref pModel); if (error != Vault.udError.udE_Success) { throw new Exception("udPointCloud.Unload failed."); } }
public void RestoreAttribute(string attributeName) { udError error = udConvert_RestoreAttribute(pConvertContext, attributeName); if (error != udError.udE_Success) { throw new UDException(error); } }
public void GetMatrix(udRenderTargetMatrix matrixType, double[] cameraMatrix) { udError error = udRenderTarget_GetMatrix(pRenderView, matrixType, cameraMatrix); if (error != Vault.udError.udE_Success) { throw new Exception("vdkRenderView.GetMatrix failed."); } }
public void GetMetadata(ref string ppJSONMetadata) { udError error = udPointCloud_GetMetadata(pModel, ref ppJSONMetadata); if (error != udError.udE_Success) { throw new UDException(error); } }
public void TryResume(string pURL, string pApplicationName, string email = null, bool useDongle = false) { udError error = udContext_TryResume(ref pContext, pURL, pApplicationName, email, System.Convert.ToInt32(useDongle)); //Set to 1 to try use the dongle if (error != udError.udE_Success) { throw new UDException(error); } }
public void Destroy() { udError error = vdkConvert_DestroyContext(ref pConvertContext); if (error != Vault.udError.udE_Success) { throw new Exception("vdkConvertContext.Destroy failed."); } }
public void Destroy() { udError error = udRenderContext_Destroy(ref pRenderer); if (error != udError.udE_Success) { throw new Exception("udRenderContext.Destroy failed."); } }
public vdkQueryFilter() { udError error = vdkQueryFilter_Create(ref pQueryFilter); if (error != udError.udE_Success) { throw new Exception("Query Creation Failed: " + error.ToString()); } }
/* * Set the vdkQueryFilter to find voxels within a cylinder. * * Note * * When inverted, this filter will return all points outside the cylinder. * Parameters * * pQueryFilter: The vdkQueryFilter to configure. * * centrePoint: The world space {X,Y,Z} array for the center point of the cylinder. * * radius: The radius of the cylinder (the world space axis are defined by yawPitchRoll) the circle exists in local axis XY extruded along Z. * * halfHeight: The half-height of the cylinder (the world space axis are defined by yawPitchRoll) the circle exists in local axis XY extruded along Z. * * yawPitchRoll: The rotation of the cylinder (in radians). Applied in YPR order. * */ public void SetAsCylinder(double[] centrePoint, double radius, double halfHeight, double[] yawPitchRoll) { udError error = vdkQueryFilter_SetAsCylinder(pQueryFilter, centrePoint, radius, halfHeight, yawPitchRoll); if (error != udError.udE_Success) { throw new Exception("Query SetAsCylinder Failed: " + error.ToString()); } }
/* * Invert the result of a vdkQueryFilter * * Parameters * * inverted: True if the filter should be inverted, False is it should behave as default. * */ public void SetInverted(bool inverted) { udError error = vdkQueryFilter_SetInverted(pQueryFilter, inverted); if (error != udError.udE_Success) { throw new Exception("Query Inversion Failed: " + error.ToString()); } }
/* * Set the vdkQueryFilter to find voxels within a box. * * Note: * * When inverted, this filter will return all points outside the box. * * Parameters: * * pQueryFilter: The vdkQueryFilter to configure. * * centrePoint: The world space {X,Y,Z} array for the center point. * * halfSize: The local space {X,Y,Z} half size of the box (the world space axis are defined by yawPitchRoll). * * yawPitchRoll: The rotation of the model (in radians). Applied in YPR order. * */ public void SetAsBox(double[] centrePoint, double[] halfSize, double[] yawPitchRoll) { udError error = vdkQueryFilter_SetAsBox(pQueryFilter, centrePoint, halfSize, yawPitchRoll); if (error != udError.udE_Success) { throw new Exception("Query SetAsBox Failed: " + error.ToString()); } }
/* * Set the vdkQueryFilter to find voxels within a sphere. * * * Note: * * When inverted, this filter will return all points outside the sphere. * * Parameters: * * pQueryFilter: The vdkQueryFilter to configure. * * centrePoint: The world space {X,Y,Z} array for the center point. * * radius: The radius from the centerPoint to the edge of the sphere. * */ public void SetAsSphere(double[] centrePoint, double radius) { udError error = vdkQueryFilter_SetAsSphere(pQueryFilter, centrePoint, radius); if (error != udError.udE_Success) { throw new Exception("Query SetAsSphere Failed: " + error.ToString()); } }
public void SetMatrix(RenderViewMatrix matrixType, double[] cameraMatrix) { udError error = udRenderTarget_SetMatrix(pRenderTarget, matrixType, cameraMatrix); if (error != udError.udE_Success) { throw new Exception("udRenderTarget.SetMatrix failed."); } }
public void Render(udRenderTarget renderView, udRenderInstance[] pModels, int modelCount) { udError error = udRenderContext_Render(pRenderer, renderView.pRenderTarget, pModels, modelCount, (IntPtr)0); if (error != udError.udE_Success) { throw new Exception("udRenderContext.Render failed."); } }
public void GetMetadata(ref string ppJSONMetadata) { udError error = udPointCloud_GetMetadata(pModel, ref ppJSONMetadata); if (error != Vault.udError.udE_Success) { throw new Exception("udPointCloud.GetMetadata failed."); } }
public void SetFileName(string fileName) { udError error = vdkConvert_SetOutputFilename(pConvertContext, fileName); if (error != Vault.udError.udE_Success) { throw new Exception("vdkConvertContext.SetOutputFilename failed."); } }
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."); } }
private void SetMatrix(RenderViewMatrix matrixType, double[] cameraMatrix) { udError error = udRenderTarget_SetMatrix(pRenderTarget, matrixType, cameraMatrix); if (error != udError.udE_Success) { throw new UDException(error); } }
public void AddFile(string fileName) { udError error = vdkConvert_AddItem(pConvertContext, fileName); if (error != Vault.udError.udE_Success) { throw new Exception("vdkConvertContext.AddItem failed."); } }
public void Disconnect() { udError error = udContext_Disconnect(ref pContext, 0); if (error != udError.udE_Success) { throw new Exception("udContext.Disconnect failed."); } }
public void DoConvert() { udError error = vdkConvert_DoConvert(pConvertContext); if (error != Vault.udError.udE_Success) { throw new Exception("vdkConvertContext.DoConvert failed."); } }
public void Try_Resume(string pURL, string pApplicationName, string pUsername, bool tryDongle) { udError error = udContext_TryResume(ref pContext, pURL, pApplicationName, pUsername, tryDongle); if (error != udError.udE_Success) { throw new Exception("Unable to keep session alive: " + error.ToString()); } }
private void Unload() { udError error = udPointCloud_Unload(ref pModel); if (error != udError.udE_Success) { throw new UDException(error); } }
public void Disconnect(bool endSession = false) { udError error = udContext_Disconnect(ref pContext, endSession); if (error != Vault.udError.udE_Success) { throw new Exception("udContext.Disconnect failed."); } }
public void Export(string filename, Geometry.udGeometry geom, ref float pProgress) { udError error = udPointCloud_Export(pModel, filename, geom.pGeometry, ref pProgress); if (error != udError.udE_Success) { throw new UDException(error); } }
public void GetSessionInfo(ref udSessionInfo info) { udError error = udContext_GetSessionInfo(pContext, ref info); if (error != Vault.udError.udE_Success) { throw new Exception("udContext.Disconnect failed."); } }
public void ConnectCancel() { udError error = udContext_ConnectCancel(ref pContextPartial); if (error != udError.udE_Success) { throw new UDException(error); } }
public void Reset() { udError error = udConvert_Reset(pConvertContext); if (error != udError.udE_Success) { throw new UDException(error); } }