Interface ConnectorSkeleton


public interface ConnectorSkeleton
Class used by DefaultCamera, implementation in gs-ui-... Skeleton for edges. Data stored on the edge to retrieve the edge basic geometry and various shared data between parts of the renderer. XXX TODO This part needs much work. The skeleton geometry of an edge can be various things: - An automatically computed shape (for multi-graphs and loop edges). - An user specified shape: - A polyline (points are in absolute coordinates). - A polycurve (in absolute coordinates). - A vector representation (points are relative to an origin and the whole may be rotated).
  • Method Summary

    Modifier and Type Method Description
    Point3 apply​(int i)
    The i-th point of the edge shape.
    Point3 from()
    The first point of the edge shape.
    boolean isCurve()
    If true the edge shape is a loop defined by four points.
    boolean isLoop()
    This is only set when the edge is a curve, if true the starting and ending nodes of the edge are the same node.
    boolean isMulti()  
    boolean isPoly()
    If true the edge shape is a polyline made of size points.
    String kindString()  
    double length()
    Total length of the polyline defined by the points.
    int multi()
    If larger than one there are several edges between the two nodes of this edge.
    Point3 pointOnShape​(double percent)
    Compute a point at the given percent on the shape and return it.
    Point3 pointOnShape​(double percent, Point3 target)
    Compute a point at a given percent on the shape and store it in the target, also returning it.
    Point3 pointOnShapeAndPerpendicular​(double percent, double perpendicular)
    Compute a point at a given percent on the shape and push it from the shape perpendicular to it at a given distance in GU.
    Point3 pointOnShapeAndPerpendicular​(double percent, double perpendicular, Point3 target)
    Compute a point at a given percent on the shape and push it from the shape perpendicular to it at a given distance in GU.
    double segmentLength​(int i)
    Length of the i-th segment.
    double[] segmentsLengths()
    Compute the length of each segment between the points making up this edge.
    void setCurve​(double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)  
    void setLine​(double x0, double y0, double z0, double x1, double y1, double z1)  
    void setLoop​(double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2)  
    void setMulti​(int aMulti)  
    void setPoly​(Object aSetOfPoints)  
    void setPoly​(Point3[] aSetOfPoints)  
    int size()
    The number of points in the edge shape.
    Point3 to()
    The last point of the edge shape.
    void update​(int i, Point3 p)
    Change the i-th point in the set of points making up the shape of this edge.
  • Method Details

    • kindString

      String kindString()
    • isPoly

      boolean isPoly()
      If true the edge shape is a polyline made of size points.
    • isCurve

      boolean isCurve()
      If true the edge shape is a loop defined by four points.
    • multi

      int multi()
      If larger than one there are several edges between the two nodes of this edge.
    • isLoop

      boolean isLoop()
      This is only set when the edge is a curve, if true the starting and ending nodes of the edge are the same node.
    • setPoly

      void setPoly​(Object aSetOfPoints)
    • setPoly

      void setPoly​(Point3[] aSetOfPoints)
    • setCurve

      void setCurve​(double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3)
    • setLine

      void setLine​(double x0, double y0, double z0, double x1, double y1, double z1)
    • setMulti

      void setMulti​(int aMulti)
    • isMulti

      boolean isMulti()
    • setLoop

      void setLoop​(double x0, double y0, double z0, double x1, double y1, double z1, double x2, double y2, double z2)
    • size

      int size()
      The number of points in the edge shape.
    • apply

      Point3 apply​(int i)
      The i-th point of the edge shape.
    • update

      void update​(int i, Point3 p)
      Change the i-th point in the set of points making up the shape of this edge.
    • to

      Point3 to()
      The last point of the edge shape.
    • from

      Point3 from()
      The first point of the edge shape.
    • length

      double length()
      Total length of the polyline defined by the points.
    • segmentsLengths

      double[] segmentsLengths()
      Compute the length of each segment between the points making up this edge. This is mostly only useful for polylines. The results of this method is cached. It is only recomputed when a points changes in the shape. There are size-1 segments if the are size points. The segment 0 is between points 0 and 1.
    • segmentLength

      double segmentLength​(int i)
      Length of the i-th segment. There are size-1 segments if there are size points. The segment 0 is between points 0 and 1.
    • pointOnShape

      Point3 pointOnShape​(double percent)
      Compute a point at the given percent on the shape and return it. The percent must be a number between 0 and 1.
    • pointOnShape

      Point3 pointOnShape​(double percent, Point3 target)
      Compute a point at a given percent on the shape and store it in the target, also returning it. The percent must be a number between 0 and 1.
    • pointOnShapeAndPerpendicular

      Point3 pointOnShapeAndPerpendicular​(double percent, double perpendicular)
      Compute a point at a given percent on the shape and push it from the shape perpendicular to it at a given distance in GU. The percent must be a number between 0 and 1. The resulting points is returned.
    • pointOnShapeAndPerpendicular

      Point3 pointOnShapeAndPerpendicular​(double percent, double perpendicular, Point3 target)
      Compute a point at a given percent on the shape and push it from the shape perpendicular to it at a given distance in GU. The percent must be a number between 0 and 1. The result is stored in target and also returned.