HermiteRenderer
Date: 2019-10-22

org.jmol.g3d

## Class HermiteRenderer

- java.lang.Object
- - org.jmol.g3d.HermiteRenderer

- All Implemented Interfaces:
    G3DRenderer

      public class HermiteRenderer
      extends java.lang.Object
      implements G3DRenderer

  Implementation of hermite curves for drawing smoothed curves that pass through specified points.

  Examples of usage in Jmol include the commands: `trace, ribbons and cartoons`.

  for some useful background info about hermite curves check out http://www.cubic.org/docs/hermite.htm Technically, Jmol implements a Cardinal spline varient of the Hermitian spline

  Author:
    Miguel, miguel@jmol.org

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private javajs.util.P3` | `a1`
    `private javajs.util.P3` | `a2`
    `private javajs.util.P3` | `b1`
    `private javajs.util.P3` | `b2`
    `private javajs.util.P3` | `c1`
    `private javajs.util.P3` | `c2`
    `private javajs.util.P3` | `d1`
    `private javajs.util.P3` | `d2`
    `private javajs.util.V3` | `depth1`
    `private JmolRendererInterface` | `g3d`
    `private GData` | `gdata`
    `private boolean[]` | `needToFill`
    `private javajs.util.P3[]` | `pBotLeft`
    `private javajs.util.P3[]` | `pBotRight`
    `private javajs.util.P3i[]` | `pLeft`
    `private javajs.util.P3i[]` | `pRight`
    `private javajs.util.P3[]` | `pTopLeft`
    `private javajs.util.P3[]` | `pTopRight`
    `private float[]` | `sLeft`
    `private float[]` | `sRight`
    `private javajs.util.V3` | `T1`
    `private javajs.util.V3` | `T2`
    `private static javajs.util.V3` | `vAB`
    `private static javajs.util.V3` | `vAC`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HermiteRenderer()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static int` | `isFront(javajs.util.P3 a, javajs.util.P3 b, javajs.util.P3 c)`
    `void` | `renderHermiteRibbon(boolean fill, boolean border, int tension, javajs.util.P3 p0, javajs.util.P3 p1, javajs.util.P3 p2, javajs.util.P3 p3, javajs.util.P3 p4, javajs.util.P3 p5, javajs.util.P3 p6, javajs.util.P3 p7, int aspectRatio, int fillType)`
    `void` | `renderHermiteRope(boolean fill, int tension, int diameterBeg, int diameterMid, int diameterEnd, javajs.util.P3 p0, javajs.util.P3 p1, javajs.util.P3 p2, javajs.util.P3 p3)`
    `private void` | `renderParallelPair(boolean fill, int tension, javajs.util.P3 p0, javajs.util.P3 p1, javajs.util.P3 p2, javajs.util.P3 p3, javajs.util.P3 p4, javajs.util.P3 p5, javajs.util.P3 p6, javajs.util.P3 p7)`
    `G3DRenderer` | `set(JmolRendererInterface g3d, GData gdata)`

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

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

- - ### Field Detail

    - #### vAB

          private static javajs.util.V3 vAB

    - #### vAC

          private static javajs.util.V3 vAC

    - #### g3d

          private JmolRendererInterface g3d

    - #### gdata

          private GData gdata

    - #### pLeft

          private final javajs.util.P3i[] pLeft

    - #### pRight

          private final javajs.util.P3i[] pRight

    - #### sLeft

          private final float[] sLeft

    - #### sRight

          private final float[] sRight

    - #### pTopLeft

          private final javajs.util.P3[] pTopLeft

    - #### pTopRight

          private final javajs.util.P3[] pTopRight

    - #### pBotLeft

          private final javajs.util.P3[] pBotLeft

    - #### pBotRight

          private final javajs.util.P3[] pBotRight

    - #### a1

          private final javajs.util.P3 a1

    - #### a2

          private final javajs.util.P3 a2

    - #### b1

          private final javajs.util.P3 b1

    - #### b2

          private final javajs.util.P3 b2

    - #### c1

          private final javajs.util.P3 c1

    - #### c2

          private final javajs.util.P3 c2

    - #### d1

          private final javajs.util.P3 d1

    - #### d2

          private final javajs.util.P3 d2

    - #### T1

          private final javajs.util.V3 T1

    - #### T2

          private final javajs.util.V3 T2

    - #### depth1

          private final javajs.util.V3 depth1

    - #### needToFill

          private final boolean[] needToFill

  - ### Constructor Detail

    - #### HermiteRenderer

          public HermiteRenderer()

  - ### Method Detail

    - #### set

          public G3DRenderer set(JmolRendererInterface g3d,
                                 GData gdata)

      Specified by:
        `set` in interface `G3DRenderer`

    - #### renderHermiteRope

          public void renderHermiteRope(boolean fill,
                                        int tension,
                                        int diameterBeg,
                                        int diameterMid,
                                        int diameterEnd,
                                        javajs.util.P3 p0,
                                        javajs.util.P3 p1,
                                        javajs.util.P3 p2,
                                        javajs.util.P3 p3)

    - #### renderHermiteRibbon

          public void renderHermiteRibbon(boolean fill,
                                          boolean border,
                                          int tension,
                                          javajs.util.P3 p0,
                                          javajs.util.P3 p1,
                                          javajs.util.P3 p2,
                                          javajs.util.P3 p3,
                                          javajs.util.P3 p4,
                                          javajs.util.P3 p5,
                                          javajs.util.P3 p6,
                                          javajs.util.P3 p7,
                                          int aspectRatio,
                                          int fillType)

      Parameters:
        `fill` -
        `border` -
        `tension` -
        `p0` -
        `p1` -
        `p2` -
        `p3` -
        `p4` -
        `p5` -
        `p6` -
        `p7` -
        `aspectRatio` -
        `fillType` - 1 front; -1 back; 0 both

    - #### isFront

          private static int isFront(javajs.util.P3 a,
                                     javajs.util.P3 b,
                                     javajs.util.P3 c)

    - #### renderParallelPair

          private void renderParallelPair(boolean fill,
                                          int tension,
                                          javajs.util.P3 p0,
                                          javajs.util.P3 p1,
                                          javajs.util.P3 p2,
                                          javajs.util.P3 p3,
                                          javajs.util.P3 p4,
                                          javajs.util.P3 p5,
                                          javajs.util.P3 p6,
                                          javajs.util.P3 p7)

      Parameters:
        `fill` - NOT USED
        `tension` -
        `p0` -
        `p1` -
        `p2` -
        `p3` -
        `p4` -
        `p5` -
        `p6` -
        `p7` -