All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.qd3d.math.Vector3D

java.lang.Object
   |
   +----quicktime.util.QTByteObject
           |
           +----quicktime.qd3d.math.Vector3D

public final class Vector3D
extends QTByteObject
implements QuickTimeLib, QuickDraw3DLib, Cloneable
Vector3D contains information for three dimensional vectors. refer to TQ3Vector3D in QuickDraw3d


Variable Index

 o kNativeSize
This is the size (the number of bytes) that are required for this class

Constructor Index

 o Vector3D()
Creates a Vector3D object containing no data.
 o Vector3D(float, float, float)
Creates a Vector3D object containing with given data.

Method Index

 o add(Vector3D)
Returns the three-dimensional vector that is the sum of the two vectors this and v2.
 o clone()
Returns a copy of this class.
 o cross(Vector3D)
Returns the cross product of this vector and vector v2.
 o dot(Vector2D)
Returns the dot product of this vector and vector v2.
 o getEndianDescriptor()
Returns the EndianDescriptor for this class.
 o getX()
returns the position in the X direction
 o getY()
returns the position in the Y direction
 o getZ()
returns the position in the Z direction
 o length()
Returns the length of a three-dimensional vector.
 o normalize()
Returns the normalized form of the vector.
 o scale(float)
Returns a three-dimensional vector that is the result of multiplying each of the components of this by the value of the scalar parameter.
 o setX(float)
sets the position in the X direction
 o setY(float)
sets the position in the Y direction
 o setZ(float)
sets the position in the Z direction
 o subtract(Vector3D)
Returns the three-dimensional vector that is the result of subtracting v2 from this.
 o toString()
Returns a string representation of this object.
 o transformQuaternion(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.

Variables

 o kNativeSize
 public static final int kNativeSize
This is the size (the number of bytes) that are required for this class

Constructors

 o Vector3D
 public Vector3D()
Creates a Vector3D object containing no data.

 o Vector3D
 public Vector3D(float x,
                 float y,
                 float z)
Creates a Vector3D object containing with given data.

Parameters:
x - The x coordinate.
y - The y coordinate.
z - The z coordinate.

Methods

 o getEndianDescriptor
 public static final EndianDescriptor getEndianDescriptor()
Returns the EndianDescriptor for this class.

Returns:
an EndianDescriptor
 o getX
 public float getX()
returns the position in the X direction

 o getY
 public float getY()
returns the position in the Y direction

 o getZ
 public float getZ()
returns the position in the Z direction

 o setX
 public void setX(float x)
sets the position in the X direction

 o setY
 public void setY(float y)
sets the position in the Y direction

 o setZ
 public void setZ(float z)
sets the position in the Z direction

 o scale
 public 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.

QuickDraw3D::Q3Vector3D_Scale

Parameters:
scalar - A floating-point number.
Returns:
a new scaled vector.
 o length
 public float length()
Returns the length of a three-dimensional vector.

QuickDraw3D::Q3Vector3D_Length

Returns:
the length of the vector.
 o normalize
 public Vector3D normalize()
Returns the normalized form of the vector.

QuickDraw3D::Q3Vector3D_Normalize

Returns:
the normalized form of the vector
 o add
 public Vector3D add(Vector3D v2)
Returns the three-dimensional vector that is the sum of the two vectors this and v2.

QuickDraw3D::Q3Vector3D_Add

Parameters:
v2 - A three-dimensional vector.
Returns:
the sum of v1 and v2.
 o subtract
 public Vector3D subtract(Vector3D v2)
Returns the three-dimensional vector that is the result of subtracting v2 from this.

QuickDraw3D::Q3Vector3D_Subtract

Parameters:
v2 - A three-dimensional vector.
Returns:
the result of subtracting v2 from this.
 o cross
 public Vector3D cross(Vector3D v2)
Returns the cross product of this vector and vector v2.

QuickDraw3D::Q3Vector3D_Cross

Parameters:
v2 - A two-dimensional vector.
Returns:
a vector
 o dot
 public float dot(Vector2D v2)
Returns the dot product of this vector and vector v2.

QuickDraw3D::Q3Vector3D_Dot

Parameters:
v2 - A two-dimensional vector.
Returns:
a vector
 o transformQuaternion
 public 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.

QuickDraw3D::Q3Vector3D_TransformQuaternion

Parameters:
quaternion - A quaternion.
Returns:
a three-dimensional vector
 o clone
 public Object clone()
Returns a copy of this class.

Overrides:
clone in class Object
 o toString
 public String toString()
Returns a string representation of this object.

Overrides:
toString in class QTByteObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index