public PointCloud(string filename, vdkContext vaultCtx)
        {
            this.filename = filename;

            vdkPointCloudHeader header = new vdkPointCloudHeader();

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

            matrix = header.storedMatrix;
        }
Beispiel #2
0
    // This gets called by VDKPPES if it isn't loaded already
    public void LoadModel()
    {
        if (!GlobalVDKContext.isCreated || isLoaded || Path == "" || Path == null)
        {
            return;
        }

        try
        {
            udModel.Load(GlobalVDKContext.vContext, Path, ref header);
            pivotTranslation = Matrix4x4.Translate(new Vector3((float)header.pivot[0], (float)header.pivot[1], (float)header.pivot[2]));
            modelScale       = Matrix4x4.Scale(new Vector3((float)header.scaledRange, (float)header.scaledRange, (float)header.scaledRange));
            isLoaded         = true;
        }
        catch (System.Exception e)
        {
            Debug.LogError("Could not open UDS: " + Path + " " + e.Message);
        }
    }