| | |
| | | |
| | | System.arraycopy(raw, 18, primary, 0, 4); |
| | | |
| | | return Utility.DGNToIEEEDouble(primary) / 1000.0; |
| | | return Utility.convertDGNToIEEEDouble(primary) / 1000.0; |
| | | } |
| | | |
| | | public void setPrimary(double value) |
| | | { |
| | | double temp = value * 1000.0; |
| | | short[] primary = Utility.IEEEDoubleToDGN(temp); |
| | | short[] primary = Utility.convertIEEEDoubleToDGN(temp); |
| | | |
| | | System.arraycopy(primary, 0, raw, 18, 4); |
| | | } |
| | |
| | | |
| | | System.arraycopy(raw, 22, secondary, 0, 4); |
| | | |
| | | return Utility.DGNToIEEEDouble(secondary) / 1000.0; |
| | | return Utility.convertDGNToIEEEDouble(secondary) / 1000.0; |
| | | } |
| | | |
| | | public void setSecondary(double value) |
| | | { |
| | | double temp = value * 1000.0; |
| | | short[] secondary = Utility.IEEEDoubleToDGN(temp); |
| | | short[] secondary = Utility.convertIEEEDoubleToDGN(temp); |
| | | |
| | | System.arraycopy(secondary, 0, raw, 22, 4); |
| | | } |
| | |
| | | { |
| | | int rotation = (raw[26] << 16 & 0xffff0000); |
| | | |
| | | rotation += raw[27] & 0x0000ffff; |
| | | rotation |= raw[27] & 0x0000ffff; |
| | | |
| | | return Utility.ConverIntToRotation(rotation); |
| | | return Utility.converIntToRotation(rotation); |
| | | } |
| | | |
| | | public void setRotationAngle(double value) |
| | | { |
| | | int angle = Utility.ConverRotatioToInt(value); |
| | | int angle = Utility.converRotatioToInt(value); |
| | | |
| | | raw[26] = (short) (angle >> 16 & 0x0000ffff); |
| | | raw[27] = (short) (angle & 0x0000ffff); |
| | |
| | | |
| | | System.arraycopy(raw, 28, x, 0, 4); |
| | | |
| | | double dx = Utility.ConverUnitToCoord((int) Utility.DGNToIEEEDouble(x)); |
| | | double dx = Utility.converUnitToCoord((int) Utility.convertDGNToIEEEDouble(x)); |
| | | short[] y = new short[4]; |
| | | |
| | | System.arraycopy(raw, 32, y, 0, 4); |
| | | |
| | | double dy = Utility.ConverUnitToCoord((int) Utility.DGNToIEEEDouble(y)); |
| | | double dy = Utility.converUnitToCoord((int) Utility.convertDGNToIEEEDouble(y)); |
| | | |
| | | return new Coordinate(dx, dy); |
| | | } |
| | | |
| | | public void setOrigin(Coordinate value) |
| | | { |
| | | double temp = Utility.ConverCoordToUnit(value.x); |
| | | short[] x = Utility.IEEEDoubleToDGN(temp); |
| | | double temp = Utility.converCoordToUnit(value.x); |
| | | short[] x = Utility.convertIEEEDoubleToDGN(temp); |
| | | |
| | | System.arraycopy(x, 0, raw, 28, 4); |
| | | temp = Utility.ConverCoordToUnit(value.y); |
| | | temp = Utility.converCoordToUnit(value.y); |
| | | |
| | | short[] y = Utility.IEEEDoubleToDGN(temp); |
| | | short[] y = Utility.convertIEEEDoubleToDGN(temp); |
| | | |
| | | System.arraycopy(y, 0, raw, 32, 4); |
| | | } |