org.jmol.g3d
Class Line3D
java.lang.Object
org.jmol.g3d.Line3D
final class Line3D
- extends java.lang.Object
Method Summary |
(package private) boolean |
getCachedLine()
|
(package private) int |
getTrimmedLine()
Cohen-Sutherland line clipping used to check visibility. |
(package private) void |
plotDashedLine(int argb,
boolean tScreened,
int run,
int rise,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB,
boolean clipped)
|
(package private) void |
plotLine(int argbA,
boolean tScreenedA,
int argbB,
boolean tScreenedB,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB,
boolean clipped)
|
private void |
plotLineClipped(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int x,
int y,
int z,
int dx,
int dy,
int dz,
boolean clipped,
int run,
int rise)
|
private void |
plotLineClipped(int argb1,
boolean tScreened1,
int argb2,
boolean tScreened2,
int x,
int y,
int z,
int dx,
int dy,
int dz,
boolean clipped,
int run,
int rise)
|
private void |
plotLineClippedBits(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int x,
int y,
int z,
int dx,
int dy,
int dz,
int run,
int rise)
|
(package private) void |
plotLineDelta(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int xA,
int yA,
int zA,
int dxBA,
int dyBA,
int dzBA,
boolean clipped)
|
(package private) void |
plotLineDelta(int argbA,
boolean tScreenedA,
int argbB,
boolean tScreenedB,
int xA,
int yA,
int zA,
int dxBA,
int dyBA,
int dzBA,
boolean clipped)
|
(package private) void |
plotLineDeltaBits(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int xA,
int yA,
int zA,
int dxBA,
int dyBA,
int dzBA,
boolean clipped)
|
(package private) void |
setLineBits(float dx,
float dy)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
g3d
Graphics3D g3d
lineBits
java.util.BitSet lineBits
slope
float slope
lineTypeX
boolean lineTypeX
nBits
int nBits
nCached
int nCached
nFound
int nFound
lineCache
java.util.Map<java.lang.Float,java.util.BitSet> lineCache
slopeKey
java.lang.Float slopeKey
VISIBILITY_UNCLIPPED
static final int VISIBILITY_UNCLIPPED
- See Also:
- Constant Field Values
VISIBILITY_CLIPPED
static final int VISIBILITY_CLIPPED
- See Also:
- Constant Field Values
VISIBILITY_OFFSCREEN
static final int VISIBILITY_OFFSCREEN
- See Also:
- Constant Field Values
x1t
int x1t
y1t
int y1t
z1t
int z1t
x2t
int x2t
y2t
int y2t
z2t
int z2t
cc1
int cc1
cc2
int cc2
Line3D
Line3D(Graphics3D g3d)
setLineBits
void setLineBits(float dx,
float dy)
getCachedLine
boolean getCachedLine()
getTrimmedLine
int getTrimmedLine()
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);
plotLine
void plotLine(int argbA,
boolean tScreenedA,
int argbB,
boolean tScreenedB,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB,
boolean clipped)
plotLineDelta
void plotLineDelta(int argbA,
boolean tScreenedA,
int argbB,
boolean tScreenedB,
int xA,
int yA,
int zA,
int dxBA,
int dyBA,
int dzBA,
boolean clipped)
plotLineDelta
void plotLineDelta(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int xA,
int yA,
int zA,
int dxBA,
int dyBA,
int dzBA,
boolean clipped)
plotLineDeltaBits
void plotLineDeltaBits(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int xA,
int yA,
int zA,
int dxBA,
int dyBA,
int dzBA,
boolean clipped)
plotDashedLine
void plotDashedLine(int argb,
boolean tScreened,
int run,
int rise,
int xA,
int yA,
int zA,
int xB,
int yB,
int zB,
boolean clipped)
plotLineClipped
private void plotLineClipped(int argb1,
boolean tScreened1,
int argb2,
boolean tScreened2,
int x,
int y,
int z,
int dx,
int dy,
int dz,
boolean clipped,
int run,
int rise)
plotLineClipped
private void plotLineClipped(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int x,
int y,
int z,
int dx,
int dy,
int dz,
boolean clipped,
int run,
int rise)
plotLineClippedBits
private void plotLineClippedBits(int[] shades1,
boolean tScreened1,
int[] shades2,
boolean tScreened2,
int shadeIndex,
int x,
int y,
int z,
int dx,
int dy,
int dz,
int run,
int rise)