Package org.jmol.g3d
Class LineRenderer
java.lang.Object
org.jmol.g3d.PrecisionRenderer
org.jmol.g3d.LineRenderer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Graphics3D
private javajs.util.BS
private boolean
private int
private final Shader
private float
private Float
private static final int
private static final int
private static final int
private int
private int
private int
private int
private int
private int
Fields inherited from class org.jmol.g3d.PrecisionRenderer
a, b, isOrthographic
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
private int
Cohen-Sutherland line clipping used to check visibility.(package private) void
plotLineBits
(int argbA, int argbB, javajs.util.P3i ptA, javajs.util.P3i ptB, int run, int rise, boolean andClip) private void
plotLineClippedOld
(int argb1, int argb2, int x, int y, int z, int dx, int dy, int dz, boolean clipped, int run, int rise) low-resolution linear z-buffer (old style)(package private) void
plotLineDeltaABitsFloat
(int[] shades1, int[] shades2, int shadeIndex, javajs.util.P3 ptA, javajs.util.P3 ptB, int screenMask, boolean clipped) (package private) void
plotLineDeltaABitsInt
(int[] shades1, int[] shades2, int shadeIndex, javajs.util.P3i ptA, javajs.util.P3i ptB, int screenMask, boolean clipped) (package private) void
plotLineDeltaAOld
(int[] shades1, int[] shades2, int screenMask, int shadeIndex, int x, int y, int z, int dx, int dy, int dz, boolean clipped) low-precision old-style linear z, even in perspective mode(package private) void
plotLineDeltaOld
(int argbA, int argbB, int xA, int yA, int zA, int dxBA, int dyBA, int dzBA, boolean clipped) low-resolution linear z(package private) void
plotLineOld
(int argbA, int argbB, int xA, int yA, int zA, int xB, int yB, int zB) (package private) void
setLineBits
(float dx, float dy) Methods inherited from class org.jmol.g3d.PrecisionRenderer
getZCurrent, setRastAB, setRastABFloat
-
Field Details
-
g3d
-
shader
-
lineBits
private javajs.util.BS lineBits -
slope
private float slope -
lineTypeX
private boolean lineTypeX -
nBits
private int nBits -
lineCache
-
slopeKey
-
VISIBILITY_UNCLIPPED
private static final int VISIBILITY_UNCLIPPED- See Also:
-
VISIBILITY_CLIPPED
private static final int VISIBILITY_CLIPPED- See Also:
-
VISIBILITY_OFFSCREEN
private static final int VISIBILITY_OFFSCREEN- See Also:
-
x1t
private int x1t -
y1t
private int y1t -
z1t
private int z1t -
x2t
private int x2t -
y2t
private int y2t -
z2t
private int z2t
-
-
Constructor Details
-
LineRenderer
LineRenderer(Graphics3D g3d)
-
-
Method Details
-
setLineBits
void setLineBits(float dx, float dy) -
clearLineCache
void clearLineCache() -
plotLineOld
void plotLineOld(int argbA, int argbB, int xA, int yA, int zA, int xB, int yB, int zB) -
plotLineDeltaOld
void plotLineDeltaOld(int argbA, int argbB, int xA, int yA, int zA, int dxBA, int dyBA, int dzBA, boolean clipped) low-resolution linear z- Parameters:
argbA
-argbB
-xA
-yA
-zA
-dxBA
-dyBA
-dzBA
-clipped
-
-
plotLineDeltaAOld
void plotLineDeltaAOld(int[] shades1, int[] shades2, int screenMask, int shadeIndex, int x, int y, int z, int dx, int dy, int dz, boolean clipped) low-precision old-style linear z, even in perspective mode- Parameters:
shades1
-shades2
-screenMask
-shadeIndex
-x
-y
-z
-dx
-dy
-dz
-clipped
-
-
plotLineDeltaABitsFloat
void plotLineDeltaABitsFloat(int[] shades1, int[] shades2, int shadeIndex, javajs.util.P3 ptA, javajs.util.P3 ptB, int screenMask, boolean clipped) -
plotLineDeltaABitsInt
void plotLineDeltaABitsInt(int[] shades1, int[] shades2, int shadeIndex, javajs.util.P3i ptA, javajs.util.P3i ptB, int screenMask, boolean clipped) -
plotLineBits
void plotLineBits(int argbA, int argbB, javajs.util.P3i ptA, javajs.util.P3i ptB, int run, int rise, boolean andClip) -
getTrimmedLineImpl
private int getTrimmedLineImpl()Cohen-Sutherland line clipping used to check visibility.
Note that this routine is only used for visibility checking. To avoid integer rounding errors which cause cracking to occur in 'solid' surfaces, the lines are actually drawn from their original end-points. The nuance is that this algorithm doesn't just deliver a boolean. It delivers the trimmed line. Although we need to start the raster loop at the origin for good surfaces, we can save lots of time by saving the known endpoints as globals variables. -- Bob Hanson 7/06
- Returns:
- Visibility (see VISIBILITY_... constants);
-
plotLineClippedOld
private void plotLineClippedOld(int argb1, int argb2, int x, int y, int z, int dx, int dy, int dz, boolean clipped, int run, int rise) low-resolution linear z-buffer (old style)- Parameters:
argb1
-argb2
-x
-y
-z
-dx
-dy
-dz
-clipped
-run
-rise
-
-