class CylinderRenderer
extends java.lang.Object
Draws shaded cylinders in 3D.
Cylinders are used to draw bonds.
Modifier and Type | Field and Description |
---|---|
private int |
argbEndcap |
private boolean |
clipped |
private short |
colixA |
private short |
colixB |
private short |
colixEndcap |
private float |
cosPhi |
private float |
cosTheta |
private int |
diameter |
private int |
dxB |
private float |
dxBf |
private int |
dyB |
private float |
dyBf |
private int |
dzB |
private float |
dzBf |
private byte |
endcaps |
private int |
endcapShadeIndex |
private Graphics3D |
g3d |
private LineRenderer |
line3d |
private float |
radius |
private float |
radius2 |
private int |
rasterCount |
private Shader |
shader |
private int[] |
shadesA |
private int[] |
shadesB |
private float |
sinPhi |
private boolean |
tEndcapOpen |
private boolean |
tEvenDiameter |
private int |
xA |
private float |
xAf |
private int |
xEndcap |
private float |
xTip |
private int[][] |
xyzfRaster |
private float[][] |
xyztRaster |
private int |
yA |
private float |
yAf |
private int |
yEndcap |
private float |
yTip |
private int |
zA |
private float |
zAf |
private int |
zEndcap |
private float |
zTip |
Constructor and Description |
---|
CylinderRenderer(Graphics3D g3d) |
Modifier and Type | Method and Description |
---|---|
private int |
allocRaster(boolean isPrecision,
int[][] xyzf,
float[][] xyzt) |
private void |
calcArgbEndcap(boolean tCylinder,
boolean isFloat) |
private void |
calcCosSin(float dx,
float dy,
float dz) |
private void |
calcPoints(int count,
boolean isPrecise) |
private void |
calcRotatedPoint(float t,
int i,
boolean isPrecision,
int[][] xyzf,
float[][] xyzt) |
private void |
generateBaseEllipsePrecisely(boolean isBarb) |
private void |
interpolate(int iLower,
int iUpper,
int[][] xyzf,
float[][] xyzt) |
private void |
interpolatePrecisely(int iLower,
int iUpper,
int[][] xyzf,
float[][] xyzt) |
(package private) void |
render(short colixA,
short colixB,
int screen,
byte endcaps,
int diameter,
int xa,
int ya,
int za,
int xb,
int yb,
int zb) |
(package private) void |
renderBits(short colix,
byte endcaps,
int diameter,
float xa,
float ya,
float za,
float xb,
float yb,
float zb) |
(package private) void |
renderCone(short colix,
byte endcap,
int diameter,
float xa,
float ya,
float za,
float xtip,
float ytip,
float ztip,
boolean doFill,
boolean isBarb) |
private void |
renderFlatEndcap(boolean isCylinder,
boolean isPrecise,
int[][] xyzf) |
private void |
renderSphericalEndcaps() |
private final Graphics3D g3d
private final LineRenderer line3d
private final Shader shader
private short colixA
private short colixB
private int[] shadesA
private int[] shadesB
private int xA
private int yA
private int zA
private int dxB
private int dyB
private int dzB
private float xAf
private float yAf
private float zAf
private float dxBf
private float dyBf
private float dzBf
private boolean tEvenDiameter
private int diameter
private byte endcaps
private boolean tEndcapOpen
private int xEndcap
private int yEndcap
private int zEndcap
private int argbEndcap
private short colixEndcap
private int endcapShadeIndex
private float radius
private float radius2
private float cosTheta
private float cosPhi
private float sinPhi
private boolean clipped
private int rasterCount
private float[][] xyztRaster
private int[][] xyzfRaster
private float xTip
private float yTip
private float zTip
CylinderRenderer(Graphics3D g3d)
void render(short colixA, short colixB, int screen, byte endcaps, int diameter, int xa, int ya, int za, int xb, int yb, int zb)
void renderBits(short colix, byte endcaps, int diameter, float xa, float ya, float za, float xb, float yb, float zb)
void renderCone(short colix, byte endcap, int diameter, float xa, float ya, float za, float xtip, float ytip, float ztip, boolean doFill, boolean isBarb)
private void generateBaseEllipsePrecisely(boolean isBarb)
private void calcPoints(int count, boolean isPrecise)
private void calcCosSin(float dx, float dy, float dz)
private void calcRotatedPoint(float t, int i, boolean isPrecision, int[][] xyzf, float[][] xyzt)
private int allocRaster(boolean isPrecision, int[][] xyzf, float[][] xyzt)
private void interpolate(int iLower, int iUpper, int[][] xyzf, float[][] xyzt)
private void interpolatePrecisely(int iLower, int iUpper, int[][] xyzf, float[][] xyzt)
private void renderFlatEndcap(boolean isCylinder, boolean isPrecise, int[][] xyzf)
private void renderSphericalEndcaps()
private void calcArgbEndcap(boolean tCylinder, boolean isFloat)