| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFacemorph.oesf.Template3D
public class Template3D
Stores a 3D set of points and connecting edges.
| Constructor Summary | |
|---|---|
Template3D()
Construct an empty Template3D  | 
|
| Method Summary | |
|---|---|
 void | 
copy(Template3D t3d)
Copies the given template into this  | 
 boolean | 
fitTo2DOrtho(Template template,
             int width,
             int height,
             Vector3 centre,
             BigMat R,
             double[] T,
             double[] scale)
 | 
 boolean | 
getActive(int i)
 | 
 int | 
getActiveCount()
Gets the number of points in this Template3D  | 
 java.util.ArrayList<java.lang.Boolean> | 
getActiveFlags()
Gets this template3D's list of Active Points  | 
 Vector3 | 
getCentre()
Returns the centre of mass of this Template3D  | 
 Vector3 | 
getCentre(java.util.ArrayList<java.lang.Boolean> active2)
Returns the centre of mass of this Template3D  | 
 java.util.ArrayList<Vector3> | 
getCoords()
Gets this template3D's list of Points  | 
 int | 
getCount()
Gets the number of points in this Template3D  | 
 double | 
getMeanRadius(Vector3 centre)
Finds the average distance from the point given  | 
 double | 
getMeanRadius(Vector3 centre,
              java.util.ArrayList<java.lang.Boolean> active2)
Finds the average distance from the point given  | 
 double | 
getMeanRadiusSquared(Vector3 centre)
Finds the average distance from the point given  | 
 double | 
getMeanRadiusSquared(Vector3 centre,
                     java.util.ArrayList<java.lang.Boolean> active2)
Finds the average distance from the point given  | 
 Vector3 | 
getPoint(int i)
Retrieve a specific point in this Template3D  | 
 void | 
readTemplate(java.lang.String filename)
Reads a Template from the file specified  | 
 void | 
saveTemplate(java.lang.String objfilename)
Writes the template to file  | 
 void | 
setActive(int i,
          boolean b)
Set a specific point in this Template3D as Active  | 
 void | 
setPoint(int i,
         Vector3 p)
Retrieve a specific point in this Template3D  | 
 void | 
subtract(Template3D t3d)
 | 
 void | 
transform(BigMat R,
          double[] T,
          double scale)
 | 
 void | 
unvectorise(double[] vec)
 | 
 double[] | 
vectorise()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Template3D()
| Method Detail | 
|---|
public void readTemplate(java.lang.String filename)
                  throws java.io.FileNotFoundException,
                         java.io.IOException
filename - The name of the file to read
java.io.FileNotFoundException - if the file name is not valid
java.io.IOException - If there is some other I/ problem
public void saveTemplate(java.lang.String objfilename)
                  throws java.io.IOException
objfilename - The name of the output file to write to.
java.io.IOException - If there is a problem writing the filepublic int getCount()
public int getActiveCount()
public java.util.ArrayList<Vector3> getCoords()
public java.util.ArrayList<java.lang.Boolean> getActiveFlags()
public boolean getActive(int i)
public Vector3 getPoint(int i)
i - The index of the point in the coords list
public void setPoint(int i,
                     Vector3 p)
i - The index of the point in the coords list
public void setActive(int i,
                      boolean b)
i - The index of the point in the coords listpublic void copy(Template3D t3d)
t3d - The template to copypublic Vector3 getCentre()
public Vector3 getCentre(java.util.ArrayList<java.lang.Boolean> active2)
public double getMeanRadiusSquared(Vector3 centre)
centre - A point to measure the radius from
public double getMeanRadius(Vector3 centre)
centre - A point to measure the radius from
public double getMeanRadius(Vector3 centre,
                            java.util.ArrayList<java.lang.Boolean> active2)
centre - A point to measure the radius fromactive2 - the list of active flags for the target template
public double getMeanRadiusSquared(Vector3 centre,
                                   java.util.ArrayList<java.lang.Boolean> active2)
centre - A point to measure the radius fromactive2 - the list of active flags for the target template
public void transform(BigMat R,
                      double[] T,
                      double scale)
public void subtract(Template3D t3d)
public boolean fitTo2DOrtho(Template template,
                            int width,
                            int height,
                            Vector3 centre,
                            BigMat R,
                            double[] T,
                            double[] scale)
public double[] vectorise()
public void unvectorise(double[] vec)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||