Initial commit for historical purposes

This commit is contained in:
2025-05-02 00:29:08 -04:00
commit a1899a52b7
64 changed files with 7754 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
package com.aaaaahhhhhhh.bananapuncher714.tess4j;
public class Vertex {
private HalfWing wing;
private Vector2d position;
public Vertex( HalfWing wing ) {
setWing( wing );
setPosition( new Vector2d() );
}
public HalfWing getWing() {
return wing;
}
public Vertex setWing( HalfWing wing ) {
this.wing = wing;
return this;
}
public Vector2d getPosition() {
return position;
}
public Vertex setPosition( Vector2d vec ) {
this.position = vec;
return this;
}
public void update() {
HalfWing wing = this.wing;
do {
wing.setOrigin( this );
} while ( ( wing = wing.getPrev() ) != this.wing );
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((position == null) ? 0 : position.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Vertex other = (Vertex) obj;
if (position == null) {
if (other.position != null)
return false;
} else if (!position.equals(other.position))
return false;
return true;
}
@Override
public String toString() {
return "Vertex{x=" + position.getX() + ",y=" + position.getY() + "}";
}
}