bool?ProcessLineStripNoTint(NativeList <float4x2> lineBuffer) { var lPoints = points; var lColors = colors; if (lPoints.Length == 0) { return(null); } var p = lPoints[0].Ros2Unity(); var pc = lColors[0].ToUnityColor32(); for (int i = 1; i < lPoints.Length; i++) { var q = lPoints[i].Ros2Unity(); var qc = lColors[i].ToUnityColor32(); LineWithColor line = new LineWithColor(p, pc, q, qc); if (LineResource.IsElementValid(line)) { lineBuffer.Add(line.f); } p = q; pc = qc; } return(null); }
bool?ProcessLineStripSingleColor(NativeList <float4x2> lineBuffer) { var lPoints = points; if (lPoints.Length == 0) { return(color32.a < 255); } var p = lPoints[0].Ros2Unity(); float colorAsFloat = PointWithColor.FloatFromColorBits(color32); for (int i = 1; i < lPoints.Length; i++) { var q = lPoints[i].Ros2Unity(); LineWithColor line = new LineWithColor(p, colorAsFloat, q, colorAsFloat); if (LineResource.IsElementValid(line)) { lineBuffer.Add(line.f); } p = q; } return(color32.a < 255); }
bool?ProcessLineListNoTint(NativeList <float4x2> lineBuffer) { var lPoints = points; var lColors = colors; for (int i = 0; i < lPoints.Length / 2; i++) { LineWithColor line = new LineWithColor( lPoints[2 * i + 0].Ros2Unity(), lColors[2 * i + 0].ToUnityColor32(), lPoints[2 * i + 1].Ros2Unity(), lColors[2 * i + 1].ToUnityColor32() ); if (LineResource.IsElementValid(line)) { lineBuffer.Add(line.f); } } return(null); }
bool?ProcessLineListSingleColor(NativeList <float4x2> lineBuffer) { var lPoints = points; float colorAsFloat = PointWithColor.FloatFromColorBits(color32); for (int i = 0; i < lPoints.Length / 2; i++) { LineWithColor line = new LineWithColor( lPoints[2 * i + 0].Ros2Unity(), colorAsFloat, lPoints[2 * i + 1].Ros2Unity(), colorAsFloat ); if (LineResource.IsElementValid(line)) { lineBuffer.Add(line.f); } } return(color32.a < 255); }