public SETItem(EditorItemSelection selectionManager) : base(selectionManager) { Position = new Vertex(); Rotation = new Rotation(); Scale = new Vertex(); objdef = LevelData.ObjDefs[id]; bounds = objdef.GetBounds(this); }
public SETItem(byte[] file, int address, EditorItemSelection selectionManager) : base(selectionManager) { ushort _id = ByteConverter.ToUInt16(file, address); ID = _id; ClipLevel = (byte)(_id >> 12); ushort xrot = BitConverter.ToUInt16(file, address + 2); ushort yrot = BitConverter.ToUInt16(file, address + 4); ushort zrot = BitConverter.ToUInt16(file, address + 6); Rotation = new Rotation(xrot, yrot, zrot); Position = new Vertex(file, address + 8); Scale = new Vertex(file, address + 0x14); isLoaded = true; objdef = LevelData.ObjDefs[id]; bounds = objdef.GetBounds(this); }