org.jmol.g3d
Class Hermite3D

java.lang.Object
  extended by org.jmol.g3d.Hermite3D

public class Hermite3D
extends Object

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
private  Point3f a1
           
private  Point3f a2
           
private  Point3f b1
           
private  Point3f b2
           
private  Point3f c1
           
private  Point3f c2
           
private  Point3f d1
           
private  Point3f d2
           
private  Vector3f depth1
           
private  JmolRendererInterface g3d
           
private  boolean[] needToFill
           
private  Point3f[] pBotLeft
           
private  Point3f[] pBotRight
           
private  Point3i[] pLeft
           
private  Point3i[] pRight
           
private  Point3f[] pTopLeft
           
private  Point3f[] pTopRight
           
private  float[] sLeft
           
private  float[] sRight
           
private  Vector3f T1
           
private  Vector3f T2
           
 
Constructor Summary
Hermite3D(JmolRendererInterface g3d)
           
 
Method Summary
(package private) static void getHermiteList(int tension, Tuple3f p0, Tuple3f p1, Tuple3f p2, Tuple3f p3, Tuple3f p4, Tuple3f[] list, int index0, int n)
           
 void renderHermiteRibbon(boolean fill, boolean border, int tension, Point3i p0, Point3i p1, Point3i p2, Point3i p3, Point3i p4, Point3i p5, Point3i p6, Point3i p7, int aspectRatio)
           
 void renderHermiteRope(boolean fill, int tension, int diameterBeg, int diameterMid, int diameterEnd, Point3i p0, Point3i p1, Point3i p2, Point3i p3)
           
private  void renderParallelPair(boolean fill, int tension, Point3i p0, Point3i p1, Point3i p2, Point3i p3, Point3i p4, Point3i p5, Point3i p6, Point3i p7)
           
private static void set(Point3f p3f, Point3i p3i)
           
private  void setDepth(Vector3f depth, Point3f c, Point3f a, Point3f b, float ratio)
           
private  void setPoint(Point3f a1, Point3f a, Vector3f depth, int direction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

g3d

private JmolRendererInterface g3d

pLeft

private final Point3i[] pLeft

pRight

private final Point3i[] pRight

sLeft

private final float[] sLeft

sRight

private final float[] sRight

pTopLeft

private final Point3f[] pTopLeft

pTopRight

private final Point3f[] pTopRight

pBotLeft

private final Point3f[] pBotLeft

pBotRight

private final Point3f[] pBotRight

a1

private final Point3f a1

a2

private final Point3f a2

b1

private final Point3f b1

b2

private final Point3f b2

c1

private final Point3f c1

c2

private final Point3f c2

d1

private final Point3f d1

d2

private final Point3f d2

depth1

private final Vector3f depth1

needToFill

private final boolean[] needToFill

T1

private final Vector3f T1

T2

private final Vector3f T2
Constructor Detail

Hermite3D

public Hermite3D(JmolRendererInterface g3d)
Method Detail

renderHermiteRope

public void renderHermiteRope(boolean fill,
                              int tension,
                              int diameterBeg,
                              int diameterMid,
                              int diameterEnd,
                              Point3i p0,
                              Point3i p1,
                              Point3i p2,
                              Point3i p3)

renderHermiteRibbon

public void renderHermiteRibbon(boolean fill,
                                boolean border,
                                int tension,
                                Point3i p0,
                                Point3i p1,
                                Point3i p2,
                                Point3i p3,
                                Point3i p4,
                                Point3i p5,
                                Point3i p6,
                                Point3i p7,
                                int aspectRatio)

renderParallelPair

private void renderParallelPair(boolean fill,
                                int tension,
                                Point3i p0,
                                Point3i p1,
                                Point3i p2,
                                Point3i p3,
                                Point3i p4,
                                Point3i p5,
                                Point3i p6,
                                Point3i p7)

set

private static void set(Point3f p3f,
                        Point3i p3i)

setDepth

private void setDepth(Vector3f depth,
                      Point3f c,
                      Point3f a,
                      Point3f b,
                      float ratio)

setPoint

private void setPoint(Point3f a1,
                      Point3f a,
                      Vector3f depth,
                      int direction)

getHermiteList

static void getHermiteList(int tension,
                           Tuple3f p0,
                           Tuple3f p1,
                           Tuple3f p2,
                           Tuple3f p3,
                           Tuple3f p4,
                           Tuple3f[] list,
                           int index0,
                           int n)