Class JvxlCoder

java.lang.Object
org.jmol.jvxl.data.JvxlCoder

public class JvxlCoder extends Object
  • Field Details

  • Constructor Details

    • JvxlCoder

      public JvxlCoder()
  • Method Details

    • jvxlGetFile

      public static String jvxlGetFile(VolumeData volumeData, JvxlData jvxlData, String[] title)
      Parameters:
      volumeData -
      jvxlData -
      title -
      Returns:
      XML string
    • jvxlGetFile

      public static String jvxlGetFile(JvxlData jvxlData, MeshData meshData, String[] title, String msg, boolean includeHeader, int nSurfaces, String state, String comment)
      Parameters:
      jvxlData -
      meshData -
      title -
      msg -
      includeHeader -
      nSurfaces -
      state -
      comment -
      Returns:
      JVXL file XML
    • jvxlGetInfo

      public static String jvxlGetInfo(JvxlData jvxlData)
    • jvxlGetInfoData

      public static String jvxlGetInfoData(JvxlData jvxlData, boolean vertexDataOnly)
    • set3dContourVector

      public static void set3dContourVector(Lst<Object> v, int[][] polygonIndexes, T3[] vertices)
      Interpret fractional data in terms of actual vertex positions and create the elements of a Vector in Vector[] vContours starting at the CONTOUR_POINTS position.
      Parameters:
      v -
      polygonIndexes -
      vertices -
    • appendContourTriangleIntersection

      public static void appendContourTriangleIntersection(int type, float f1, float f2, SB fData)
      appends an integer (3, 5, or 6) representing two sides of a triangle ABC -- AB/BC(3), AB/CA(5), or BC/CA(6) -- along with two fractions along the edges for the intersection point base-90-encoded. This version is single precision. type f1 f2 3 AB BC 5 AB CA 6 BC CA
      Parameters:
      type -
      f1 - -- character-encoded fraction
      f2 - -- character-encoded fraction
      fData -
    • jvxlCreateColorData

      public static void jvxlCreateColorData(JvxlData jvxlData, float[] vertexValues)
      Parameters:
      jvxlData -
      vertexValues -
    • jvxlEncodeColorData

      public static String jvxlEncodeColorData(float[] vertexValues, float min, float max, int colorFractionBase, int colorFractionRange, boolean doTruncate, boolean isPrecisionColor)
      Parameters:
      vertexValues -
      min -
      max -
      colorFractionBase -
      colorFractionRange -
      doTruncate -
      isPrecisionColor - create a value with 1/8100 precision (otherwise just 1/90)
      Returns:
      String encoding of the values
    • jvxlFractionAsCharacter

      public static char jvxlFractionAsCharacter(float fraction)
    • jvxlFractionAsCharacterRange

      public static char jvxlFractionAsCharacterRange(float fraction, int base, int range)
    • jvxlFractionFromCharacter

      public static float jvxlFractionFromCharacter(int ich, int base, int range, float fracOffset)
    • jvxlFractionFromCharacter2

      public static float jvxlFractionFromCharacter2(int ich1, int ich2, int base, int range)
    • jvxlValueAsCharacter

      public static char jvxlValueAsCharacter(float value, float min, float max, int base, int range)
    • jvxlValueFromCharacter2

      protected static float jvxlValueFromCharacter2(int ich, int ich2, float min, float max, int base, int range)
    • jvxlEncodeBitSet0

      public static int jvxlEncodeBitSet0(BS bs, int nPoints, SB sb)
    • jvxlEncodeBitSet

      public static String jvxlEncodeBitSet(BS bs)
    • jvxlEncodeBitSetBuffer

      public static int jvxlEncodeBitSetBuffer(BS bs, int nPoints, SB sb)
    • jvxlAppendEncodedNumber

      public static void jvxlAppendEncodedNumber(SB sb, int n, int base, int range)
    • jvxlDecodeBitSetRange

      public static BS jvxlDecodeBitSetRange(String data, int base, int range)
    • jvxlParseEncodedInt

      public static int jvxlParseEncodedInt(String str, int offset, int base, int[] next)
    • jvxlDecodeBitSet

      public static BS jvxlDecodeBitSet(String data)
    • jvxlCompressString

      public static String jvxlCompressString(String data, boolean escapeXml)
    • jvxlDecompressString

      public static String jvxlDecompressString(String data)
    • jvxlCreateHeaderWithoutTitleOrAtoms

      public static void jvxlCreateHeaderWithoutTitleOrAtoms(VolumeData v, SB bs)
    • jvxlCreateHeader

      public static void jvxlCreateHeader(VolumeData v, SB sb)
      Creates a two-line header for the XJVXL file. It is no longer necessary to create the atom set or generate the vectors here. Please leave the commented code for posterity.
      Parameters:
      v -
      sb -