edu.jhu.ece.iacl.jist.structures.geom
Class PT

java.lang.Object
  extended by Point3f
      extended by edu.jhu.ece.iacl.jist.structures.geom.PT
Direct Known Subclasses:
cPT, XYZ

public class PT
extends Point3f

Created by IntelliJ IDEA. User: bennett Date: Nov 20, 2005 Time: 9:21:15 AM To change this template use Options | File Templates. ************************************ Magnetic Resonance in Medicine Final Project Released: December 1, 2005 class PT Represent a 3-tuple. For use as a point, vector, etc. Copyright (C) 2005 Bennett Landman, bennett@bme.jhu.edu


Constructor Summary
PT()
          Instantiates a new pT.
PT(double x0, double y0, double z0)
          Instantiates a new pT.
PT(float x0, float y0, float z0)
          Instantiates a new pT.
 
Method Summary
 PT cross(PT b)
          Cross.
 float dot(PT b)
          Dot.
 boolean equals(PT pt)
          Equals.
 double length()
          Length.
 PT minus(PT b)
          Minus.
 PT plus(PT b)
          Plus.
 PT times(float t)
          Times.
 java.lang.String toString()
           
 PT vectorProject(PT p)
          Project this point onto the input point Computes [dot(this,pt)/(length(pt)^2)]pt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PT

public PT()
Instantiates a new pT.


PT

public PT(float x0,
          float y0,
          float z0)
Instantiates a new pT.

Parameters:
x0 - the x0
y0 - the y0
z0 - the z0

PT

public PT(double x0,
          double y0,
          double z0)
Instantiates a new pT.

Parameters:
x0 - the x0
y0 - the y0
z0 - the z0
Method Detail

toString

public java.lang.String toString()

equals

public boolean equals(PT pt)
Equals.

Parameters:
pt - the pt
Returns:
true, if successful

minus

public PT minus(PT b)
Minus.

Parameters:
b - the b
Returns:
the pT

plus

public PT plus(PT b)
Plus.

Parameters:
b - the b
Returns:
the pT

cross

public PT cross(PT b)
Cross.

Parameters:
b - the b
Returns:
the pT

times

public PT times(float t)
Times.

Parameters:
t - the t
Returns:
the pT

dot

public float dot(PT b)
Dot.

Parameters:
b - the b
Returns:
the float

length

public double length()
Length.

Returns:
the double

vectorProject

public PT vectorProject(PT p)
Project this point onto the input point Computes [dot(this,pt)/(length(pt)^2)]pt.

Parameters:
p - The point to be projected onto
Returns:
The vector resulting from this projection