Package georegression.struct
Class GeoTuple3D_F64<T extends GeoTuple3D_F64>
java.lang.Object
georegression.struct.GeoTuple<T>
georegression.struct.GeoTuple_F64<T>
georegression.struct.GeoTuple3D_F64<T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Point3D_F64
,Vector3D_F64
Generic Tuple for geometric objects that store (x,y,z)
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
double
distance
(double x, double y, double z) double
double
distance2
(double x, double y, double z) double
void
divideIP
(double scalar) boolean
int
The dimensionality of space the tuple is contained in and the number of values it has.double
getIdx
(int index) Returns the value of the tuple along the specified coordinate system axis.int
hashCode()
boolean
isIdentical
(double x, double y, double z) boolean
isIdentical
(double x, double y, double z, double tol) boolean
isIdentical
(GeoTuple3D_F64 t, double tol) Checks to see if the two GeoTuple have values which are nearly the same.boolean
isNaN()
Returns true if at least one value is NaNdouble
norm()
Computes the Euclidean norm.double
normSq()
Computes the square of the Euclidean norm.plus
(double alpha, GeoTuple3D_F64 a) AdditionAdditionvoid
plusIP
(double alpha, GeoTuple3D_F64 a) In-place additionvoid
In-place additionvoid
print()
void
scale
(double scalar) In-place scalar multiplicationvoid
setIdx
(int index, double value) setTo
(double x, double y, double z) setTo
(GeoTuple2D_F64<?> p, double z) Sets this equal to 'src'times
(double scalar) Scalar multiplicationvoid
timesIP
(double scalar) In-place scalar multiplicationvoid
zero()
Sets all coefficients and parameters to zero, which is typically the initial state.Methods inherited from class georegression.struct.GeoTuple_F64
copy, isInfinite
Methods inherited from class georegression.struct.GeoTuple
createNewInstance
-
Field Details
-
x
public double x -
y
public double y -
z
public double z
-
-
Constructor Details
-
GeoTuple3D_F64
protected GeoTuple3D_F64(double x, double y, double z) -
GeoTuple3D_F64
protected GeoTuple3D_F64()
-
-
Method Details
-
getDimension
public int getDimension()Description copied from class:GeoTuple
The dimensionality of space the tuple is contained in and the number of values it has.- Specified by:
getDimension
in classGeoTuple<T extends GeoTuple3D_F64>
- Returns:
- Dimensionality of the object.
-
_setTo
-
setTo
-
setTo
-
zero
public void zero()Description copied from class:GeoTuple
Sets all coefficients and parameters to zero, which is typically the initial state.- Specified by:
zero
in classGeoTuple<T extends GeoTuple3D_F64>
-
isIdentical
public boolean isIdentical(double x, double y, double z) -
isIdentical
public boolean isIdentical(double x, double y, double z, double tol) -
isIdentical
Description copied from class:GeoTuple_F64
Checks to see if the two GeoTuple have values which are nearly the same. False is always returned if the dimension is different.- Overrides:
isIdentical
in classGeoTuple_F64<T extends GeoTuple3D_F64>
- Parameters:
t
- The GeoTuple it is being compared against.tol
- How similar each element must be for them to be considered identical.- Returns:
- if they are identical or not.
-
getIdx
public double getIdx(int index) Description copied from class:GeoTuple_F64
Returns the value of the tuple along the specified coordinate system axis.- Specified by:
getIdx
in classGeoTuple_F64<T extends GeoTuple3D_F64>
- Parameters:
index
- Which axis in the coordinate system.- Returns:
- Its value.
-
setIdx
public void setIdx(int index, double value) - Specified by:
setIdx
in classGeoTuple_F64<T extends GeoTuple3D_F64>
-
plusIP
In-place addition
this.x = this.x + a.x;- Parameters:
a
- value which is to be added
-
plus
Addition
ret.x = this.x + a.x;- Parameters:
a
- value which is to be added
-
plusIP
In-place addition
this.x = this.x + alpha*a.x;- Parameters:
a
- value which is to be added
-
plus
Addition
ret.x = this.x + alpha*a.x;- Parameters:
a
- value which is to be added
-
timesIP
public void timesIP(double scalar) In-place scalar multiplication- Parameters:
scalar
- value that it is multiplied by
-
scale
public void scale(double scalar) In-place scalar multiplication- Parameters:
scalar
- value that it is multiplied by
-
divideIP
public void divideIP(double scalar) -
times
Scalar multiplication- Parameters:
scalar
- value which is it multiplied by- Returns:
- new matrix which is the original scaled
-
norm
public double norm()Description copied from class:GeoTuple_F64
Computes the Euclidean norm.- Overrides:
norm
in classGeoTuple_F64<T extends GeoTuple3D_F64>
- Returns:
- norm.
-
normSq
public double normSq()Description copied from class:GeoTuple_F64
Computes the square of the Euclidean norm.- Overrides:
normSq
in classGeoTuple_F64<T extends GeoTuple3D_F64>
- Returns:
- norm squared.
-
distance
public double distance(double x, double y, double z) -
setTo
Description copied from class:GeoTuple
Sets this equal to 'src'- Specified by:
setTo
in classGeoTuple<T extends GeoTuple3D_F64>
- Parameters:
src
- The tuple being copied- Returns:
- Reference to 'this' class instance. Used to chain operations.
-
distance
- Overrides:
distance
in classGeoTuple_F64<T extends GeoTuple3D_F64>
-
distance2
- Overrides:
distance2
in classGeoTuple_F64<T extends GeoTuple3D_F64>
-
distance2
public double distance2(double x, double y, double z) -
print
public void print() -
isNaN
public boolean isNaN()Description copied from class:GeoTuple_F64
Returns true if at least one value is NaN- Overrides:
isNaN
in classGeoTuple_F64<T extends GeoTuple3D_F64>
-
equals
- Overrides:
equals
in classGeoTuple_F64<T extends GeoTuple3D_F64>
-
toString
-
hashCode
public int hashCode()- Overrides:
hashCode
in classGeoTuple_F64<T extends GeoTuple3D_F64>
-