public class HermiteRenderer
extends java.lang.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
Modifier and Type | Field and Description |
---|---|
private P3 |
a1 |
private P3 |
a2 |
private P3 |
b1 |
private P3 |
b2 |
private P3 |
c1 |
private P3 |
c2 |
private P3 |
d1 |
private P3 |
d2 |
private V3 |
depth1 |
private JmolRendererInterface |
g3d |
private boolean[] |
needToFill |
private P3[] |
pBotLeft |
private P3[] |
pBotRight |
private P3i[] |
pLeft |
private P3i[] |
pRight |
private P3[] |
pTopLeft |
private P3[] |
pTopRight |
private float[] |
sLeft |
private float[] |
sRight |
private V3 |
T1 |
private V3 |
T2 |
private static V3 |
vAB |
private static V3 |
vAC |
Constructor and Description |
---|
HermiteRenderer(JmolRendererInterface g3d) |
Modifier and Type | Method and Description |
---|---|
private static int |
isFront(P3 a,
P3 b,
P3 c) |
void |
renderHermiteRibbon(boolean fill,
boolean border,
int tension,
P3i p0,
P3i p1,
P3i p2,
P3i p3,
P3i p4,
P3i p5,
P3i p6,
P3i p7,
int aspectRatio,
int fillType) |
void |
renderHermiteRope(boolean fill,
int tension,
int diameterBeg,
int diameterMid,
int diameterEnd,
P3i p0,
P3i p1,
P3i p2,
P3i p3) |
private void |
renderParallelPair(boolean fill,
int tension,
P3i p0,
P3i p1,
P3i p2,
P3i p3,
P3i p4,
P3i p5,
P3i p6,
P3i p7) |
private void |
setDepth(V3 depth,
P3 c,
P3 a,
P3 b,
float ratio) |
private static void |
setPoint(P3 a1,
P3 a,
V3 depth,
int direction) |
private static V3 vAB
private static V3 vAC
private JmolRendererInterface g3d
private final P3i[] pLeft
private final P3i[] pRight
private final float[] sLeft
private final float[] sRight
private final P3[] pTopLeft
private final P3[] pTopRight
private final P3[] pBotLeft
private final P3[] pBotRight
private final P3 a1
private final P3 a2
private final P3 b1
private final P3 b2
private final P3 c1
private final P3 c2
private final P3 d1
private final P3 d2
private final V3 depth1
private final boolean[] needToFill
private final V3 T1
private final V3 T2
public HermiteRenderer(JmolRendererInterface g3d)
public void renderHermiteRope(boolean fill, int tension, int diameterBeg, int diameterMid, int diameterEnd, P3i p0, P3i p1, P3i p2, P3i p3)
public void renderHermiteRibbon(boolean fill, boolean border, int tension, P3i p0, P3i p1, P3i p2, P3i p3, P3i p4, P3i p5, P3i p6, P3i p7, int aspectRatio, int fillType)
fill
- border
- tension
- p0
- p1
- p2
- p3
- p4
- p5
- p6
- p7
- aspectRatio
- fillType
- 1 front; -1 back; 0 bothprivate void renderParallelPair(boolean fill, int tension, P3i p0, P3i p1, P3i p2, P3i p3, P3i p4, P3i p5, P3i p6, P3i p7)
fill
- NOT USEDtension
- p0
- p1
- p2
- p3
- p4
- p5
- p6
- p7
-