|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.physics.solids.AtlasObject
org.jscience.physics.solids.geom.AtlasVector
public class AtlasVector
A spatial direction and magnitude.
| Field Summary | |
|---|---|
protected static java.lang.String |
TYPE
DOCUMENT ME! |
| Constructor Summary | |
|---|---|
AtlasVector()
Creates a new vector (0.,0.,0.) in the global coordinate system. |
|
AtlasVector(AtlasCoordSys cs,
double[] vals)
Creates a new vector (x,y,z) in the global coordinate system. |
|
AtlasVector(AtlasCoordSys cs,
double x,
double y,
double z)
Creates a new vector (x,y,z) in the global coordinate system. |
|
AtlasVector(double[] vals)
Creates a new vector (x,y,z) in the global coordinate system. |
|
AtlasVector(double x,
double y,
double z)
Creates a new vector (x,y,z) in the global coordinate system. |
|
| Method Summary | |
|---|---|
AtlasVector |
clone()
Returns a clone of the vector |
double |
computeAngle(AtlasVector v)
Computes the angle between the two vectors. |
double |
computeMagnitude()
Returns the magnitude of the vector. |
AtlasVector |
cross(AtlasVector v)
Computes cross product between the two vectors. |
double |
dot(AtlasVector v)
Computes dot product between the two vectors. |
double[] |
getComponents(AtlasCoordSys coordSys)
Returns the components of the vector in the specified coordinate system. |
AtlasCoordSys |
getCoordSys()
Returns the reference coordsys for this vector. |
double[] |
getGlobalDirection()
Returns the location in the global coordinate system. |
java.lang.String |
getType()
DOCUMENT ME! |
boolean |
isEquivalent(AtlasVector v,
double tolerance)
Determines whether the two vectors have the same direction |
boolean |
isParallel(AtlasVector v)
Determines whether the two vectors are parallel. |
void |
normalize()
Normalizes the vector in place |
void |
scale(double s)
Scales the vector magnitude. |
java.lang.String |
toString()
DOCUMENT ME! |
| Methods inherited from class org.jscience.physics.solids.AtlasObject |
|---|
compareTo, equals, getId, getParentModel, loadJDOMElement, populateGeometry, setId, setParentModel, unloadJDOMElement |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static java.lang.String TYPE
| Constructor Detail |
|---|
public AtlasVector()
public AtlasVector(double x,
double y,
double z)
public AtlasVector(double[] vals)
public AtlasVector(AtlasCoordSys cs,
double x,
double y,
double z)
public AtlasVector(AtlasCoordSys cs,
double[] vals)
| Method Detail |
|---|
public java.lang.String getType()
getType in class AtlasObjectpublic double[] getGlobalDirection()
public double[] getComponents(AtlasCoordSys coordSys)
coordSys - DOCUMENT ME!
java.lang.UnsupportedOperationException - DOCUMENT ME!public AtlasCoordSys getCoordSys()
public double computeMagnitude()
public double computeAngle(AtlasVector v)
v - DOCUMENT ME!
public double dot(AtlasVector v)
v - DOCUMENT ME!
public void normalize()
public void scale(double s)
s - DOCUMENT ME!
public boolean isEquivalent(AtlasVector v,
double tolerance)
v - DOCUMENT ME!tolerance - DOCUMENT ME!
public AtlasVector cross(AtlasVector v)
v - DOCUMENT ME!
public java.lang.String toString()
toString in class AtlasObjectpublic AtlasVector clone()
clone in class java.lang.Objectpublic boolean isParallel(AtlasVector v)
v - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||