Q
- The Quantity (unit type, such as Length or Volume) of this vector.public final class Cylindrical3D<Q extends Quantity> extends Coordinate3D<Q> implements javolution.xml.XMLSerializable
vector
of Parameter elements
representing a geometrical cylindrical coordinate with elements radius, azimuth angle
and height.
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static int |
AZIMUTH
Constant used to identify the azimuth angle of the vector.
|
static int |
HEIGHT
Constant used to identify the height or altitude of the vector.
|
static int |
RADIUS
Constant used to identify the radius of in the vector.
|
Modifier and Type | Method and Description |
---|---|
Cylindrical3D<Q> |
angleTo(Unit<Angle> unit)
Returns the equivalent to this vector but with the azimuth angle stated in the
specified unit.
|
<T extends Quantity> |
asType(java.lang.Class<T> type)
Casts this Cylindrical3D to a parameterized unit of specified nature or throw a
ClassCastException if the dimension of the specified quantity and this
parameter's unit dimension do not match. |
Cylindrical3D<Q> |
copy()
Returns a copy of this vector
allocated
by the calling thread (possibly on the stack). |
Cylindrical3D |
cross(Vector that)
Returns the cross product of two 3-dimensional vectors.
|
Cylindrical3D<?> |
divide(Parameter<?> that)
Returns the result of this vector divided by the specified divisor.
|
boolean |
equals(java.lang.Object obj)
Compares this Cylindrical3D against the specified object for strict equality (same
values and same units).
|
Cylindrical3D<Q> |
fromVector3D(Vector3D<Q> vector)
Return the specified
Vector3D object as a Cylindrical3D
instance. |
Parameter |
get(int i)
Returns the value of a Parameter from this vector.
|
Unit<Angle> |
getAngleUnit()
Returns the unit in which the azimuth angle in this vector is stated in.
|
Parameter<Angle> |
getAzimuth()
Returns the azimuth angle of this vector as a
Parameter . |
Parameter<Q> |
getHeight()
Returns the height or altitude element of this vector as a
Parameter . |
Parameter<Q> |
getRadius()
Returns the radius element of this vector as a
Parameter . |
double |
getRadiusValue()
Returns the radius element of this vector as a
double , stated in this
vector's unit . |
Unit<Q> |
getUnit()
Returns the unit in which the radius and height in this vector are stated in.
|
int |
hashCode()
Returns the hash code for this parameter.
|
Cylindrical3D<Q> |
minus(Parameter<Q> that)
Subtracts the supplied Parameter from this vector's and returns the result.
|
Cylindrical3D<Q> |
minus(Vector<Parameter<Q>> that)
Returns the difference between this vector and the one specified.
|
Parameter<Q> |
norm()
Returns the Euclidian norm, magnitude, or length of this vector (square root of the
dot product of this vector and itself).
|
double |
normValue()
Returns the
norm , magnitude, or length value of this vector. |
Cylindrical3D<Q> |
opposite()
Returns the negation of this vector.
|
Cylindrical3D<Q> |
plus(Parameter<Q> that)
Returns the sum of this vector with the parameter specified.
|
Cylindrical3D<Q> |
plus(Vector<Parameter<Q>> that)
Returns the sum of this vector with the one specified.
|
Cylindrical3D<Q> |
times(double k)
Returns the product of this vector with the specified coefficient.
|
Cylindrical3D |
times(Parameter k)
Returns the product of this vector with the specified coefficient.
|
Parameter |
times(Vector that)
Returns the dot product of this vector with the one specified.
|
<R extends Quantity> |
to(Unit<R> unit)
Returns the equivalent to this vector but with the radius and height stated in the
specified unit.
|
Cylindrical3D<Dimensionless> |
toUnitVector()
Returns this vector converted to a unit vector with a vector magnitude of 1.0.
|
Vector3D<Q> |
toVector3D()
Returns a Cartesian Vector3D representation of this vector.
|
static <Q extends Quantity> |
valueOf(Coordinate3D<Q> coordinate)
Returns a
Cylindrical3D instance containing the cylindrical coordinate
representation of the specified coordinate . |
static <Q extends Quantity> |
valueOf(Coordinate3D<Q> coord,
Unit<Angle> angleUnit)
Returns a
Cylindrical3D instance containing the cylindrical coordinate
representation of the specified coordinate . |
static <Q extends Quantity> |
valueOf(double radius,
double azimuth,
double height,
Unit<Q> radiusUnit,
Unit<Angle> angleUnit)
Returns a
Cylindrical3D instance holding the specified double
values stated in the specified units. |
static <Q extends Quantity> |
valueOf(Parameter<Q> radius,
Parameter<Angle> azimuth,
Parameter<Q> height)
Returns a
Cylindrical3D instance holding the specified
Parameter values. |
getDimension, isApproxEqual, isApproxZero
public static final int RADIUS
public static final int AZIMUTH
public static final int HEIGHT
public static <Q extends Quantity> Cylindrical3D<Q> valueOf(double radius, double azimuth, double height, Unit<Q> radiusUnit, Unit<Angle> angleUnit)
Cylindrical3D
instance holding the specified double
values stated in the specified units.Q
- the Quantity (unit type, e.g. Length or Volume) of this vector.radius
- the radius of the vector stated in the specified radius unit.azimuth
- the vector azimuth angle stated in the specified angle unit.height
- the vector height/altitude value stated in the specified radius
unit.radiusUnit
- the unit in which the radius and height is stated.angleUnit
- the unit in which the azimuth angle is stated.public static <Q extends Quantity> Cylindrical3D<Q> valueOf(Parameter<Q> radius, Parameter<Angle> azimuth, Parameter<Q> height)
Cylindrical3D
instance holding the specified
Parameter
values.Q
- the Quantity (unit type, e.g. Length or Volume) of this vector.radius
- the vector radius value.azimuth
- the vector azimuth angle value.height
- the vector height/altitude value.public static <Q extends Quantity> Cylindrical3D<Q> valueOf(Coordinate3D<Q> coordinate)
Cylindrical3D
instance containing the cylindrical coordinate
representation of the specified coordinate
. The azimuth
component of the resulting vector will have units of radians.Q
- the Quantity (unit type, e.g. Length or Volume) of this vector.coordinate
- the input coordinate.public static <Q extends Quantity> Cylindrical3D<Q> valueOf(Coordinate3D<Q> coord, Unit<Angle> angleUnit)
Cylindrical3D
instance containing the cylindrical coordinate
representation of the specified coordinate
.Q
- the Quantity (unit type, e.g. Length or Volume) of this vector.coord
- the coordinate to convert.angleUnit
- the unit to use for the azimuth component.public Cylindrical3D<Q> fromVector3D(Vector3D<Q> vector)
Vector3D
object as a Cylindrical3D
instance.fromVector3D
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
vector
- The Vector3D object to be converted to a Cylindrical3D.public Parameter get(int i)
public double getRadiusValue()
double
, stated in this
vector's unit
.public Parameter<Q> getRadius()
Parameter
.public Parameter<Angle> getAzimuth()
Parameter
.public Parameter<Q> getHeight()
Parameter
.public Parameter<Q> norm()
norm
in interface VectorSpaceNormed<Vector<Parameter<Q extends Quantity>>,Parameter<Q extends Quantity>>
norm
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
sqrt(this · this)
.public double normValue()
norm
, magnitude, or length value of this vector.normValue
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
this.norm().getValue()
.public Cylindrical3D<Q> opposite()
public Cylindrical3D<Q> plus(Vector<Parameter<Q>> that)
public Cylindrical3D<Q> plus(Parameter<Q> that)
plus
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
that
- the parameter to be added to this vector.this + that
.public Cylindrical3D<Q> minus(Vector<Parameter<Q>> that)
public Cylindrical3D<Q> minus(Parameter<Q> that)
minus
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
that
- the Parameter to be subtracted from this vector.this - that
.public Cylindrical3D times(Parameter k)
public Cylindrical3D<Q> times(double k)
times
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
k
- the coefficient multiplier.this · k
public Parameter times(Vector that)
times
in class Vector<Parameter<Q extends Quantity>>
that
- the vector multiplier.this · that
DimensionException
- if this.dimension() != that.dimension()
public Cylindrical3D<?> divide(Parameter<?> that)
that
- the divisor.this / that
.public Cylindrical3D cross(Vector that)
cross
in class Vector<Parameter<Q extends Quantity>>
that
- the vector multiplier.this x that
DimensionException
- if (that.getDimension() != 3)
public Cylindrical3D<Dimensionless> toUnitVector()
toUnitVector
in class Coordinate3D<Q extends Quantity>
public Cylindrical3D<Q> copy()
allocated
by the calling thread (possibly on the stack).public Unit<Q> getUnit()
getUnit
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
public Unit<Angle> getAngleUnit()
public <R extends Quantity> Cylindrical3D<R> to(Unit<R> unit) throws ConversionException
to
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
R
- the Quantity (physical unit) type of the returned vector.unit
- the unit of the radius and height of the vector to be returned.ConversionException
- if the current model does not allows for conversion to
the specified unit.public Cylindrical3D<Q> angleTo(Unit<Angle> unit)
unit
- the angle unit of the azimuth of the vector to be returned.ConversionException
- if the current model does not allows for conversion to
the specified unit.public <T extends Quantity> Cylindrical3D<T> asType(java.lang.Class<T> type) throws java.lang.ClassCastException
ClassCastException
if the dimension of the specified quantity and this
parameter's unit dimension do not match.asType
in class Coordinate3D<Q extends Quantity>
T
- the Quantity (physical unit) type of the returned vector.type
- the quantity class identifying the nature of the unit.java.lang.ClassCastException
- if the dimension of this parameter's unit is different
from the specified quantity dimension.java.lang.UnsupportedOperationException
- if the specified quantity class does not have
a public static field named "UNIT" holding the standard unit for the quantity.public Vector3D<Q> toVector3D()
The polar to Cartesian transformation is defined by:
|x| | radius*cos(azimuth) | |y| = | radius*sin(azimuth) | |z| | height |
toVector3D
in class AbstractParamVector<Q extends Quantity,Coordinate3D<Q extends Quantity>>
public boolean equals(java.lang.Object obj)