java.lang.Object
javax.vecmath.Tuple3d
javax.vecmath.Vector3d
de.grogra.ray2.radiosity.Vector3d
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
PositionVector
This class extends the javax.vecmath.Vector3d class and adds same rotation functions.
- Author:
- Ralf Kopsch
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionPre calculates the rotation around the z axis.clone()
void
rotateX
(double sinTheta, double cosTheta) Rotates the vector around the x-axis.void
rotateY
(double sinTheta, double cosTheta) Rotates the vector around the y-axis.void
rotateZ
(double sinTheta, double cosTheta) Rotates the vector around the z-axis.Methods inherited from class javax.vecmath.Vector3d
angle, cross, dot, length, lengthSquared, normalize, normalize
Methods inherited from class javax.vecmath.Tuple3d
absolute, absolute, add, add, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, epsilonEquals, equals, equals, get, get, get, hashCode, interpolate, interpolate, interpolate, interpolate, max, min, negate, negate, scale, scale, scaleAdd, scaleAdd, set, set, set, set, sub, sub, toString
-
Constructor Details
-
Vector3d
public Vector3d()Creates a new Vector3D. -
Vector3d
A copy constructor.- Parameters:
v
- the vector to clone.
-
Vector3d
public Vector3d(double x, double y, double z) A copy constructor.- Parameters:
x
- the x-coordinate.y
- the y-coordinate.z
- the z-coordinate.
-
-
Method Details
-
rotateX
public void rotateX(double sinTheta, double cosTheta) Rotates the vector around the x-axis.- Parameters:
sinTheta
- the sinus angle.cosTheta
- the cosinus angle.
-
rotateY
public void rotateY(double sinTheta, double cosTheta) Rotates the vector around the y-axis.- Parameters:
sinTheta
- the sinus angle.cosTheta
- the cosinus angle.
-
rotateZ
public void rotateZ(double sinTheta, double cosTheta) Rotates the vector around the z-axis.- Parameters:
sinTheta
- the sinus angle.cosTheta
- the cosinus angle.
-
calcRotationToZ
Pre calculates the rotation around the z axis.- Returns:
- the calculated angles.
-
clone
-