Package mgui.morph.sections
Class ConstrainedRadialRepresentation
java.lang.Object
mgui.morph.sections.RadialRepresentation
mgui.morph.sections.ConstrainedRadialRepresentation
public class ConstrainedRadialRepresentation extends RadialRepresentation
-
Field Summary
Fields Modifier and Type Field Description java.util.ArrayList<mgui.morph.sections.ConstrainedRadialRepresentation.ControlNode>
controlNodes
java.util.ArrayList<Radius2D>
controlRadialNodes
Fields inherited from class mgui.morph.sections.RadialRepresentation
P1, RadialNodes, source
-
Constructor Summary
Constructors Constructor Description ConstrainedRadialRepresentation()
ConstrainedRadialRepresentation(Polygon2D thisPoly)
-
Method Summary
Modifier and Type Method Description void
addControlNode(int node, double angle)
Sets a control node, such that the node is assigned the given angle, and any nodes between this point and the next control point clockwise are adjusted so that their radii fit between them, but maintain their proportionality.java.util.ArrayList<Radius2D>
getRadialNodesCopy()
void
updateRepresentation()
Methods inherited from class mgui.morph.sections.RadialRepresentation
getMaxLength, getNodeIndex, printRep, SetRepresentation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
controlNodes
public java.util.ArrayList<mgui.morph.sections.ConstrainedRadialRepresentation.ControlNode> controlNodes -
controlRadialNodes
-
-
Constructor Details
-
ConstrainedRadialRepresentation
public ConstrainedRadialRepresentation() -
ConstrainedRadialRepresentation
-
-
Method Details
-
addControlNode
public void addControlNode(int node, double angle)Sets a control node, such that the node is assigned the given angle, and any nodes between this point and the next control point clockwise are adjusted so that their radii fit between them, but maintain their proportionality. If only one control point is specified, all radii are simply rotated to fit control node's radius. This function is useful in cases where it is desirable to force a mapping between particular nodes (e.g., known corner points), which will be certain to map since their angles are identical.- Parameters:
node
- Node to assign as a control nodeangle
- Angle to assign to this node
-
updateRepresentation
public void updateRepresentation() -
getRadialNodesCopy
-