Vector
final class Vector
Package: dev.joid.lib.render.transform · Module: core · Source: Vector.java
A 3D offset or pivot of a Transformation, in design pixels, fixed or read from suppliers.
Description
Section titled “Description”Each coordinate is read each time the transformation is applied.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
Vector | create() factory | Creates the vector (0, 0, 0). |
Vector | create(double x, double y) factory | Creates the vector x, y, with z at 0D. |
Vector | create(double x, double y, double z) factory | Creates the vector x, y, z. |
Vector | create(Supplier | Creates a vector whose x and y are read from the suppliers, with z at 0D. |
Vector | create(Supplier | Creates a vector whose coordinates are read from the suppliers. |
Properties
Section titled “Properties”| Property | Type | Default | Summary |
|---|---|---|---|
| x signal | double | 0D | The X coordinate: getX() reads it, x(double) fixes it, x(Supplier) reads it from a supplier. |
| y signal | double | 0D | The Y coordinate, down: getY() reads it, y(double) fixes it, y(Supplier) reads it from a supplier. |
| z signal | double | 0D | The Z coordinate: getZ() reads it, z(double) fixes it, z(Supplier) reads it from a supplier. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
this | add(double x, double y, double z) fluent | Adds x, y, z to the coordinates; a coordinate read from a supplier keeps following it, plus the offset. |
this | add(Supplier | Adds the values of the suppliers to the coordinates, read each time. |
Supplier<Double> | getXSupplier() | Returns the supplier of the X coordinate. |
Supplier<Double> | getYSupplier() | Returns the supplier of the Y coordinate. |
Supplier<Double> | getZSupplier() | Returns the supplier of the Z coordinate. |
Creation details
Section titled “Creation details”create
Section titled “create”Vector create() factory
Creates the vector (0, 0, 0).
Vector create(double x, double y) factory
Creates the vector x, y, with z at 0D.
Vector create(double x, double y, double z) factory
Creates the vector x, y, z.
Vector create(Supplier<Double> xSupplier, Supplier<Double> ySupplier) factory
Creates a vector whose x and y are read from the suppliers, with z at 0D.
Vector create(Supplier<Double> xSupplier, Supplier<Double> ySupplier, Supplier<Double> zSupplier) factory
Creates a vector whose coordinates are read from the suppliers.
Property details
Section titled “Property details”this x(double x)fluentthis x(Supplier<Double> xSupplier)fluent signaldouble getX()
Default: 0D
The X coordinate: getX() reads it, x(double) fixes it, x(Supplier) reads it from a supplier.
this y(double y)fluentthis y(Supplier<Double> ySupplier)fluent signaldouble getY()
Default: 0D
The Y coordinate, down: getY() reads it, y(double) fixes it, y(Supplier) reads it from a supplier.
this z(double z)fluentthis z(Supplier<Double> zSupplier)fluent signaldouble getZ()
Default: 0D
The Z coordinate: getZ() reads it, z(double) fixes it, z(Supplier) reads it from a supplier.
Method details
Section titled “Method details”this add(double x, double y, double z) fluent
Adds x, y, z to the coordinates; a coordinate read from a supplier keeps following it, plus the offset.
this add(Supplier<Double> xSupplier, Supplier<Double> ySupplier, Supplier<Double> zSupplier) fluent
Adds the values of the suppliers to the coordinates, read each time.
getXSupplier
Section titled “getXSupplier”Supplier<Double> getXSupplier()
Returns the supplier of the X coordinate.
getYSupplier
Section titled “getYSupplier”Supplier<Double> getYSupplier()
Returns the supplier of the Y coordinate.
getZSupplier
Section titled “getZSupplier”Supplier<Double> getZSupplier()
Returns the supplier of the Z coordinate.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
