Exemple #1
0
	void Update ()
	{
		lock (sharedData)
		{
			if (sharedData.consumed)
				return;
			Array.Copy(sharedData.points, uiData.points, sharedData.points.Length);
			Array.Copy(sharedData.colors, uiData.colors, sharedData.colors.Length);
			uiData.elapsedMs = sharedData.elapsedMs;
			sharedData.consumed = true;
		}

		featuresPointCloud.SetVertices(uiData.points, uiData.colors);
	}
Exemple #2
0
	void Update ()
	{
		lock (threadShared)
		{
			threadShared.HandleSnapshotRequest(data);
			if (threadShared.consumed)
				return; //no new data, nothing to do
			data.CopyNewDataFrom(threadShared);
			threadShared.consumed = true;
		}
			
		if (data.length > 360)
			print(name + " - huh, does this ever happen? If so we can optimize");

		if(plot.plotType!=PlotType.Map && features==null)
			laserPointCloud.SetVertices(data.readings);

		if(map3D!=null && plot.plotType==PlotType.Map || plot.plotType==PlotType.GlobalWithMap)
			map3D.AssignVertices (data.readings, data.from, data.length, data.invalid_data);

	}