Package org.jzy3d.maths
Class Vector3d
java.lang.Object
org.jzy3d.maths.Vector3d
Storage for a 3 dimensional vector defined by two points. Provide the vector function that
returns the vector as a Coord3d, as well as dot product and norm.
- Author:
- Martin Pernollet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncoord1()
coord2()
Coord3d[]
coords()
Computes the vectorial product of the current and the given vector.double
Compute the distance between two coordinates.float
Compute the dot product (a.k.a scalar product) between the current and given vector.Return the central point of this segment.float
norm()
Compute the norm of this vector.vector()
Return the vector induced by this set of coordinates.
-
Constructor Details
-
Vector3d
public Vector3d(float x1, float y1, float z1, float x2, float y2, float z2) Create a vector, described by two points. -
Vector3d
public Vector3d(float x2, float y2, float z2) -
Vector3d
public Vector3d(double x2, double y2, double z2) -
Vector3d
Create a vector, described by two coordinates. -
Vector3d
-
-
Method Details
-
coord2
-
coord1
-
coords
-
vector
Return the vector induced by this set of coordinates. -
dot
Compute the dot product (a.k.a scalar product) between the current and given vector. Remind that the dot product is 0 if vectors are perpendicular- Parameters:
v
- input vector- Returns:
- the dot product
-
cross
Computes the vectorial product of the current and the given vector. The result is a vector defined as a Coord3d, that is perpendicular to the plan induced by current vector and vector V. -
norm
public float norm()Compute the norm of this vector.- Returns:
- the norm
-
distance
Compute the distance between two coordinates. -
getCenter
Return the central point of this segment.
-