00001 package commandline.ImageStuff.GeometricObjects.Impl;
00002
00003 import commandline.ImageStuff.Image;
00004 import commandline.ImageStuff.Loc;
00005 import commandline.ImageStuff.GeometricObjects.Triangle;
00006 import commandline.ImageStuff.GeometricObjects.factories.EdgeConstructorTriangleMakerFactory;
00007 import commandline.ImageStuff.Topology.AbstractTesselation;
00008 import commandline.ImageStuff.Topology.ConnectieCriterium;
00009 import commandline.ImageStuff.Topology.TriangleTesselationSet;
00010 import commandline.NormalMeshAlgorithm.Configuration;
00011 import commandline.NormalMeshAlgorithm.SnijPixelStrategy;
00012
00013
00014
00015
00016 public class MeanTriangleImpl extends DefaultTriangleImpl {
00017
00018 private float mean;
00019
00020 public MeanTriangleImpl(Triangle triangle){
00021 super(triangle);
00022 }
00023
00024 public TriangleImplType getTriangleImplementationType(){
00025 return TriangleImplType.MEAN;
00026 }
00027
00028
00029
00033 protected void init(){
00034 float total=0;
00035 for (Loc loc : triangle.getLocs()) {
00036 total+=Image.getInstance().getPuntOpEnty(loc).getZ();
00037 }
00038 mean=total/triangle.getLocs().size();
00039
00040 }
00041
00042 public float getFunctiewaardeOn(Loc loc) {
00043 return mean;
00044 }
00045
00046 }