public class Sphered extends Object implements Externalizable
| Modifier and Type | Field and Description |
|---|---|
double |
r
The sphere's radius.
|
double |
x
The x coordinate of the sphere's center.
|
double |
y
The y coordinate of the sphere's center.
|
double |
z
The z coordinate of the sphere's center.
|
| Constructor and Description |
|---|
Sphered()
|
Sphered(double x,
double y,
double z,
double r)
|
Sphered(Sphered source)
Create a new
Sphered as a copy of the given source. |
Sphered(org.joml.Vector3dc c,
double r)
|
Sphered(org.joml.Vector3fc c,
double r)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
void |
readExternal(ObjectInput in) |
String |
toString()
Return a string representation of this sphere.
|
String |
toString(NumberFormat formatter)
Return a string representation of this sphere by formatting the components with the given
NumberFormat. |
Sphered |
translate(double x,
double y,
double z)
Translate
this by the vector (x, y, z). |
Sphered |
translate(double x,
double y,
double z,
Sphered dest)
Translate
this by the vector (x, y, z) and store the result in dest. |
Sphered |
translate(org.joml.Vector3dc xyz)
Translate
this by the given vector xyz. |
Sphered |
translate(org.joml.Vector3dc xyz,
Sphered dest)
Translate
this by the given vector xyz and store the result in dest. |
Sphered |
translate(org.joml.Vector3fc xyz)
Translate
this by the given vector xyz. |
Sphered |
translate(org.joml.Vector3fc xyz,
Sphered dest)
Translate
this by the given vector xyz and store the result in dest. |
void |
writeExternal(ObjectOutput out) |
public double x
public double y
public double z
public double r
public Sphered()
public Sphered(Sphered source)
Sphered as a copy of the given source.source - the Sphered to copy frompublic Sphered(org.joml.Vector3fc c,
double r)
c - the center position of the spherer - the radius of the spherepublic Sphered(org.joml.Vector3dc c,
double r)
c - the center position of the spherer - the radius of the spherepublic Sphered(double x,
double y,
double z,
double r)
x - the x coordinate of the sphere's centery - the y coordinate of the sphere's centerz - the z coordinate of the sphere's centerr - the radius of the spherepublic Sphered translate(org.joml.Vector3dc xyz)
this by the given vector xyz.xyz - the vector to translate bypublic Sphered translate(org.joml.Vector3dc xyz, Sphered dest)
this by the given vector xyz and store the result in dest.xyz - the vector to translate bydest - will hold the resultpublic Sphered translate(org.joml.Vector3fc xyz)
this by the given vector xyz.xyz - the vector to translate bypublic Sphered translate(org.joml.Vector3fc xyz, Sphered dest)
this by the given vector xyz and store the result in dest.xyz - the vector to translate bydest - will hold the resultpublic Sphered translate(double x, double y, double z)
this by the vector (x, y, z).x - the x coordinate to translate byy - the y coordinate to translate byz - the z coordinate to translate bypublic Sphered translate(double x, double y, double z, Sphered dest)
this by the vector (x, y, z) and store the result in dest.x - the x coordinate to translate byy - the y coordinate to translate byz - the z coordinate to translate bydest - will hold the resultpublic String toString()
This method creates a new DecimalFormat on every invocation with the format string "0.000E0;-".
public String toString(NumberFormat formatter)
NumberFormat.formatter - the NumberFormat used to format the components withpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2020 JOML. All rights reserved.