|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.azalient.apo.basics.XyzFinal
public final class XyzFinal
An immutable variant of Xyz which throws an UnsupportedOperationException if an attempt is made to change its value
| Field Summary |
|---|
| Fields inherited from interface com.azalient.api.a.position.IXyz |
|---|
ZERO_ARRAY |
| Constructor Summary | |
|---|---|
XyzFinal(double x,
double y,
double z)
|
|
XyzFinal(IXyz a)
|
|
| Method Summary | |
|---|---|
void |
abZ(IXyz a,
IXyz b)
Adjust the height of this point to be on the plane that connects A and B such that a line drawn perpendicular to AB in the plane has constant Z |
void |
add(IXyz v)
Vector add operation in place. |
IAngle |
angleBetween(IXyz v)
Returns the UNSIGNED angle between this vector and the vector parameter; the return value is constrained to the range [0,180] |
IAngle |
asBearing()
Return bearing CW from N in the range [0, 2PI) |
double[] |
asDouble3()
Returns this point/vector as an array of 3 doubles |
double |
asGradient()
Return the fractional gradient component of this vector |
boolean |
atZERO()
Returns true if this point is at the origin (all zeroes) |
IAngle |
bearingTo(IXyz there)
Return bearing CW from N in the range [0, 2PI) |
IXyz |
copy()
Return a new object as a copy of this point/vector |
IXyz |
cross(IXyz v)
Return new vector result of cross with v, original vectors unchanged. |
void |
crossWith(IXyz v)
Vector cross operation in place. |
double |
distance(IXy there)
distance between here and there |
double |
distance(IXyz there)
|
double |
distance(IXyz a,
IXyz b,
boolean limitAB)
return the distance from "this" to line segment AB |
void |
divide(double s)
Scalar divide, in place |
IXyz |
dividedBy(double s)
Divide all components of Vector by given scalar, returning new vector, originals unchanged. |
double |
dot(IXyz v)
Computes the dot product of this vector and vector V. |
void |
eq(char op,
double s)
|
void |
eq(char op,
IXyz v)
|
double |
gradientToFrac(IXyz there)
Fractional gradient as dh/XY |
boolean |
isFinite()
Test if all components are finite and numbers (not NaN) |
double |
length()
Returns the length of this vector (or the distance of the point from the origin). |
double |
lengthSquared()
|
IXyz |
minus(IXyz v)
Vector minus, returning new vector, originals unchanged. |
IXyz |
multipliedBy(double s)
Multiply all components of Vector by given scalar, returning new vector, originals unchanged. |
void |
multiply(double s)
Scalar multiply, in place |
IXyz |
nearestPointOn(IXyz a,
IXyz b,
boolean limitAB)
return the nearest point to "this" on line segment AB. |
IXyz |
nearestPointOnLine(IXyz a,
IXyz b)
Returns the nearest point on line AB to this point. |
void |
negate()
Negates the value of this xyz in place. |
IXyz |
negative()
Return a negative of this vector, original unchanged |
IXyz |
normalized()
Returns normalized version of this vector, original unchanged. |
IXyz |
parallelComponent(IXyz v)
Return the component of v that is parallel with this |
double |
parallelComponentMag(IXyz v)
Return the magnitude of the component of v that is parallel with this |
IXyz |
perpComponent(IXyz v)
Return the component of v that is perpendicular to this |
IXyz |
plus(IXyz v)
Vector plus, returning new vector, originals unchanged. |
void |
rotate(IXya xya)
Rotate this point in the XY-plane around the axis of rotation (x,y) by angle a. |
void |
rotate(IXy xy,
IAngle a)
Rotate this point in the XY-plane around the axis of rotation (x,y) by angle a. |
IXyz |
rotationAsMove(IXya xya)
Convert the given XY-plane rotation around an XY-axis into a translation |
IXyz |
rotationAsMove(IXy xy,
IAngle a)
Convert the given XY-plane rotation around an XY-axis into a translation |
void |
scale(double s)
Scalar multiply, in place |
IXyz |
selfNormalize()
Normalizes this vector in place, and returns itself. |
void |
set(double px,
double py,
double pz)
Set this point/vector to the given values |
void |
set(IXyz xyz)
Set this point/vector to have the same values as that one (copy by value, not by reference) |
void |
subtract(IXyz v)
Vector subtract operation in place. |
boolean |
toRightOf(IXyz pA,
IXyz pB)
Is point to right of line AB |
String |
toString()
|
IXyz |
transform(IXyz origin0,
IAngle compass0,
IXyz origin1,
IAngle compass1)
|
IXyz |
truncateLength(double maxLength)
Clip to a given length, returning a new object if modification is required |
double |
v(int i)
indexed access to components: i=0 -> X i=1 -> Y i=2 -> Z |
void |
v(int i,
double v)
indexed access to components: i=0 -> X i=1 -> Y i=2 -> Z |
double |
x()
X-coordinate of this point |
void |
x(double value)
Set the X-coordinate of this point |
double |
y()
Y-coordinate of this point |
void |
y(double value)
Set the Y-coordinate of this point |
double |
z()
Z-coordinate of this point |
void |
z(double value)
Set the Z-coordinate of this point |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XyzFinal(double x,
double y,
double z)
public XyzFinal(IXyz a)
| Method Detail |
|---|
public final IXyz copy()
IXyz
copy in interface IXyzpublic final IAngle angleBetween(IXyz v)
IXyz
angleBetween in interface IXyzv - the other vector
public final IAngle asBearing()
IXyz
asBearing in interface IXyzpublic final double asGradient()
IXyz
asGradient in interface IXyzpublic final boolean atZERO()
IXyz
atZERO in interface IXyzpublic final IAngle bearingTo(IXyz there)
IXyz
bearingTo in interface IXyzpublic final IXyz cross(IXyz v)
IXyz
cross in interface IXyzpublic final double distance(IXyz there)
distance in interface IXyzpublic final double distance(IXy there)
IXy
distance in interface IXy
public final double distance(IXyz a,
IXyz b,
boolean limitAB)
IXyz
distance in interface IXyzlimitAB - if true, the distance is to a point between A and B, inclusive. If false,
the line is extended to infinite lengthpublic final IXyz dividedBy(double s)
IXyz
dividedBy in interface IXyzpublic final double dot(IXyz v)
IXyz
U.V = u * v * cos(theta)
= ux*vx + uy*vy + uz*vz
where u is the length of U, v is the length of V and theta is the angle
between U and V. As this returns a scalar value,it cannot be included in
the constructors or in the other vector operation methods
v - the other vector
public final double gradientToFrac(IXyz there)
IXyz
gradientToFrac in interface IXyzpublic final boolean isFinite()
IXyz
isFinite in interface IXyzpublic final double length()
IXyz
length in interface IXyzpublic final double lengthSquared()
lengthSquared in interface IXyzpublic final IXyz minus(IXyz v)
IXyz
minus in interface IXyzpublic final IXyz multipliedBy(double s)
IXyz
multipliedBy in interface IXyz
public final IXyz nearestPointOn(IXyz a,
IXyz b,
boolean limitAB)
IXyz
nearestPointOn in interface IXyzlimitAB - if true, the point must be between A and B, inclusive
public final IXyz nearestPointOnLine(IXyz a,
IXyz b)
IXyz
nearestPointOnLine in interface IXyzpublic final IXyz negative()
IXyz
negative in interface IXyzpublic final IXyz normalized()
IXyz
normalized in interface IXyzpublic final IXyz parallelComponent(IXyz v)
IXyz
parallelComponent in interface IXyzpublic final double parallelComponentMag(IXyz v)
IXyz
parallelComponentMag in interface IXyzpublic final IXyz perpComponent(IXyz v)
IXyz
perpComponent in interface IXyzpublic final IXyz plus(IXyz v)
IXyz
plus in interface IXyz
public final IXyz rotationAsMove(IXy xy,
IAngle a)
IXyz
rotationAsMove in interface IXyzpublic final IXyz rotationAsMove(IXya xya)
IXyz
rotationAsMove in interface IXyz
public final boolean toRightOf(IXyz pA,
IXyz pB)
IXyz
toRightOf in interface IXyz
public final IXyz transform(IXyz origin0,
IAngle compass0,
IXyz origin1,
IAngle compass1)
transform in interface IXyzpublic final IXyz truncateLength(double maxLength)
IXyz
truncateLength in interface IXyzpublic final double v(int i)
IXyz
v in interface IXyzpublic final double x()
IXyz
x in interface IXyx in interface IXyzx in interface OpenGLXyzpublic final double y()
IXyz
y in interface IXyy in interface IXyzy in interface OpenGLXyzpublic final double z()
IXyz
z in interface IXyzz in interface OpenGLXyzpublic final double[] asDouble3()
IXyz
asDouble3 in interface IXyzpublic final String toString()
toString in class Object
public final void abZ(IXyz a,
IXyz b)
IXyz
abZ in interface IXyzpublic final void add(IXyz v)
IXyz
add in interface IXyzpublic final void crossWith(IXyz v)
IXyz
crossWith in interface IXyzpublic final void divide(double s)
IXyz
divide in interface IXyz
public final void eq(char op,
IXyz v)
public final void eq(char op,
double s)
public final void multiply(double s)
IXyz
multiply in interface IXyzpublic final void negate()
IXyz
negate in interface IXyz
public final void rotate(IXy xy,
IAngle a)
IXyz
rotate in interface IXyzpublic final void rotate(IXya xya)
IXyz
rotate in interface IXyzpublic final void scale(double s)
IXyz
scale in interface IXyzpublic final IXyz selfNormalize()
IXyz
selfNormalize in interface IXyzpublic final void set(IXyz xyz)
IXyz
set in interface IXyz
public final void set(double px,
double py,
double pz)
IXyz
set in interface IXyzpublic final void subtract(IXyz v)
IXyz
subtract in interface IXyz
public final void v(int i,
double v)
IXyz
v in interface IXyzpublic final void x(double value)
IXyz
x in interface IXyx in interface IXyzpublic final void y(double value)
IXyz
y in interface IXyy in interface IXyzpublic final void z(double value)
IXyz
z in interface IXyz
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||