|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.algart.drawing3d.Orientation3D
public final class Orientation3D extends java.lang.Object
Orthonormal basis in 3D space: 3 orthogonal unit vectors i, j, k
(usually describing the orientation of some 3D configuration in the space).
Each vector is represented by 3 double values: its components
This class is immutable and thread-safe: there are no ways to modify settings of the created instance.
AlgART Laboratory 2010
Modifier and Type | Field and Description |
---|---|
static Orientation3D |
DEFAULT
Standard orientation: i vector is (1,0,0), j vector is (0,1,0), k vector is (0,0,1). |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other basis is equal to this instance, that is all corresponding components are absolutely identical. |
static Orientation3D |
getInstance(double ix,
double iy,
double iz,
double jx,
double jy,
double jz)
Creates new instance of this class, where the components of i and j vector are specified in the arguments and k vector is chosen automatically as the vector product |
double |
getIx()
Returns x-component ix of i vector in this basis. |
double |
getIy()
Returns y-component iy of i vector in this basis. |
double |
getIz()
Returns z-component iz of i vector in this basis. |
double |
getJx()
Returns x-component jx of j vector in this basis. |
double |
getJy()
Returns y-component jy of j vector in this basis. |
double |
getJz()
Returns z-component jz of j vector in this basis. |
double |
getKx()
Returns x-component kx of k vector in this basis. |
double |
getKy()
Returns y-component ky of k vector in this basis. |
double |
getKz()
Returns z-component kz of k vector in this basis. |
static Orientation3D |
getSomeInstance(double ix,
double iy,
double iz)
Creates new instance of this class, where the components of i vector are specified in the arguments, j and k vectors are chosen automatically by some (undocumented) way, so that the resulting basis |
int |
hashCode()
Returns the hash code of this object. |
double |
inverseTransformX(double x,
double y,
double z)
Returns the projection of the given vector (x,y,z) to the vector i. |
double |
inverseTransformY(double x,
double y,
double z)
Returns the projection of the given vector (x,y,z) to the vector j. |
double |
inverseTransformZ(double x,
double y,
double z)
Returns the projection of the given vector (x,y,z) to the vector k. |
Orientation3D |
rotate(double xAngle,
double yAngle,
double zAngle)
Rotates this basis anticlockwise by the angle xAngle (in radians) around x-axis, then by angle yAngle (in radians) around y-axis, then by angle zAngle (in radians) around z-axis, and returns the result. |
Orientation3D |
rotate(double vX,
double vY,
double vZ,
double angle)
Rotates this basis by the specified angle (in radians) around the specified vector v=(vx,vyvz) anticlockwise and returns the result. |
Orientation3D |
rotateI(double angle)
Rotates this basis by the specified angle (in radians) around i vector anticlockwise and returns the result. |
Orientation3D |
rotateJ(double angle)
Rotates this basis by the specified angle (in radians) around j vector anticlockwise and returns the result. |
Orientation3D |
rotateK(double angle)
Rotates this basis by the specified angle (in radians) around k vector anticlockwise and returns the result. |
Orientation3D |
superposition(Orientation3D basis)
Returns new basis, consisting of 3 vectors i''=ixi'+iyj'+izk', j''=jxi'+jyj'+jzk', k''=kxi'+kyj'+kzk', where |
java.lang.String |
toString()
Returns a brief string description of this object. |
double |
transformX(double x,
double y,
double z)
Returns x-component of the vector xi+yj+zk. |
double |
transformY(double x,
double y,
double z)
Returns y-component of the vector xi+yj+zk. |
double |
transformZ(double x,
double y,
double z)
Returns z-component of the vector xi+yj+zk. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Orientation3D DEFAULT
Method Detail |
---|
public static Orientation3D getSomeInstance(double ix, double iy, double iz)
If the passed vector
ix
- x-component ix of i vector in the created basis.iy
- y-component iy of i vector in the created basis.iz
- z-component iz of i vector in the created basis.public static Orientation3D getInstance(double ix, double iy, double iz, double jx, double jy, double jz)
If the passed vector
ix
- x-component ix of i vector in the created basis.iy
- y-component iy of i vector in the created basis.iz
- z-component iz of i vector in the created basis.jx
- x-component jx of j vector in the created basis.jy
- y-component jy of j vector in the created basis.jz
- z-component jz of j vector in the created basis.public double getIx()
public double getIy()
public double getIz()
public double getJx()
public double getJy()
public double getJz()
public double getKx()
public double getKy()
public double getKz()
public double transformX(double x, double y, double z)
x
- x-component of some vector, specified in the given basis.y
- y-component of some vector, specified in the given basis.z
- z-component of some vector, specified in the given basis.public double transformY(double x, double y, double z)
x
- x-component of some vector, specified in the given basis.y
- y-component of some vector, specified in the given basis.z
- z-component of some vector, specified in the given basis.public double transformZ(double x, double y, double z)
x
- x-component of some vector, specified in the given basis.y
- y-component of some vector, specified in the given basis.z
- z-component of some vector, specified in the given basis.public double inverseTransformX(double x, double y, double z)
x
- x-component of some vector.y
- y-component of some vector.z
- z-component of some vector.public double inverseTransformY(double x, double y, double z)
x
- x-component of some vector.y
- y-component of some vector.z
- z-component of some vector.public double inverseTransformZ(double x, double y, double z)
x
- x-component of some vector.y
- y-component of some vector.z
- z-component of some vector.public Orientation3D superposition(Orientation3D basis)
default
basis to
basis
- some other basis.java.lang.NullPointerException
- if the argument is null.public Orientation3D rotateI(double angle)
angle
- angle for rotation around i vector, in radians.public Orientation3D rotateJ(double angle)
angle
- angle for rotation around j vector, in radians.public Orientation3D rotateK(double angle)
angle
- angle for rotation around k vector, in radians.public Orientation3D rotate(double xAngle, double yAngle, double zAngle)
xAngle
- angle for rotation around x-axis, in radians.yAngle
- angle for rotation around y-axis, in radians.zAngle
- angle for rotation around z-axis, in radians.public Orientation3D rotate(double vX, double vY, double vZ, double angle)
rotateI
(angle).
vX
- x-component of v vector.vY
- y-component of v vector.vZ
- z-component of v vector.angle
- angle for rotation around v vector, in radians.public java.lang.String toString()
The result of this method may depend on implementation.
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to be compared for equality with this instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |