quicktime.qd3d.math
Class Point3D

java.lang.Object
  |
  +--quicktime.util.QTByteObject
        |
        +--quicktime.qd3d.math.Point3D
All Implemented Interfaces:
java.lang.Cloneable, quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickDraw3DLib, quicktime.jdirect.QuickTimeLib, java.io.Serializable, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class Point3D
extends QTByteObject
implements quicktime.jdirect.QuickTimeLib, quicktime.jdirect.QuickDraw3DLib, java.lang.Cloneable

Point3D contains information for the three dimensional point. Refer to TQ3Point3D in QuickDraw3d

See Also:
Serialized Form

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
Point3D()
          Creates a Point3D object containing no data.
Point3D(float x, float y, float z)
          Creates a Point3D object containing with given data.
 
Method Summary
 Point3D add(Vector3D vector3D)
          Returns the three-dimensional point that is the result of adding the vector vector3D to this.
 java.lang.Object clone()
          Returns a copy of this object.
 Vector3D cross(Point3D point2, Point3D point3)
          Returns the cross product of the two vectors determined by subtracting point2 from this and point3 from this

QuickDraw3D::Q3Point3D_CrossProductTri

 float distance(Point3D p2)
          Returns the absolute value of the distance between points this and p2.
 float distanceSquared(Point3D p2)
          Returns the squared value of the distance between points this and p2.
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
 Point3D rRatio(Point3D p2, float r1, float r2)
          Returns the three-dimensional point that lies on the line segment between the points p1 and p2 and that is at a distance from the first point determined by the ratio r1/(r1 + r2).
 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(Point3D p2)
          Returns a three-dimensional vector that is the result of subtracting the point p2 from p1.
 Point3D subtract(Vector3D vector3D)
          Returns the three-dimensional point that is the result of subtracting the vector vector3D from this.
 java.lang.String toString()
          Returns a string representation of this object.
 Point3D transformQuaternion(Quaternion quaternion)
          Return a three-dimensional point 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

kNativeSize

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

Point3D

public Point3D()
Creates a Point3D object containing no data.

Point3D

public Point3D(float x,
               float y,
               float z)
Creates a Point3D object containing with given data.
Parameters:
x - The final x coordinate.
y - The final y coordinate.
z - The final z coordinate.
Method Detail

getEndianDescriptor

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

getX

public float getX()
returns the position in the X direction

getY

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

getZ

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

setX

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

setY

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

setZ

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

subtract

public Vector3D subtract(Point3D p2)
Returns a three-dimensional vector that is the result of subtracting the point p2 from p1.

QuickDraw3D::Q3Point3D_Subtract

Parameters:
p2 - A three-dimensional point
Returns:
a three-dimensional vector that is the result of subtracting the point p2 from p1.

distance

public float distance(Point3D p2)
Returns the absolute value of the distance between points this and p2.

QuickDraw3D::Q3Point3D_Distance

Parameters:
p2 - A three-dimensional point
Returns:
the distance

distanceSquared

public float distanceSquared(Point3D p2)
Returns the squared value of the distance between points this and p2.

QuickDraw3D::Q3Point3D_DistanceSquared

Parameters:
p2 - A three-dimensional point
Returns:
the distance

rRatio

public Point3D rRatio(Point3D p2,
                      float r1,
                      float r2)
Returns the three-dimensional point that lies on the line segment between the points p1 and p2 and that is at a distance from the first point determined by the ratio r1/(r1 + r2).

QuickDraw3D::Q3Point3D_RRatio

Parameters:
p2 - A three-dimensional point.
r1 - A floating-point number.
r2 - A floating-point number.
Returns:
a 3DPoint

add

public Point3D add(Vector3D vector3D)
Returns the three-dimensional point that is the result of adding the vector vector3D to this.

QuickDraw3D::Q3Point3D_Vector3D_Add

Parameters:
vector3D - A three-dimensional vector.
Returns:
a three-dimensional point

subtract

public Point3D subtract(Vector3D vector3D)
Returns the three-dimensional point that is the result of subtracting the vector vector3D from this.

QuickDraw3D::Q3Point3D_Vector3D_Subtract

Parameters:
vector3D - A three-dimensional vector.
Returns:
a three-dimensional point

cross

public Vector3D cross(Point3D point2,
                      Point3D point3)
Returns the cross product of the two vectors determined by subtracting point2 from this and point3 from this

QuickDraw3D::Q3Point3D_CrossProductTri

Parameters:
point2 - A three-dimensional point.
point3 - A three-dimensional point.
Returns:
a vector

transformQuaternion

public Point3D transformQuaternion(Quaternion quaternion)
Return a three-dimensional point that is the result of transforming the vector specified by the vector parameter using the quaternion specified by the quaternion parameter.

QuickDraw3D::Q3Point3D_TransformQuaternion

Parameters:
quaternion - A quaternion.
Returns:
a three-dimensional point

clone

public java.lang.Object clone()
Returns a copy of this object.

toString

public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class QTByteObject