All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.qd3d.math.Vector2D

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

public final class Vector2D
extends QTByteObject
implements QuickTimeLib, QuickDraw3DLib, Cloneable
Refer to TQ3Vector2D in QuickDraw3D


Variable Index

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

Constructor Index

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

Method Index

 o add(Vector2D)
Returns the two-dimensional vector that is the sum of the two vectors this and v2.
 o clone()
Returns a copy of this class.
 o cross(Vector2D)
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 length()
Returns the length of a two-dimensional vector.
 o normalize()
Returns the normalized form of the vector.
 o scale(float)
Returns a two-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 subtract(Vector2D)
Returns the two-dimensional vector that is the result of subtracting v2 from this.

Variables

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

Constructors

 o Vector2D
 public Vector2D()
Creates a Point2D object containing no data.

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

Parameters:
x - The final x coordinate.
y - The final y 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 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 scale
 public Vector2D scale(float scalar)
Returns a two-dimensional vector that is the result of multiplying each of the components of this by the value of the scalar parameter.

QuickDraw3D::Q3Vector2D_Scale

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

QuickDraw3D::Q3Vector2D_Length

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

QuickDraw3D::Q3Vector2D_Normalize

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

QuickDraw3D::Q3Vector2D_Add

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

QuickDraw3D::Q3Vector2D_Subtract

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

QuickDraw3D::Q3Vector2D_Cross

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

QuickDraw3D::Q3Vector2D_Dot

Parameters:
v2 - A two-dimensional vector.
Returns:
a float
 o clone
 public Object clone()
Returns a copy of this class.

Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index