00001 package commandline.CodingUtils; 00002 00003 import java.util.ArrayList; 00004 00005 import commandline.ImageStuff.GeometricObjects.GenericEdge; 00006 import commandline.debuggingCode.Debug; 00007 00008 00009 00010 public class DataStructure extends CommitDataStructure{ 00011 00012 00013 private CodedFile tesselationFile; 00014 private ArrayList<GenericEdge> parentCommitOrderedList; 00015 00016 public DataStructure(CodedFile tesselationFile) { 00017 this.tesselationFile=tesselationFile; 00018 parentCommitOrderedList=new ArrayList<GenericEdge>(); 00019 00020 // TODO Auto-generated constructor stub 00021 } 00022 00027 public void storeParent(GenericEdge parentEdge){ 00028 this.parentCommitOrderedList.add(parentEdge); 00029 } 00030 00031 00032 public CodedFile getTesselationFile(){ 00033 return this.tesselationFile; 00034 } 00035 00036 public ArrayList<GenericEdge> getParentCommitOrderedList() { 00037 return parentCommitOrderedList; 00038 } 00039 00040 public StringBuffer getPrintMeta(){ 00041 StringBuffer buffer= super.getPrintMeta(); 00042 buffer.append("# normalOffsets = " + parentCommitOrderedList.size()+"\n"); 00043 if(Debug.VERBOSE) { 00044 int nbr_of_non_zero_normals=0; 00045 int nbr_of_non_zero_verticals=0; 00046 for (GenericEdge parent : parentCommitOrderedList) { 00047 if(parent.getNormalOffset()!=0){nbr_of_non_zero_normals++;} 00048 if(parent.getVerticalOffset()!=0){nbr_of_non_zero_verticals++;} 00049 } 00050 buffer.append("# normal offsets!=0 =" + nbr_of_non_zero_normals +"\n"); 00051 buffer.append("# vertical offsets!=0 =" + nbr_of_non_zero_verticals+"\n"); 00052 } 00053 return buffer; 00054 } 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 }
1.5.5