-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShapeInterface.java
86 lines (43 loc) · 2.29 KB
/
ShapeInterface.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// THE DEFAULT IS JUST ADDED SO THAT YOU CAN BUILD YOUR IMPLEMENTATION INCREMENTALLY.
public interface ShapeInterface
{
//INPUT [x1,y1,z1,x2,y2,z2,x3,y3,z3]
default public boolean ADD_TRIANGLE(float [] triangle_coord){return false;}
//
default public int TYPE_MESH(){return -1;}
//
default public EdgeInterface [] BOUNDARY_EDGES(){return null;}
//
default public int COUNT_CONNECTED_COMPONENTS(){return 0;}
//INPUT [x1,y1,z1,x2,y2,z2,x3,y3,z3]
default public TriangleInterface [] NEIGHBORS_OF_TRIANGLE(float [] triangle_coord){return null;}
//INPUT [x1,y1,z1,x2,y2,z2,x3,y3,z3]
default public EdgeInterface [] EDGE_NEIGHBOR_TRIANGLE(float [] triangle_coord){return null;}
//INPUT [x1,y1,z1,x2,y2,z2,x3,y3,z3]
default public PointInterface [] VERTEX_NEIGHBOR_TRIANGLE(float [] triangle_coord){return null;}
//INPUT [x1,y1,z1,x2,y2,z2,x3,y3,z3]
default public TriangleInterface [] EXTENDED_NEIGHBOR_TRIANGLE(float [] triangle_coord){return null;}
//INPUT [x,y,z]
default public TriangleInterface [] INCIDENT_TRIANGLES(float [] point_coordinates){return null;}
// INPUT [x,y,z]
default public PointInterface [] NEIGHBORS_OF_POINT(float [] point_coordinates){return null;}
// INPUT[x,y,z]
default public EdgeInterface [] EDGE_NEIGHBORS_OF_POINT(float [] point_coordinates){return null;}
// INPUT[x,y,z]
default public TriangleInterface [] FACE_NEIGHBORS_OF_POINT(float [] point_coordinates){ return null;}
// INPUT // [xa1,ya1,za1,xa2,ya2,za2,xa3,ya3,za3 , xb1,yb1,zb1,xb2,yb2,zb2,xb3,yb3,zb3] where xa1,ya1,za1,xa2,ya2,za2,xa3,ya3,za3 are 3 coordinates of first triangle and xb1,yb1,zb1,xb2,yb2,zb2,xb3,yb3,zb3 are coordinates of second triangle as given in specificaition.
default public boolean IS_CONNECTED(float [] triangle_coord_1, float [] triangle_coord_2){return false;}
// INPUT [x1,y1,z1,x2,y2,z2] // where (x1,y1,z1) refers to first end point of edge and (x2,y2,z2) refers to the second.
default public TriangleInterface [] TRIANGLE_NEIGHBOR_OF_EDGE(float [] edge_coordinates){ return null;}
default public int MAXIMUM_DIAMETER(){return 0;}
default public PointInterface [] CENTROID (){
return null;
}
// INPUT [x,y,z]
default public PointInterface CENTROID_OF_COMPONENT (float [] point_coordinates){
return null;
}
default public PointInterface [] CLOSEST_COMPONENTS(){
return null;
}
}