public static void GUI(this PointFieldMsg message) { GUILayout.Label($"Name: {message.name}\nDatatype: {(PointField_Format_Constants)message.datatype}"); if (message.count > 1) { GUILayout.Label($"Count: {message.count}"); } }
public PointCloud2Msg(HeaderMsg header, uint height, uint width, PointFieldMsg fields, bool is_bigendian, uint point_step, uint row_step, byte[] data, bool is_dense) { _header = header; _height = height; _width = width; //_fields = fields; _is_dense = is_dense; _is_bigendian = is_bigendian; _point_step = point_step; _row_step = row_step; _cloud = ReadData(data); }
public PointCloud2Msg(JSONNode msg) { _header = new HeaderMsg(msg ["header"]); _height = uint.Parse(msg ["height"]); _width = uint.Parse(msg ["width"]); _is_bigendian = msg["is_bigendian"].AsBool; _is_dense = msg["is_dense"].AsBool; _point_step = uint.Parse(msg ["point_step"]); _row_step = uint.Parse(msg ["row_step"]); _fields = new PointFieldMsg[msg["fields"].Count]; for (int i = 0; i < _fields.Length; i++) { _fields[i] = new PointFieldMsg(msg["fields"][i]); } _data = System.Convert.FromBase64String(msg["data"]); _cloud = ReadData(_data); }
public PointCloud2Msg(JSONNode msg) { _header = new HeaderMsg(msg["header"]); _height = new UInt32Msg(msg["height"]); _width = new UInt32Msg(msg["width"]); string[] str_field = msg["fields"].ToString().Split(','); _fields = new PointFieldMsg[str_field.Length]; for (int i = 0; i < _fields.Length; i++) { _fields[i] = new PointFieldMsg(str_field[i]); } _is_bigendian = bool.Parse(msg["is_begendian"]); _point_step = new UInt32Msg(msg["point_step"]); _row_step = new UInt32Msg(msg["row_step"]); string[] str_data = msg["data"].ToString().Split(','); _data = new UInt8Msg[str_data.Length]; for (int i = 0; i < _data.Length; i++) { _data[i] = new UInt8Msg(str_data[i]); } _is_dense = bool.Parse(msg["is_dense"]); }