mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-31 21:05:01 +01:00
26 lines
No EOL
421 B
JavaScript
26 lines
No EOL
421 B
JavaScript
|
|
export class Edge {
|
|
|
|
constructor(curve) {
|
|
this.curve = curve;
|
|
this.halfEdge1 = null;
|
|
this.halfEdge2 = null;
|
|
}
|
|
}
|
|
|
|
export class HalfEdge {
|
|
|
|
constructor() {
|
|
this.edge = null;
|
|
this.vertexA = null;
|
|
this.vertexB = null;
|
|
this.loop = null;
|
|
this.next = null;
|
|
this.prev = null;
|
|
}
|
|
|
|
twin() {
|
|
return this.edge.halfEdge1 == this ? this.edge.halfEdge2 : this.edge.halfEdge1;
|
|
}
|
|
|
|
} |