class HalfEdge extends AnyRef
- Alphabetic
- By Inheritance
- HalfEdge
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new HalfEdge(origI: Coordinate)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compareAngularDirection(e: HalfEdge): Int
Implements the total order relation:
Implements the total order relation:
The angle of edge a is greater than the angle of edge b, where the angle of an edge is the angle made by the first segment of the edge with the positive x-axis
When applied to a list of edges originating at the same point, this produces a CCW ordering of the edges around the point.
Using the obvious algorithm of computing the angle is not robust, since the angle calculation is susceptible to roundoff error. A robust algorithm is:
- First, compare the quadrants the edge vectors lie in. If the quadrants are different, it is trivial to determine which edge has a greater angle.
- if the vectors lie in the same quadrant, the {link Orientation#index(Coordinate, Coordinate, Coordinate)} function can be used to determine the relative orientation of the vectors.
- def compareTo(obj: Any): Int
Compares edges which originate at the same vertex based on the angle they make at their origin vertex with the positive X-axis.
Compares edges which originate at the same vertex based on the angle they make at their origin vertex with the positive X-axis. This allows sorting edges around their origin vertex in CCW order.
- def degree: Int
Computes the degree of the origin vertex.
Computes the degree of the origin vertex. The degree is the number of edges originating from the vertex.
return the degree of the origin vertex
- def dest: Coordinate
Gets the destination coordinate of this edge.
Gets the destination coordinate of this edge.
return the destination coordinate
- def directionPt: Coordinate
Gets the direction point of this edge.
Gets the direction point of this edge. In the base case this is the dest coordinate of the edge. Subclasses may override to allow a HalfEdge to represent an edge with more than two coordinates.
return the direction point for the edge
- Attributes
- protected
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(p0: Coordinate, p1: Coordinate): Boolean
Tests whether this edge has the given orig and dest vertices.
Tests whether this edge has the given orig and dest vertices.
- p0
the origin vertex to test
- p1
the destination vertex to test return true if the vertices are equal to the ones of this edge
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(dest: Coordinate): HalfEdge
Finds the edge starting at the origin of this edge with the given dest vertex, if any.
Finds the edge starting at the origin of this edge with the given dest vertex, if any.
- dest
the dest vertex to search for return the edge with the required dest vertex, if it exists, or null
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def insert(eAdd: HalfEdge): Unit
Inserts an edge into the ring of edges around the origin vertex of this edge, ensuring that the edges remain ordered CCW.
Inserts an edge into the ring of edges around the origin vertex of this edge, ensuring that the edges remain ordered CCW. The inserted edge must have the same origin as this edge.
- eAdd
the edge to insert
- def isEdgesSorted: Boolean
Tests whether the edges around the origin are sorted correctly.
Tests whether the edges around the origin are sorted correctly. Note that edges must be strictly increasing, which implies no two edges can have the same direction point.
return true if the origin edges are sorted correctly
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def link(sym: HalfEdge): Unit
Links this edge with its sym (opposite) edge.
Links this edge with its sym (opposite) edge. This must be done for each pair of edges created.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def next: HalfEdge
Gets the next edge CCW around the destination vertex of this edge, with the dest vertex as its origin.
Gets the next edge CCW around the destination vertex of this edge, with the dest vertex as its origin. If the vertex has degree 1 then this is the sym edge.
return the next edge
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def oNext: HalfEdge
Gets the next edge CCW around the origin of this edge, with the same origin.
Gets the next edge CCW around the origin of this edge, with the same origin.
return the next edge around the origin
- def orig: Coordinate
Gets the origin coordinate of this edge.
Gets the origin coordinate of this edge.
return the origin coordinate
- var origI: Coordinate
- def prev: HalfEdge
Gets the edge previous to this one (with dest being the same as this orig).
Gets the edge previous to this one (with dest being the same as this orig).
return the previous edge to this one
- def prevNode: HalfEdge
Finds the first node previous to this edge, if any.
Finds the first node previous to this edge, if any. If no such node exists (i.e. the edge is part of a ring) then null is returned.
return an edge originating at the node prior to this edge, if any, or null if no node exists
- def setNext(e: HalfEdge): Unit
Sets the next edge CCW around the destination vertex of this edge.
Sets the next edge CCW around the destination vertex of this edge.
- e
the next edge
- def sym: HalfEdge
Gets the symmetric pair edge of this edge.
Gets the symmetric pair edge of this edge.
return the symmetric pair edge
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
Computes a string representation of a HalfEdge.
Computes a string representation of a HalfEdge.
return a string representation
- Definition Classes
- HalfEdge → AnyRef → Any
- def toStringNode: String
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()