Package com.reportmill.graphics
Class RMVector3D
java.lang.Object
com.reportmill.graphics.RMVector3D
This class represents a 3D vector.
- 
Constructor SummaryConstructorsConstructorDescriptionRMVector3D(float x, float y, float z) Creates a new vector from the given coords.RMVector3D(RMVector3D aVector) Creates a new vector from the given vector.
- 
Method SummaryModifier and TypeMethodDescriptionadd(RMVector3D aVector) Add the given vector to this.floatReturns the angle between the receiver and the given vector.Returns the vector perpendicular to the receiver and the given vector.floatReturns the dot product of the receiver and the given vector.floatReturns the magnitude of the vector.booleanisAligned(RMVector3D aVector, boolean includePerpendiculars) Returns whether given vector is in same general direction of this (with option to include perpendiculars).booleanisAway(RMVector3D aVector, boolean includePerpendiculars) Returns whether given vector is pointing away from the direction of this (with option to include perpendiculars).negate()Makes this receiver point in the opposite direction.Makes the vector unit length.toString()Returns a string representation of the vector.transform(RMTransform3D aTransform) Transforms the vector by the given transform3d.
- 
Constructor Details- 
RMVector3Dpublic RMVector3D(float x, float y, float z) Creates a new vector from the given coords.
- 
RMVector3DCreates a new vector from the given vector.
 
- 
- 
Method Details- 
getMagnitudepublic float getMagnitude()Returns the magnitude of the vector.
- 
normalizeMakes the vector unit length.
- 
addAdd the given vector to this.
- 
getCrossProductReturns the vector perpendicular to the receiver and the given vector.
- 
getDotProductReturns the dot product of the receiver and the given vector.
- 
isAlignedReturns whether given vector is in same general direction of this (with option to include perpendiculars).
- 
isAwayReturns whether given vector is pointing away from the direction of this (with option to include perpendiculars).
- 
getAngleBetweenReturns the angle between the receiver and the given vector.
- 
negateMakes this receiver point in the opposite direction.
- 
transformTransforms the vector by the given transform3d.
- 
toStringReturns a string representation of the vector.
 
-