Class Vector3
raft.kilavuz.runtime.Vector3 All Implemented Interfaces:
-
public class Vector3
a three-dimensional vector. represents either a location or direction.
this class is provided to ease usage for non-jPCT users.
jPCT users can use this anywhere a SimpleVector required as Vector3 extends SimpleVector.
for convenience some methods which return SimpleVector are overriden to return Vector3
See Also:
-
Constructor Summary |
Vector3()creates a new Vector3 at origin |
|
Vector3(double x, double y, double z)creates a new Vector3 by using given components. |
Vector3(float x, float y, float z)creates a new Vector3 by using given components |
Vector3(float[] vector)creates a new Vector3 by using given components |
Method Summary |
|
calcSub(SimpleVector other)calculates the difference between two vectors and returns result in a new Vector3 |
|
normalize()normalizes this vector and returns the result in a new vector |
|
toString()returns string representation of this Vector3 |
Methods inherited from class com.threed.jpct.SimpleVector |
add, calcCross, calcDot, equals, getRotationMatrix, hashCode, length, makeEqualLength, matMul, rotate, rotateX, rotateY, rotateZ, scalarMul, set, set, toArray |
Constructor Detail
Vector3
public Vector3()
-
creates a new Vector3 at origin
Vector3
public Vector3(float x,
float y,
float z)
-
creates a new Vector3 by using given components
Vector3
public Vector3(double x,
double y,
double z)
-
creates a new Vector3 by using given components.
given doubles are internally casted to floats
Vector3
public Vector3(float[] vector)
-
creates a new Vector3 by using given components
Vector3
-
creates a new Vector3 by copying given vector
Method Detail
normalize
-
normalizes this vector and returns the result in a new vector
Overrides:
-
calcSub
-
calculates the difference between two vectors and returns result in a new Vector3
Overrides:
-
toString
-
returns string representation of this Vector3
Overrides:
-
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com