Record Class Conversion
java.lang.Object
java.lang.Record
com.j3d.engine.math.convert.Conversion
- Record Components:
scale- The scale factor such that a unit length is not a pixel. e.g. a value of 10.0 means a CartesianPoint unit length of 1, is about 10 pixels long.size- The dimension of the screen which the points belong to. This is used to determine the centre for converting to and betweenCartesianPointand knowing the maximum height and length of aScreenPoint
Generic conversion record which stores the conversion required to turn a
CartesianPoint into a ScreenPoint and vice versa.
This is the simplified record which does not have an offset. See ConversionWithOffset
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConversion(double scale, Dim size) Creates an instance of aConversionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static Conversionglobal()The global conversion properties specifically for the main draw panelEngineFrame.getDrawPanel()final inthashCode()Returns a hash code value for this object.doublescale()Returns the value of thescalerecord component.size()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
scale
private final double scaleThe field for thescalerecord component. -
size
-
-
Constructor Details
-
Conversion
-
-
Method Details
-
global
The global conversion properties specifically for the main draw panelEngineFrame.getDrawPanel()These are defined as:
- The setting the user defines as the scale within
}
invalid @link
{@link Settings#sceneProperties#scale - The actual size of
EngineFrame.getDrawPanel()
- Returns:
- The Converison properties of the main draw panel.
- The setting the user defines as the scale within
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
scale
-
size
-