org.jmol.g3d
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
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Hermite3D(JmolRendererInterface g3d) |
Modifier and Type | Method and Description |
---|---|
(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) |
private JmolRendererInterface g3d
private final Point3i[] pLeft
private final Point3i[] pRight
private final float[] sLeft
private final float[] sRight
private final Point3f[] pTopLeft
private final Point3f[] pTopRight
private final Point3f[] pBotLeft
private final Point3f[] pBotRight
private final Point3f a1
private final Point3f a2
private final Point3f b1
private final Point3f b2
private final Point3f c1
private final Point3f c2
private final Point3f d1
private final Point3f d2
private final Vector3f depth1
private final boolean[] needToFill
private final Vector3f T1
private final Vector3f T2
public Hermite3D(JmolRendererInterface g3d)
public void renderHermiteRope(boolean fill, int tension, int diameterBeg, int diameterMid, int diameterEnd, Point3i p0, Point3i p1, Point3i p2, Point3i p3)
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)
private void renderParallelPair(boolean fill, int tension, Point3i p0, Point3i p1, Point3i p2, Point3i p3, Point3i p4, Point3i p5, Point3i p6, Point3i p7)
fill
- NOT USEDtension
- p0
- p1
- p2
- p3
- p4
- p5
- p6
- p7
-