|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.util.QTByteObject | +--quicktime.qd3d.math.Vector3D
Vector3D contains information for three dimensional vectors. refer to TQ3Vector3D in QuickDraw3d
Field Summary | |
static int |
kNativeSize
This is the size (the number of bytes) that are required for this class |
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Fields inherited from interface quicktime.jdirect.QuickDraw3DLib |
libraryInstance |
Constructor Summary | |
Vector3D()
Creates a Vector3D object containing no data. |
|
Vector3D(float x,
float y,
float z)
Creates a Vector3D object containing with given data. |
Method Summary | |
Vector3D |
add(Vector3D v2)
Returns the three-dimensional vector that is the sum of the two vectors this and v2. |
java.lang.Object |
clone()
Returns a copy of this class. |
Vector3D |
cross(Vector3D v2)
Returns the cross product of this vector and vector v2. |
float |
dot(Vector2D v2)
Returns the dot product of this vector and vector v2. |
static EndianDescriptor |
getEndianDescriptor()
Returns the EndianDescriptor for this class. |
float |
getX()
returns the position in the X direction |
float |
getY()
returns the position in the Y direction |
float |
getZ()
returns the position in the Z direction |
float |
length()
Returns the length of a three-dimensional vector. |
Vector3D |
normalize()
Returns the normalized form of the vector. |
Vector3D |
scale(float scalar)
Returns a three-dimensional vector that is the result of multiplying each of the components of this by the value of the scalar parameter. |
void |
setX(float x)
sets the position in the X direction |
void |
setY(float y)
sets the position in the Y direction |
void |
setZ(float z)
sets the position in the Z direction |
Vector3D |
subtract(Vector3D v2)
Returns the three-dimensional vector that is the result of subtracting v2 from this. |
java.lang.String |
toString()
Returns a string representation of this object. |
Vector3D |
transformQuaternion(Quaternion quaternion)
Return a three-dimensional vector that is the result of transforming the vector specified by the vector parameter using the quaternion specified by the quaternion parameter. |
Methods inherited from class quicktime.util.QTByteObject |
equals, fromArray, getBytes, getSize |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int kNativeSize
Constructor Detail |
public Vector3D()
public Vector3D(float x, float y, float z)
x
- The x coordinate.y
- The y coordinate.z
- The z coordinate.Method Detail |
public static final EndianDescriptor getEndianDescriptor()
public float getX()
public float getY()
public float getZ()
public void setX(float x)
public void setY(float y)
public void setZ(float z)
public Vector3D scale(float scalar)
scalar
- A floating-point number.public float length()
public Vector3D normalize()
public Vector3D add(Vector3D v2)
v2
- A three-dimensional vector.public Vector3D subtract(Vector3D v2)
v2
- A three-dimensional vector.public Vector3D cross(Vector3D v2)
v2
- A two-dimensional vector.public float dot(Vector2D v2)
v2
- A two-dimensional vector.public Vector3D transformQuaternion(Quaternion quaternion)
quaternion
- A quaternion.public java.lang.Object clone()
public java.lang.String toString()
toString
in class QTByteObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |