uk.ac.ed.computational_geometry.algorithm.mesh_optimisation
Class Mesh

java.lang.Object
  extended by uk.ac.ed.computational_geometry.algorithm.mesh_optimisation.Mesh

public class Mesh
extends Object

User: nix Date: 11-Aug-2005 Time: 15:10:23 To change this template use Options | File Templates.


Nested Class Summary
static class Mesh.CycleOfTriangles
           
static class Mesh.Triangle
           
static class Mesh.Vertex
           
 
Field Summary
static double DEFAULT_DISTANCE_TO_AVERAGE_PLANE
           
static double DEFAULT_DISTANCE_TO_EDGE
           
static double DEFAULT_FEATURE_ANGLE
           
protected static double distance_to_average_plane
           
protected static double distance_to_edge
           
static double EPSILON
           
protected static double feature_angle
           
static double MINIMUM_ASPECT_RATIO
           
 Hashtable<javax.vecmath.Point3d,Mesh.Vertex> point_to_vertex_map
           
 Hashtable<String,Mesh.Triangle> vertexes_to_triangle_map
           
 
Constructor Summary
Mesh()
           
 
Method Summary
 Mesh.Triangle addTriangle(javax.vecmath.Point3d point1, javax.vecmath.Point3d point2, javax.vecmath.Point3d point3)
           
protected  Mesh.Vertex addVertex(javax.vecmath.Point3d point)
           
 boolean canDecimate(Mesh.Vertex vertex, List<Mesh.Triangle> new_triangles)
           
 boolean decimate(Mesh.Vertex vertex)
           
 boolean decimate(Mesh.Vertex vertex, List<Mesh.Triangle> new_triangles)
           
protected  double getAspectRatio(Plane3d split_pane, LineSegment3d split_line, List<Mesh.Vertex> loop, Plane3d average_plane)
           
 double getDistanceToAveragePlane()
           
 double getDistanceToEdge()
           
 double getFeatureAngle()
           
 int getNumberOfVertexes()
           
 List<javax.vecmath.Point3d> getPoints()
           
protected  List<LineSegment3d> getSplitLines(List<Mesh.Vertex> loop)
           
protected  Mesh.Triangle getTriangle(Mesh.Vertex vertex1, Mesh.Vertex vertex2, Mesh.Vertex vertex3)
           
 Collection<Mesh.Triangle> getTriangles()
           
protected  Mesh.Vertex getVertex(javax.vecmath.Point3d point)
           
protected  String getVertexesId(Mesh.Vertex vertex1, Mesh.Vertex vertex2, Mesh.Vertex vertex3)
           
protected  boolean isValidSplitPlane(Plane3d split_pane, LineSegment3d split_line, List<Mesh.Vertex> loop1, List<Mesh.Vertex> loop2)
           
protected  Mesh.Triangle newTriangle(Mesh.Vertex vertex1, Mesh.Vertex vertex2, Mesh.Vertex vertex3)
           
protected  Mesh.Vertex newVertex(javax.vecmath.Point3d point)
           
 void setDistanceToAveragePlane(double distance_to_average_plane)
           
 void setDistanceToEdge(double distance_to_edge)
           
 void setFeatureAngle(double feature_angle)
           
 boolean shouldDecimate(Mesh.Vertex vertex)
           
protected  void splitLoop(List<Mesh.Vertex> loop, LineSegment3d split_line, List<Mesh.Vertex> new_loop1, List<Mesh.Vertex> new_loop2)
           
protected  boolean triangulate(List<Mesh.Vertex> loop, Plane3d average_plane, List<Mesh.Triangle> new_triangles)
           
protected  boolean triangulateCycle(Mesh.CycleOfTriangles cycle, List<Mesh.Triangle> new_triangles)
           
protected  boolean triangulateWithInteriorEdge(List<Mesh.Vertex> loop, LineSegment3d interior_edge, Plane3d average_plane, List<Mesh.Triangle> new_triangles)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FEATURE_ANGLE

public static double DEFAULT_FEATURE_ANGLE

DEFAULT_DISTANCE_TO_AVERAGE_PLANE

