public PointCloud2Msg(HeaderMsg header, UInt32Msg height, UInt32Msg width, PointFieldMsg[] fields, bool is_bigendian, UInt32Msg point_step, UInt32Msg row_step, UInt8Msg[] data, bool is_dense) { _header = header; _height = height; _width = width; _fields = fields; _is_bigendian = is_bigendian; _point_step = point_step; _row_step = row_step; _data = data; _is_dense = is_dense; }
public PointFieldMsg(Int8Msg int8, Int8Msg uint8, Int8Msg int16, Int8Msg uint16, Int8Msg int32, Int8Msg uint32, Int8Msg float32, Int8Msg float64, string name, UInt32Msg offset, UInt8Msg datatype, UInt32Msg count) { _int8 = int8; _uint8 = uint8; _int16 = int16; _uint16 = uint16; _int32 = int32; _uint32 = uint32; _float32 = float32; _fluat64 = float64; _name = name; _offset = offset; _datatype = datatype; _count = count; }
public PointFieldMsg(JSONNode msg) { _int8 = new Int8Msg(msg["INT8"]); _uint8 = new Int8Msg(msg["UINT8"]); _int16 = new Int8Msg(msg["INT16"]); _uint16 = new Int8Msg(msg["UINT16"]); _int32 = new Int8Msg(msg["INT32"]); _uint32 = new Int8Msg(msg["UINT32"]); _float32 = new Int8Msg(msg["FLOAT32"]); _fluat64 = new Int8Msg(msg["FLOAT64"]); _name = msg["name"].ToString(); _offset = new UInt32Msg(msg["offset"]); _datatype = new UInt8Msg(msg["datatype"]); _count = new UInt32Msg(msg["count"]); }
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"]); }