Package com.io7m.jcoords.core.conversion
Class CAxisSystem
java.lang.Object
com.io7m.jcoords.core.conversion.CAxisSystem
- All Implemented Interfaces:
CAxisSystemType
An arrangement of orthonormal axes forming a Cartesian coordinate system.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CAxisSystem.Builderbuilder()Creates a builder forCAxisSystem.static CAxisSystemcopyOf(CAxisSystemType instance) Creates an immutable copy of aCAxisSystemTypevalue.booleanThis instance is equal to all instances ofCAxisSystemthat have equal attribute values.forward()inthashCode()Computes a hash code from attributes:right,up,forward.static CAxisSystemConstruct a new immutableCAxisSysteminstance.right()toString()Prints the immutable valueCAxisSystemwith attribute values.up()final CAxisSystemwithForward(CAxis value) Copy the current immutable object by setting a value for theforwardattribute.final CAxisSystemCopy the current immutable object by setting a value for therightattribute.final CAxisSystemCopy the current immutable object by setting a value for theupattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jcoords.core.conversion.CAxisSystemType
basis3x3, basis4x4, checkPreconditions
-
Method Details
-
right
- Specified by:
rightin interfaceCAxisSystemType- Returns:
- The axis facing right
-
up
- Specified by:
upin interfaceCAxisSystemType- Returns:
- The axis facing up
-
forward
- Specified by:
forwardin interfaceCAxisSystemType- Returns:
- The axis facing forward
-
withRight
Copy the current immutable object by setting a value for therightattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for right- Returns:
- A modified copy of the
thisobject
-
withUp
Copy the current immutable object by setting a value for theupattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for up- Returns:
- A modified copy of the
thisobject
-
withForward
Copy the current immutable object by setting a value for theforwardattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for forward- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofCAxisSystemthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:right,up,forward. -
toString
Prints the immutable valueCAxisSystemwith attribute values. -
of
Construct a new immutableCAxisSysteminstance.- Parameters:
right- The value for therightattributeup- The value for theupattributeforward- The value for theforwardattribute- Returns:
- An immutable CAxisSystem instance
-
copyOf
Creates an immutable copy of aCAxisSystemTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CAxisSystem instance
-
builder
Creates a builder forCAxisSystem.CAxisSystem.builder() .setRight(com.io7m.jcoords.core.conversion.CAxis) // requiredright.setUp(com.io7m.jcoords.core.conversion.CAxis) // requiredup.setForward(com.io7m.jcoords.core.conversion.CAxis) // requiredforward.build();- Returns:
- A new CAxisSystem builder
-