T
- just a testpublic abstract class Basic3dFunc<T extends Basic3dFunc<T>> extends Abstract3d
x, y, z
Modifier | Constructor and Description |
---|---|
protected |
Basic3dFunc(double x,
double y,
double z) |
Modifier and Type | Method and Description |
---|---|
T |
add(Basic3dFunc<?> value)
Add another value to this class and creates a new object of the same class based on that.
|
protected abstract T |
create(double x,
double y,
double z) |
List<T> |
createVariances()
Creates a collection of values which contains all variances of this coordinates and
their negated pair.
|
double |
distance(Basic3dFunc<?> d)
Calculates the distance between this coordinate and the given coordinate.
|
T |
inverse()
Return the inverse of this coordinate which means every coordinates will be negated.
|
T |
mul(Basic3dFunc<?> a)
Returns this vector multiplied by the given vector.
|
T |
mul(double a)
Returns this vector multiplied by the specified value.
|
T |
withX(double x)
Replaces the X coordinate with the given value and returns with the newly created object.
|
T |
withY(double y)
Replaces the Y coordinate with the given value and returns with the newly created object.
|
T |
withZ(double z)
Replaces the Z coordinate with the given value and returns with the newly created object.
|
protected abstract T create(double x, double y, double z)
public T add(Basic3dFunc<?> value)
value
- the value to be addedpublic T mul(double a)
a
- the value
Note: this vector is not modified.public T mul(Basic3dFunc<?> a)
a
- the value
Note: this vector is not modified.public T inverse()
public double distance(Basic3dFunc<?> d)
d
- the other coordinatepublic T withX(double x)
x
- the new X valuepublic T withY(double y)
y
- the new Y valuepublic T withZ(double z)
z
- the new Z valuepublic List<T> createVariances()
Creates a collection of values which contains all variances of this coordinates and their negated pair. The result contains at least one element (for ZERO) and up to eight elements.
The result contains the values in plus-minus order. First the X, then the Y and last the Z coordinates change if that coordinate is nonzero.
Copyright © 2014–2020, Printing in 3D. All rights reserved.