public class Coords3d extends Basic3dFunc<Coords3d>
| Modifier and Type | Field and Description |
|---|---|
static Coords3d |
MINUS_TINY
Can be used to move the object that tiny bit that will solve the different annoying manifold issues
and CSG rendering problems.
|
static Coords3d |
TINY
Can be used to move the object that tiny bit that will solve the different annoying manifold issues
and CSG rendering problems.
|
static Coords3d |
X
Represents the (1,0,0) coordinate.
|
static Coords3d |
Y
Represents the (0,1,0) coordinate.
|
static Coords3d |
Z
Represents the (0,0,1) coordinate.
|
static Coords3d |
ZERO
Represents the (0,0,0) coordinate.
|
x, y, z| Constructor and Description |
|---|
Coords3d(double x,
double y,
double z)
Instantiating a new coordinate with the given coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
protected Coords3d |
create(double x,
double y,
double z) |
Coords3d |
cross(Coords3d a)
Returns the cross product of this vector and the specified vector.
|
static Coords3d |
fromByteBuffer(ByteBuffer bb)
Creates a coordinate based on the given byte array.
|
Coords3d |
lerp(Coords3d a,
double t)
Linearly interpolates between this and the specified vector.
|
static Coords3d |
midPoint(Coords3d a,
Coords3d b)
Calculates the midpoint of the ab segment.
|
Coords3d |
rotate(Angles3d angles)
Rotating this coordinate by the given angle, but this object will be unchanged and
this method will create a new object with the new coordinates.
|
Coords3d |
unit()
Returns a normalized copy of this vector with
length. |
static Coords3d |
xOnly(double x)
Creates a coordinate where the Y and Z fields are zero.
|
static Coords3d |
yOnly(double y)
Creates a coordinate where the X and Z fields are zero.
|
static Coords3d |
zOnly(double z)
Creates a coordinate where the X and Y fields are zero.
|
add, createVariances, distance, inverse, mul, mul, withX, withY, withZpublic static final Coords3d X
public static final Coords3d Y
public static final Coords3d Z
public static final Coords3d ZERO
public static final Coords3d TINY
public static final Coords3d MINUS_TINY
public Coords3d(double x,
double y,
double z)
x - X coordinatey - Y coordinatez - Z coordinatepublic static Coords3d xOnly(double x)
x - the X coordinatepublic static Coords3d yOnly(double y)
y - the Y coordinatepublic static Coords3d zOnly(double z)
z - the Z coordinatepublic static Coords3d fromByteBuffer(ByteBuffer bb)
Abstract3d#toByteArray() method.bb - the byte buffer to be readpublic static Coords3d midPoint(Coords3d a, Coords3d b)
a - first pointb - second pointpublic Coords3d rotate(Angles3d angles)
angles - the angles used by the rotationpublic Coords3d cross(Coords3d a)
a - the vectorpublic Coords3d unit()
length.
Note: this vector is not modified.lengthpublic Coords3d lerp(Coords3d a, double t)
a - vectort - interpolation valuet = 0; copy of a if t = 1;
the point midway between this and the specified vector if t = 0.5protected Coords3d create(double x, double y, double z)
create in class Basic3dFunc<Coords3d>Copyright © 2014–2020, Printing in 3D. All rights reserved.