Пример #1
0
        void PointCloudDataCompleted(AsyncGPUReadbackRequest request)
        {
            lidarDataByte.AsynchUpdate(request);
            message = new LidarMessage(LidarHorisontalRes * NrOfLasers * NrOfCameras, OSPtime, lidarDataByte.array);
            gate    = true;


            /*
             * var stringarray = System.BitConverter.ToSingle(lidarDataByte.array, lidarDataByte.array.Length - 12);
             * Debug.Log("x in bytes: " + stringarray.ToString());
             * Debug.Log("CPU is little endian: " + System.BitConverter.IsLittleEndian.ToString());
             */
        }
Пример #2
0
 void RecieveLidarData(ScriptableRenderContext context, Camera[] cameras)
 {
     if (SynchronousUpdate)
     {
         lidarDataByte.SynchUpdate(lidarShader, "CSMain");
         message = new LidarMessage(LidarHorisontalRes * NrOfLasers * NrOfCameras, OSPtime, lidarDataByte.array);
         gate    = true;
     }
     else
     {
         AsyncGPUReadback.Request(lidarDataByte.buffer, PointCloudDataCompleted);
     }
 }