org.jmol.g3d

Class 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
Point3fa1
Point3fa2
Point3fb1
Point3fb2
Point3fc1
Point3fc2
Point3fd1
Point3fd2
Vector3fdepth1
JmolRendererInterfaceg3d
boolean[]needToFill
Point3f[]pBotLeft
Point3f[]pBotRight
Point3i[]pLeft
Point3i[]pRight
Point3f[]pTopLeft
Point3f[]pTopRight
float[]sLeft
intsp
float[]sRight
Vector3fT1
Vector3fT2
Constructor Summary
Hermite3D(JmolRendererInterface g3d)
Method Summary
static voidgetHermiteList(int tension, Tuple3f p0, Tuple3f p1, Tuple3f p2, Tuple3f p3, Tuple3f p4, Tuple3f[] list, int index0, int n)
voidrender(boolean tFill, int tension, int diameterBeg, int diameterMid, int diameterEnd, Point3i p0, Point3i p1, Point3i p2, Point3i p3)
voidrender2(boolean fill, boolean border, int tension, Point3i p0, Point3i p1, Point3i p2, Point3i p3, Point3i p4, Point3i p5, Point3i p6, Point3i p7, int aspectRatio)
voidrender2x(boolean fill, int tension, Point3i p0, Point3i p1, Point3i p2, Point3i p3, Point3i p4, Point3i p5, Point3i p6, Point3i p7)
static voidset(Point3f p3f, Point3i p3i)
voidsetDepth(Vector3f depth, Point3f c, Point3f a, Point3f b, float ratio)
voidsetPoint(Point3f a1, Point3f a, Vector3f depth, int direction)

Field Detail

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

g3d

private JmolRendererInterface g3d

needToFill

private final boolean[] needToFill

pBotLeft

private final Point3f[] pBotLeft

pBotRight

private final Point3f[] pBotRight

pLeft

private final Point3i[] pLeft

pRight

private final Point3i[] pRight

pTopLeft

private final Point3f[] pTopLeft

pTopRight

private final Point3f[] pTopRight

sLeft

private final float[] sLeft

sp

int sp

sRight

private final float[] sRight

T1

private final Vector3f T1

T2

private final Vector3f T2

Constructor Detail

Hermite3D

public Hermite3D(JmolRendererInterface g3d)

Method Detail

getHermiteList

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

render

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

render2

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

render2x

private void render2x(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)