|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IXyz
A general-purpose 3-dimensional point or vector object.
| Field Summary | |
|---|---|
static IXyz[] |
ZERO_ARRAY
|
| 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(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 d)
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. |
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 d)
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 that)
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 |
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 interface com.azalient.api.a.position.IXy |
|---|
distance |
| Field Detail |
|---|
static final IXyz[] ZERO_ARRAY
| Method Detail |
|---|
double x()
x in interface IXyx in interface OpenGLXyzdouble y()
y in interface IXyy in interface OpenGLXyzdouble z()
z in interface OpenGLXyzvoid x(double value)
x in interface IXyvoid y(double value)
y in interface IXyvoid z(double value)
double length()
boolean atZERO()
IXyz copy()
void set(IXyz that)
void set(double px,
double py,
double pz)
double v(int i)
void v(int i,
double v)
double distance(IXyz there)
IAngle bearingTo(IXyz there)
IAngle asBearing()
double gradientToFrac(IXyz there)
double asGradient()
boolean toRightOf(IXyz pA,
IXyz pB)
IXyz parallelComponent(IXyz v)
double parallelComponentMag(IXyz v)
IXyz perpComponent(IXyz v)
IXyz negative()
IXyz selfNormalize()
IXyz normalized()
IXyz cross(IXyz v)
IXyz plus(IXyz v)
IXyz minus(IXyz v)
IXyz multipliedBy(double d)
IXyz dividedBy(double d)
void add(IXyz v)
void subtract(IXyz v)
void crossWith(IXyz v)
void negate()
void scale(double s)
void divide(double s)
void multiply(double s)
double dot(IXyz v)
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
double lengthSquared()
IXyz truncateLength(double maxLength)
IAngle angleBetween(IXyz v)
v - the other vector
IXyz nearestPointOnLine(IXyz a,
IXyz b)
void rotate(IXy xy,
IAngle a)
void rotate(IXya xya)
IXyz rotationAsMove(IXy xy,
IAngle a)
IXyz rotationAsMove(IXya xya)
IXyz transform(IXyz origin0,
IAngle compass0,
IXyz origin1,
IAngle compass1)
IXyz nearestPointOn(IXyz a,
IXyz b,
boolean limitAB)
limitAB - if true, the point must be between A and B, inclusive
double distance(IXyz a,
IXyz b,
boolean limitAB)
limitAB - if true, the distance is to a point between A and B, inclusive. If false,
the line is extended to infinite length
void abZ(IXyz a,
IXyz b)
boolean isFinite()
double[] asDouble3()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||