Skip to content

SignedDistance

final class SignedDistance
Package: dev.joid.tool.msdf.geometry · Module: tool-msdf · Source: SignedDistance.java

A signed distance from a point to an edge, with its orthogonality to break ties.

ReturnsSignatureSummary
SignedDistance()Creates the farthest possible distance.

ReturnsSignatureSummary
voidreset()Goes back to the farthest possible distance, without edge.
voidset(double distance, double orthogonality, int side)Sets the distance, its orthogonality and the side of the edge.
voidcopy(SignedDistance other)Copies another distance, edge included.
booleancloserThan(SignedDistance other)If true, this distance is shorter in absolute value, or as short with a lower orthogonality.
intgetSide()Returns the side of the edge that the point is on.
doublegetDistance()Returns the signed distance.
doublegetOrthogonality()Returns the tie-breaker between two equal distances: the lower, the closer.
EdgegetEdge()Returns the edge of the distance, or null.
voidsetEdge(Edge edge)Sets the edge of the distance.

SignedDistance()

Creates the farthest possible distance.

void reset()

Goes back to the farthest possible distance, without edge.

void set(double distance, double orthogonality, int side)

Sets the distance, its orthogonality and the side of the edge.

void copy(SignedDistance other)

Copies another distance, edge included.

boolean closerThan(SignedDistance other)

If true, this distance is shorter in absolute value, or as short with a lower orthogonality.

int getSide()

Returns the side of the edge that the point is on.

double getDistance()

Returns the signed distance.

double getOrthogonality()

Returns the tie-breaker between two equal distances: the lower, the closer.

Edge getEdge()

Returns the edge of the distance, or null.

void setEdge(Edge edge)

Sets the edge of the distance.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page