AssignVertices() public method

public AssignVertices ( Array data, int len ) : int
data Array
len int
return int
Exemplo n.º 1
0
	void Update()
	{
		lock (wifiLock)
		{
			packet = thread_shared_packet;
			averagedPacketTimeMs = thread_shared_averaged_packet_time_ms;
			if (thread_shared_readings_CB.Size > 0)
				readings_count = thread_shared_readings_CB.Get (readings, 0, thread_shared_readings_CB.Size);		
		}

		if (readings_count > 0 && map3D != null)
			map3D.AssignVertices(readings, readings_count);

		readings_count = 0;
	}
Exemplo n.º 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);

	}