public static double DEFAULT_DISTANCE_TO_AVERAGE_PLANE

DEFAULT_DISTANCE_TO_EDGE

public static double DEFAULT_DISTANCE_TO_EDGE

MINIMUM_ASPECT_RATIO

public static double MINIMUM_ASPECT_RATIO

EPSILON

public static double EPSILON

feature_angle

protected static double feature_angle

distance_to_average_plane

protected static double distance_to_average_plane

distance_to_edge

protected static double distance_to_edge

vertexes_to_triangle_map

public Hashtable<String,Mesh.Triangle> vertexes_to_triangle_map

point_to_vertex_map

public Hashtable<javax.vecmath.Point3d,Mesh.Vertex> point_to_vertex_map
Constructor Detail

Mesh

public Mesh()
Method Detail

getFeatureAngle

public double getFeatureAngle()

setFeatureAngle

public void setFeatureAngle(double feature_angle)

getDistanceToAveragePlane

public double getDistanceToAveragePlane()

setDistanceToAveragePlane

public void setDistanceToAveragePlane(double distance_to_average_plane)

getDistanceToEdge

public double getDistanceToEdge()

setDistanceToEdge

public void setDistanceToEdge(double distance_to_edge)

addTriangle

public Mesh.Triangle addTriangle(javax.vecmath.Point3d point1,
                                 javax.vecmath.Point3d point2,
                                 javax.vecmath.Point3d point3)

addVertex

protected Mesh.Vertex addVertex(javax.vecmath.Point3d point)

getPoints

public List<javax.vecmath.Point3d> getPoints()

getTriangles

public Collection<Mesh.Triangle> getTriangles()

getNumberOfVertexes

public int getNumberOfVertexes()

shouldDecimate

public boolean shouldDecimate(Mesh.Vertex vertex)

canDecimate

public boolean canDecimate(Mesh.Vertex vertex,
                           List<Mesh.Triangle> new_triangles)

decimate

public boolean decimate(Mesh.Vertex vertex)

decimate

public boolean decimate(Mesh.Vertex vertex,
                        List<Mesh.Triangle> new_triangles)

triangulateCycle

protected boolean triangulateCycle(Mesh.CycleOfTriangles cycle,
                                   List<Mesh.Triangle> new_triangles)

triangulateWithInteriorEdge

protected boolean triangulateWithInteriorEdge(List<Mesh.Vertex> loop,
                                              LineSegment3d interior_edge,
                                              Plane3d average_plane,
                                              List<Mesh.Triangle> new_triangles)

triangulate

protected boolean triangulate(List<Mesh.Vertex> loop,
                              Plane3d average_plane,
                              List<Mesh.Triangle> new_triangles)

getSplitLines

protected List<LineSegment3d> getSplitLines(List<Mesh.Vertex> loop)

getAspectRatio

protected double getAspectRatio(Plane3d split_pane,
                                LineSegment3d split_line,
                                List<Mesh.Vertex> loop,
                                Plane3d average_plane)

splitLoop

protected void splitLoop(List<Mesh.Vertex> loop,
                         LineSegment3d split_line,
                         List<Mesh.Vertex> new_loop1,
                         List<Mesh.Vertex> new_loop2)

isValidSplitPlane

protected boolean isValidSplitPlane(Plane3d split_pane,
                                    LineSegment3d split_line,
                                    List<Mesh.Vertex> loop1,
                                    List<Mesh.Vertex> loop2)

newVertex

protected Mesh.Vertex newVertex(javax.vecmath.Point3d point)

getVertex

protected Mesh.Vertex getVertex(javax.vecmath.Point3d point)

newTriangle

protected Mesh.Triangle newTriangle(Mesh.Vertex vertex1,
                                    Mesh.Vertex vertex2,
                                    Mesh.Vertex vertex3)

getTriangle

protected Mesh.Triangle getTriangle(Mesh.Vertex vertex1,
                                    Mesh.Vertex vertex2,
                                    Mesh.Vertex vertex3)

getVertexesId

protected String getVertexesId(Mesh.Vertex vertex1,
                               Mesh.Vertex vertex2,
                               Mesh.Vertex vertex3)