Esempio n. 1
0
            public void Execute(int index)
            {
                var temp = points[index];

                points[index] = new PointXYZRGBA {
                    xyz = new Vector3(temp.xyz.x, temp.xyz.z, temp.xyz.y), bgra = temp.bgra
                };
            }
Esempio n. 2
0
            public void Execute(int index)
            {
                var temp = points[index];

                points[index] = new PointXYZRGBA {
                    xyz = temp.xyz, bgra = new Color32(temp.bgra.b, temp.bgra.g, temp.bgra.r, temp.bgra.a)
                };
            }
Esempio n. 3
0
            public void Execute(int index)
            {
                int3 rgb   = int3.zero;
                var  value = Mathf.InverseLerp(intensity_min, intensity_max, points_xyzi[index].intensity) * 10;

                if (value <= 1.0f)
                {
                    // black -> purple
                    rgb.xz = (int2)math.round(new float2(value * 120, value * 200));
                }
                else if (value <= 2.0f)
                {
                    // purple -> blue
                    rgb.xz = new int2(120, 200) + new int2(-1, 1) * (int2)math.round(new float2((value - 1.0f) * 120, (value - 1.0f) * 55));
                }
                else if (value <= 3.0f)
                {
                    // blue -> turquoise
                    rgb.yz = new int2(0, 255) + new int2(1, -1) * (int2)math.round(new float2((value - 2.0f) * 200, (value - 2.0f) * 55));
                }
                else if (value <= 4.0f)
                {
                    // turquoise -> green
                    rgb.yz = new int2(200, 200) + new int2(1, -1) * (int2)math.round(new float2((value - 3.0f) * 55, (value - 3.0f) * 200));
                }
                else if (value <= 5.0f)
                {
                    // green -> greyish green
                    rgb.xy = new int2(0, 255) + new int2(1, -1) * (int2)math.round(new float2((value - 4.0f) * 120, (value - 4.0f) * 100));
                }
                else if (value <= 6.0f)
                {
                    // greyish green -> red
                    rgb.xyz = new int3(100, 120, 120) + new int3(1, -1, -1) * (int3)math.round(new float3((value - 5.0f) * 155, (value - 5.0f) * 120, (value - 5.0f) * 120));
                }
                else if (value <= 7.0f)
                {
                    // red -> yellow
                    rgb.xy = new int2(255, (int)math.round((value - 6.0f) * 255));
                }
                else
                {
                    // yellow -> white
                    rgb.xyz = new int3(255, 255, (int)math.round((value - 7.0f) * 255.0f / 3.0f));
                }
                points_xyzrgba[index] = new PointXYZRGBA
                {
                    xyz  = points_xyzi[index].xyz,
                    bgra = new Color32((byte)rgb.x, (byte)rgb.y, (byte)rgb.z, byte.MaxValue)
                };
            }
 public void Execute(int index) => data_out[index] = new PointXYZRGBA
 {
     xyz = data_in[index].point.xyz, bgra = data_in[index].bgra
 };