forked from johnalexandergreene/Geom_Kisrhombille
-
Notifications
You must be signed in to change notification settings - Fork 0
/
KAnchor.java
52 lines (41 loc) · 1.14 KB
/
KAnchor.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
package org.fleen.geom_Kisrhombille;
import java.io.Serializable;
/*
* turns a metagon into a polygon
* these are the concrete params that fleshize the abstraction
* used for jigs
*/
public class KAnchor implements Serializable{
private static final long serialVersionUID=-5677563038771003335L;
/*
* ################################
* CONSTRUCTOR
* ################################
*/
public KAnchor(KPoint v0,KPoint v1,boolean twist){
this.v0=v0;
this.v1=v1;
this.twist=twist;}
//
// public KAnchor(KAnchor anchor){
// this.v0=new KVertex(anchor.v0);
// this.v1=new KVertex(anchor.v1);
// this.twist=anchor.twist;}
/*
* ################################
* GEOMETRY
* ################################
*/
public KPoint v0,v1;
public boolean twist;
/*
* ################################
* OBJECT
* ################################
*/
public boolean equals(Object a){
KAnchor b=(KAnchor)a;
return b.v0.equals(v0)&&b.v1.equals(v1)&&b.twist==twist;}
public String toString(){
return "["+getClass().getSimpleName()+" v0="+v0+" v1="+v1+" twist="+twist+"]";}
}