igeo.io

## Class IAIExporter

- java.lang.Object
- - igeo.io.IAIExporter

-     public class IAIExporter
      extends java.lang.Object

  Adobe Illustrator file exporter
  Author:
    Satoru Sugihara

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `IAIExporter.CapType`
    `static class` | `IAIExporter.IFaceViewSort`
    `static class` | `IAIExporter.IViewSort`
    `static class` | `IAIExporter.JoinType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static double` | `defaultLineWeight`
    `static double` | `defaultPointWeight`
    `static boolean` | `enableScreenBoundaryIntersection`
    `static boolean` | `enableViewBasedWeight`
    `static java.text.NumberFormat` | `f`
    `static boolean` | `fillClosedCurve`
    `static boolean` | `ignoreOutOfView`
    `static double` | `internalScaleFactor`
    `static double` | `internalXShift`
    `static double` | `internalYShift`
    `static double` | `maxViewBasedWeight`
    `static double` | `minimumPoint`
    `static double` | `minViewBasedWeight`
    `static double` | `viewBasedWeightScale`
    `static boolean` | `writeOutlineWhenMesh`
    `static boolean` | `writeSubsurfaceAsMesh`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IAIExporter()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `convertCoordinates(IVec2 pt, double scale, IView view)`
    `static IVec2` | `convertTo2DPoint(IVecI pt, double scale, IView view)`
    `static java.util.ArrayList<java.util.ArrayList<IVec2>>` | `convertTo2DPoints(ICurveI curve, double scale, IView view)`
    `static IVec2[]` | `convertTo2DPoints(IVecI[] pts, double scale, IView view)`
    `static IVec[]` | `createBezierPoints(ICurveI curve)`
    `static java.util.ArrayList<java.util.ArrayList<IVec2>>` | `createPolylinePointArrayList(IVec2[] pts)`
    `static void` | `endCompoundPath(java.io.PrintStream ps)`
    `static void` | `endGroup(java.io.PrintStream ps)`
    `static void` | `endLayer(java.io.PrintStream ps)`
    `static void` | `endMask(java.io.PrintStream ps)`
    `static java.lang.String` | `getByteString(int b)`
    `static char` | `getHex(int h)`
    `static IVec2` | `getIntersection(IVec2 base1, IVec2 dir1, IVec2 base2, IVec2 dir2)`
    `static java.lang.String` | `getOctaString(char c)`
    `static java.lang.String` | `getRGBString(int[] pixel, int x, int y, int w)`
    `static void` | `initFormat()`
    `static IVec[][]` | `makeNurbsSurfaceOutline(ISurfaceI surface)`
    `static IVec[]` | `makeNurbsSurfaceUPath(ISurfaceI surface, double v)`
    `static IVec[]` | `makeNurbsSurfaceVPath(ISurfaceI surface, double u)`
    `static IVec[]` | `reverseArray(IVec[] array)`
    `static java.util.ArrayList<IFace>` | `sortFacesByView(java.util.ArrayList<IFace> faces, IView view)`
    `static java.util.ArrayList<IObject>` | `sortObjectsByView(java.util.ArrayList<IObject> objects, IView view)`
    `static void` | `startCompoundPath(java.io.PrintStream ps)`
    `static void` | `startGroup(java.io.PrintStream ps)`
    `static void` | `startLayer(java.io.PrintStream ps, java.lang.String layerName, int layerColorIndex, boolean enableMask)`
    `static void` | `startMask(java.io.PrintStream ps)`
    `static double` | `weightByView(IVecI[] pts, IView view)` calculate stroke weight based on view distance
    `static double` | `weightByView(IVecI pt, IView view)` calculate stroke weight based on view distance
    `static boolean` | `write(java.io.File file, IServerI server, double scale)`
    `static void` | `write(java.io.PrintStream ps, java.util.ArrayList<IObject> objects, double scale, IView view)`
    `static void` | `writeBezierCurvePath(java.io.PrintStream ps, java.util.ArrayList<IVec2> pts, boolean newline)`
    `static void` | `writeBezierCurvePaths(java.io.PrintStream ps, java.util.ArrayList<java.util.ArrayList<IVec2>> pts, boolean newline)`
    `static void` | `writeClosedPolylinePath(java.io.PrintStream ps, IVec2[] pts, boolean newline)`
    `static void` | `writeFooter(java.io.PrintStream ps)`
    `static void` | `writeHeader(java.io.PrintStream ps)`
    `static void` | `writeNurbsCurve(java.io.PrintStream ps, ICurveI curve, double scale, IView view)`
    `static void` | `writeNurbsSurface(java.io.PrintStream ps, ISurfaceI surface, double scale, IColor color, IView view)`
    `static void` | `writeNurbsSurface(java.io.PrintStream ps, ISurfaceI surface, double scale, IView view)`
    `static void` | `writeNurbsSurfaceOutline(java.io.PrintStream ps, ISurfaceI surface, double scale, IColor fillColor, IColor strokeColor, IView view)`
    `static void` | `writeNurbsSurfaceOutline(java.io.PrintStream ps, ISurfaceI surface, double scale, IView view)`
    `static void` | `writeNurbsSurfaceOutline(java.io.PrintStream ps, IVec[][] outlinePts, int udegree, int vdegree, IColor fillColor, IColor strokeColor, double lineWeight, double scale, IView view)`
    `static void` | `writePaintStyle(java.io.PrintStream ps, IColor fillColor, IColor strokeColor, double lineWidth)`
    `static void` | `writePaintStyle(java.io.PrintStream ps, IColor fillColor, IColor strokeColor, double lineWidth, IAIExporter.CapType capType, IAIExporter.JoinType joinType)`
    `static void` | `writePoint(java.io.PrintStream ps, IVecI point, double scale, IView view)`
    `static void` | `writePointPath(java.io.PrintStream ps, IVec2 pt)`
    `static void` | `writePolygonMesh(java.io.PrintStream ps, IMeshI mesh, double scale, IView view)`
    `static void` | `writePolylinePath(java.io.PrintStream ps, java.util.ArrayList<IVec2> pts, boolean newline)`
    `static void` | `writePolylinePath(java.io.PrintStream ps, IVec2[] pts, boolean newline)`
    `static void` | `writePolylinePaths(java.io.PrintStream ps, java.util.ArrayList<java.util.ArrayList<IVec2>> pts, boolean newline)`
    `static void` | `writeText3D(java.io.PrintStream ps, java.lang.String text, IVec pos, IVec horizontalDir, IVec verticalDir, IColor textColor, double scale, IView view)`
    `static void` | `writeTrimLoop(java.io.PrintStream ps, ITrimCurveI[] loop, double scale, IView view)`
    `static void` | `writeTrimLoops(java.io.PrintStream ps, ISurfaceI surf, double scale, IColor fillColor, IColor strokeColor, IView view)`
    `static void` | `writeTrimLoops(java.io.PrintStream ps, ISurfaceI surf, double scale, IView view)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ignoreOutOfView

          public static boolean ignoreOutOfView

    - #### enableScreenBoundaryIntersection

          public static boolean enableScreenBoundaryIntersection

    - #### enableViewBasedWeight

          public static boolean enableViewBasedWeight

    - #### viewBasedWeightScale

          public static double viewBasedWeightScale

    - #### minViewBasedWeight

          public static double minViewBasedWeight

    - #### maxViewBasedWeight

          public static double maxViewBasedWeight

    - #### minimumPoint

          public static double minimumPoint

    - #### defaultLineWeight

          public static double defaultLineWeight

    - #### defaultPointWeight

          public static double defaultPointWeight

    - #### writeSubsurfaceAsMesh

          public static boolean writeSubsurfaceAsMesh

    - #### writeOutlineWhenMesh

          public static boolean writeOutlineWhenMesh

    - #### internalScaleFactor

          public static double internalScaleFactor

    - #### internalXShift

          public static double internalXShift

    - #### internalYShift

          public static double internalYShift

    - #### fillClosedCurve

          public static boolean fillClosedCurve

    - #### f

          public static java.text.NumberFormat f

  - ### Constructor Detail

    - #### IAIExporter

          public IAIExporter()

  - ### Method Detail

    - #### initFormat

          public static void initFormat()

    - #### writeHeader

          public static void writeHeader(java.io.PrintStream ps)

    - #### convertCoordinates

          public static void convertCoordinates(IVec2 pt,
                                                double scale,
                                                IView view)

    - #### writeBezierCurvePaths

          public static void writeBezierCurvePaths(java.io.PrintStream ps,
                                                   java.util.ArrayList<java.util.ArrayList<IVec2>> pts,
                                                   boolean newline)

    - #### writeBezierCurvePath

          public static void writeBezierCurvePath(java.io.PrintStream ps,
                                                  java.util.ArrayList<IVec2> pts,
                                                  boolean newline)

    - #### writePolylinePaths

          public static void writePolylinePaths(java.io.PrintStream ps,
                                                java.util.ArrayList<java.util.ArrayList<IVec2>> pts,
                                                boolean newline)

    - #### writePolylinePath

          public static void writePolylinePath(java.io.PrintStream ps,
                                               java.util.ArrayList<IVec2> pts,
                                               boolean newline)

    - #### writePolylinePath

          public static void writePolylinePath(java.io.PrintStream ps,
                                               IVec2[] pts,
                                               boolean newline)

    - #### writeClosedPolylinePath

          public static void writeClosedPolylinePath(java.io.PrintStream ps,
                                                     IVec2[] pts,
                                                     boolean newline)

    - #### writePointPath

          public static void writePointPath(java.io.PrintStream ps,
                                            IVec2 pt)

    - #### createPolylinePointArrayList

          public static java.util.ArrayList<java.util.ArrayList<IVec2>> createPolylinePointArrayList(IVec2[] pts)

    - #### writePaintStyle

          public static void writePaintStyle(java.io.PrintStream ps,
                                             IColor fillColor,
                                             IColor strokeColor,
                                             double lineWidth,
                                             IAIExporter.CapType capType,
                                             IAIExporter.JoinType joinType)

    - #### writePaintStyle

          public static void writePaintStyle(java.io.PrintStream ps,
                                             IColor fillColor,
                                             IColor strokeColor,
                                             double lineWidth)

    - #### createBezierPoints

          public static IVec[] createBezierPoints(ICurveI curve)

    - #### convertTo2DPoints

          public static java.util.ArrayList<java.util.ArrayList<IVec2>> convertTo2DPoints(ICurveI curve,
                                                                                          double scale,
                                                                                          IView view)

    - #### weightByView

          public static double weightByView(IVecI pt,
                                            IView view)

      calculate stroke weight based on view distance

    - #### weightByView

          public static double weightByView(IVecI[] pts,
                                            IView view)

      calculate stroke weight based on view distance

    - #### convertTo2DPoint

          public static IVec2 convertTo2DPoint(IVecI pt,
                                               double scale,
                                               IView view)

    - #### convertTo2DPoints

          public static IVec2[] convertTo2DPoints(IVecI[] pts,
                                                  double scale,
                                                  IView view)

    - #### writePoint

          public static void writePoint(java.io.PrintStream ps,
                                        IVecI point,
                                        double scale,
                                        IView view)

    - #### writeNurbsCurve

          public static void writeNurbsCurve(java.io.PrintStream ps,
                                             ICurveI curve,
                                             double scale,
                                             IView view)

    - #### startCompoundPath

          public static void startCompoundPath(java.io.PrintStream ps)

    - #### endCompoundPath

          public static void endCompoundPath(java.io.PrintStream ps)

    - #### writeTrimLoops

          public static void writeTrimLoops(java.io.PrintStream ps,
                                            ISurfaceI surf,
                                            double scale,
                                            IView view)

    - #### writeTrimLoops

          public static void writeTrimLoops(java.io.PrintStream ps,
                                            ISurfaceI surf,
                                            double scale,
                                            IColor fillColor,
                                            IColor strokeColor,
                                            IView view)

    - #### writeTrimLoop

          public static void writeTrimLoop(java.io.PrintStream ps,
                                           ITrimCurveI[] loop,
                                           double scale,
                                           IView view)

    - #### writePolygonMesh

          public static void writePolygonMesh(java.io.PrintStream ps,
                                              IMeshI mesh,
                                              double scale,
                                              IView view)

    - #### makeNurbsSurfaceOutline

          public static IVec[][] makeNurbsSurfaceOutline(ISurfaceI surface)

    - #### reverseArray

          public static IVec[] reverseArray(IVec[] array)

    - #### makeNurbsSurfaceUPath

          public static IVec[] makeNurbsSurfaceUPath(ISurfaceI surface,
                                                     double v)

    - #### makeNurbsSurfaceVPath

          public static IVec[] makeNurbsSurfaceVPath(ISurfaceI surface,
                                                     double u)

    - #### writeNurbsSurface

          public static void writeNurbsSurface(java.io.PrintStream ps,
                                               ISurfaceI surface,
                                               double scale,
                                               IView view)

    - #### writeNurbsSurface

          public static void writeNurbsSurface(java.io.PrintStream ps,
                                               ISurfaceI surface,
                                               double scale,
                                               IColor color,
                                               IView view)

    - #### writeNurbsSurfaceOutline

          public static void writeNurbsSurfaceOutline(java.io.PrintStream ps,
                                                      ISurfaceI surface,
                                                      double scale,
                                                      IView view)

    - #### writeNurbsSurfaceOutline

          public static void writeNurbsSurfaceOutline(java.io.PrintStream ps,
                                                      ISurfaceI surface,
                                                      double scale,
                                                      IColor fillColor,
                                                      IColor strokeColor,
                                                      IView view)

    - #### writeNurbsSurfaceOutline

          public static void writeNurbsSurfaceOutline(java.io.PrintStream ps,
                                                      IVec[][] outlinePts,
                                                      int udegree,
                                                      int vdegree,
                                                      IColor fillColor,
                                                      IColor strokeColor,
                                                      double lineWeight,
                                                      double scale,
                                                      IView view)

    - #### getRGBString

          public static java.lang.String getRGBString(int[] pixel,
                                                      int x,
                                                      int y,
                                                      int w)

    - #### getByteString

          public static java.lang.String getByteString(int b)

    - #### getHex

          public static char getHex(int h)

    - #### startLayer

          public static void startLayer(java.io.PrintStream ps,
                                        java.lang.String layerName,
                                        int layerColorIndex,
                                        boolean enableMask)

    - #### endLayer

          public static void endLayer(java.io.PrintStream ps)

    - #### startMask

          public static void startMask(java.io.PrintStream ps)

    - #### endMask

          public static void endMask(java.io.PrintStream ps)

    - #### startGroup

          public static void startGroup(java.io.PrintStream ps)

    - #### endGroup

          public static void endGroup(java.io.PrintStream ps)

    - #### writeFooter

          public static void writeFooter(java.io.PrintStream ps)

    - #### getIntersection

          public static IVec2 getIntersection(IVec2 base1,
                                              IVec2 dir1,
                                              IVec2 base2,
                                              IVec2 dir2)

    - #### writeText3D

          public static void writeText3D(java.io.PrintStream ps,
                                         java.lang.String text,
                                         IVec pos,
                                         IVec horizontalDir,
                                         IVec verticalDir,
                                         IColor textColor,
                                         double scale,
                                         IView view)

    - #### getOctaString

          public static java.lang.String getOctaString(char c)

    - #### write

          public static boolean write(java.io.File file,
                                      IServerI server,
                                      double scale)

    - #### sortObjectsByView

          public static java.util.ArrayList<IObject> sortObjectsByView(java.util.ArrayList<IObject> objects,
                                                                       IView view)

    - #### sortFacesByView

          public static java.util.ArrayList<IFace> sortFacesByView(java.util.ArrayList<IFace> faces,
                                                                   IView view)

    - #### write

          public static void write(java.io.PrintStream ps,
                                   java.util.ArrayList<IObject> objects,
                                   double scale,
                                   IView view)