|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.geom.Vector2
org.graphstream.ui.geom.Vector3
public class Vector3
A three component vector made of doubles.
Field Summary |
---|
Fields inherited from class org.graphstream.ui.geom.Vector2 |
---|
data |
Constructor Summary | |
---|---|
Vector3()
New zero vector. |
|
Vector3(double x,
double y,
double z)
New ( x ,y ,z ) vector. |
|
Vector3(Point3 point)
New vector copy of point . |
|
Vector3(Vector3 other)
New vector copy of other . |
Method Summary | |
---|---|
void |
add(Vector3 other)
Add each element of other to the corresponding element of this. |
Object |
clone()
|
void |
copy(Point3 point)
Make this a copy of point . |
void |
copy(Vector3 other)
Make this a copy of other. |
void |
crossProduct(Vector3 other)
Set this to the cross product of this and other. |
void |
crossProduct(Vector3 A,
Vector3 B)
Set this to the cross product of A and B. |
double |
dotProduct(double ox,
double oy,
double oz)
|
double |
dotProduct(Vector3 other)
Dot product of this and other. |
boolean |
equals(Object other)
Is this equal to other ? |
void |
fill(double value)
Assign value to all elements. |
boolean |
isZero()
Are all components to zero?. |
double |
length()
Cartesian length. |
void |
mult(Vector3 other)
Multiply each element of this by the corresponding element of other. |
double |
normalize()
Transform this into an unit vector. |
void |
scalarAdd(double value)
Add value to each element. |
void |
scalarDiv(double value)
Divide each element by value. |
void |
scalarMult(double value)
Multiply each element by value. |
void |
scalarSub(double value)
Substract value to each element. |
void |
set(double x,
double y,
double z)
Explicitly set the three components. |
void |
set(int i,
double value)
Explicitly set the i-th component to value. |
void |
sub(Vector3 other)
Substract each element of other to the corresponding element of this. |
String |
toString()
|
boolean |
validComponent(int i)
Is i the index of a component ? |
double |
z()
|
Methods inherited from class org.graphstream.ui.geom.Vector2 |
---|
add, at, copy, copy, dotProduct, dotProduct, mult, set, sub, x, y |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Vector3()
public Vector3(double x, double y, double z)
x
,y
,z
) vector.
public Vector3(Vector3 other)
other
.
public Vector3(Point3 point)
point
.
Method Detail |
---|
public boolean isZero()
isZero
in class Vector2
public boolean equals(Object other)
equals
in class Vector2
public boolean validComponent(int i)
validComponent
in class Vector2
public Object clone()
clone
in class Vector2
public double dotProduct(double ox, double oy, double oz)
public double dotProduct(Vector3 other)
public double length()
length
in class Vector2
public double z()
public void fill(double value)
fill
in class Vector2
public void set(int i, double value)
set
in class Vector2
public void set(double x, double y, double z)
public void add(Vector3 other)
public void sub(Vector3 other)
public void mult(Vector3 other)
public void scalarAdd(double value)
scalarAdd
in class Vector2
public void scalarSub(double value)
scalarSub
in class Vector2
public void scalarMult(double value)
scalarMult
in class Vector2
public void scalarDiv(double value)
scalarDiv
in class Vector2
public void crossProduct(Vector3 other)
public void crossProduct(Vector3 A, Vector3 B)
public double normalize()
normalize
in class Vector2
public void copy(Vector3 other)
public void copy(Point3 point)
point
.
public String toString()
toString
in class Vector2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |