Features class
class Features { /** The edge that defines the outward contact normal. */ int referenceEdge; /** The edge most anti-parallel to the reference edge. */ int incidentEdge; /** The vertex (0 or 1) on the incident edge that was clipped. */ int incidentVertex; /** A value of 1 indicates that the reference edge is on shape2. */ int flip; /** * Constructs a new features with zero values for all fields. */ Features() : referenceEdge = 0, incidentEdge = 0, incidentVertex = 0, flip = 0 { } // Constructs a new Features that is a copy of the given features. Features.copy(Features f) : referenceEdge = f.referenceEdge, incidentEdge = f.incidentEdge, incidentVertex = f.incidentVertex, flip = f.flip { } // Set this feature to be a copy of the given feature. void setFrom(Features f) { referenceEdge = f.referenceEdge; incidentEdge = f.incidentEdge; incidentVertex = f.incidentVertex; flip = f.flip; } /** * Returns true if this Features object is equal to the given object. */ bool operator ==(other) => referenceEdge == other.referenceEdge && incidentEdge == other.incidentEdge && incidentVertex == other.incidentVertex && flip == other.flip; /** * Returns a String representation of this Features. */ String toString() { return "Features: ($flip, $incidentEdge, $incidentVertex $referenceEdge)"; } /** * Sets all features to 0. */ zero() { referenceEdge = 0; incidentEdge = 0; incidentVertex = 0; flip = 0; } }
Constructors
new Features() #
Constructs a new features with zero values for all fields.
Features() : referenceEdge = 0, incidentEdge = 0, incidentVertex = 0, flip = 0 { }
Properties
int flip #
flip
int incidentEdge #
incidentEdge
int incidentVertex #
incidentVertex
int referenceEdge #
referenceEdge
Operators
bool operator ==(other) #
Returns true if this Features object is equal to the given object.
bool operator ==(other) => referenceEdge == other.referenceEdge && incidentEdge == other.incidentEdge && incidentVertex == other.incidentVertex && flip == other.flip;
Methods
void setFrom(Features f) #
void setFrom(Features f) { referenceEdge = f.referenceEdge; incidentEdge = f.incidentEdge; incidentVertex = f.incidentVertex; flip = f.flip; }
String toString() #
Returns a String representation of this Features.
String toString() { return "Features: ($flip, $incidentEdge, $incidentVertex $referenceEdge)"; }
zero() #
Sets all features to 0.
zero() { referenceEdge = 0; incidentEdge = 0; incidentVertex = 0; flip = 0; }