|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectastex.Renderer
public class Renderer
| Field Summary | |
|---|---|
boolean |
analyticalSpheres
Do we do analytical spheres? |
boolean |
antialias
Are we antialiasing. |
double |
back
The distance behind the center of the back clip plane. |
int |
backClip
The integer back plane. |
boolean |
backlit
Are we backlighting back facing triangles. |
static int |
CartoonLightingModel
The cartoon style. |
double |
clipIncrement
The clip increment. |
boolean |
clipping
Is clipping enabled? |
boolean |
clipTriangle
Does this triangle need clipping? |
boolean |
colorInitialised
Have we initialised the single color lookup table? |
boolean |
colorTriangle
Are we doing triangle debugging color style. |
double |
cosWrapAngle
|
boolean |
debug
Is debugging information enabled? |
int[] |
debugColor
Contrasting colors for debugging renderer performance. |
static int |
DefaultLightingModel
The default lighting model. |
boolean |
depthcue
Do depth cueing of the final image. |
boolean |
emulate555
|
static int |
FinalRenderPass
|
static int |
FixedBits
Number of fixed precision bits. |
double |
front
The distance in front of the center of the front clip plane. |
int |
frontClip
The integer front plane. |
boolean |
frontFaceOnly
Do backface removal of triangles. |
boolean |
lightMapCalculated
Have we calcualated our light map? |
DynamicArray |
lights
The list of lights. |
DynamicArray |
objects
The list of objects to render. |
int[] |
opbuffer
The original pixel buffer. |
Matrix |
overallMatrix
|
int[] |
pbuffer
The pixel buffer. |
boolean |
phong
Do phong shading. |
int |
pixelCount
Number of pixels. |
int |
pixelHeight
Height of the renderer. |
int |
pixelWidth
Width of the renderer. |
static int |
PostRenderPass
|
double |
powFactor
|
static int |
PreRenderPass
Different settings for the render passes. |
DynamicArray |
rendererEventListeners
|
static int |
RenderPass
|
boolean |
rgb
Do RGB Gouraud shading rather than Phong lookup. |
Matrix |
rotationMatrix
|
double |
scale
The current scale. |
int |
shadowMode
Shadow mode for the renderer. |
static int |
ShadowsAccumulate
|
static int |
ShadowsOff
Defines for the shadowing states. |
static int |
ShadowsOn
|
Texture |
texture
The current texture. |
java.util.Hashtable |
textures
The list of textures. |
int |
triangleColor
The base color for simple color triangle rendering. |
int |
triangleColorB
|
int |
triangleColorG
|
int |
triangleColorR
Components of the triangle color for fast shading |
int[] |
triangleColors
Primary colors for specific triangle issues. |
double |
width
The width of the view. |
double |
wrapAngle
|
boolean |
wuAntiAlias
Are we doing wu line antialiasing. |
int[] |
zbuffer
The z-buffer. |
static double |
ZFixedBits
Floating point multiplier for z-buffer interpolation. |
int |
zmax
Maximum z-coordinate after transformation. |
int |
zmin
Minimum z-coordinate after transformation. |
double |
zoom
The current zoom. |
| Constructor Summary | |
|---|---|
Renderer()
Default renderer. |
|
| Method Summary | |
|---|---|
void |
addGraphicalObject(Tmesh tm)
Add a graphical object. |
void |
addLight(boolean onOff,
double x,
double y,
double z,
int diffuseColor,
int specularColor,
double power)
Add a light. |
void |
addRendererEventListener(RendererEventListener rel)
Add a listener for renderer events. |
void |
addTmesh(Tmesh tm)
Add a tmesh to the renderer. |
void |
applyTexture(java.lang.String pattern,
java.lang.String texName)
Apply texture to the specified objects. |
void |
applyTransform(double x,
double y,
double z,
double[] s)
Apply a transform to a point. |
void |
applyTransform2(double x,
double y,
double z,
int[] s)
Apply a transform to a point. |
void |
applyZoom(double factor)
Change the zoom for the molecule. |
void |
buildOverallMatrix()
Build the overall transformation matrix. |
void |
decrementClip()
Decrement the clip plane distance. |
void |
decrementFrontClip()
Decrement the clip plane distance. |
void |
drawAntiAliasedLine(int x0,
int y0,
int z0,
int x1,
int y1,
int z1,
int Colour0,
int Colour1)
Basic Wu antialiased line drawing. |
void |
drawBox(int xt,
int yt,
int zt,
int width,
int c)
Draw a box in transformed screen coords. |
void |
drawCylinder(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
int rgb1,
int rgb2,
double r)
Draw a cylinder. |
void |
drawDirectString(int x,
int y,
int color,
java.lang.String string)
Draw a string at the specified point. |
void |
drawDot(int xt,
int yt,
int zt,
int c)
Draw a dot. |
void |
drawLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
int rgb1,
int rgb2,
int pixelWidth)
World coordinate entry point for drawing lines. |
void |
drawLine(int x1,
int y1,
int z1,
int x2,
int y2,
int z2,
int rgb1,
int rgb2,
int lineWidth)
Main entry point for drawing lines. |
void |
drawObjects()
Draw the tmesh objects. |
void |
drawPixels(double x,
double y,
double z,
int w,
int h,
int[] pix,
int hints)
Draw an image at the specified location. |
void |
drawSphere(double x,
double y,
double z,
double r,
int rgb)
Draw a sphere. |
void |
drawSphere(double x,
double y,
double z,
double r,
int rgb,
int transp)
|
void |
drawString(double x,
double y,
double z,
double zoff,
int color,
java.lang.String string)
Draw a string at the specified point. |
void |
drawString(double x,
double y,
double z,
int color,
java.lang.String string)
Draw a string at the specified point. |
void |
drawZImage(double x,
double y,
double z,
int[] pix,
int w,
int h)
|
int |
getAmbient()
Get the ambient component. |
boolean |
getAntiAlias()
Return the current antialiasing setting. |
double |
getBackClip()
|
int |
getBackgroundColor()
Get the background colour. |
double |
getCartoonNormalCutoff()
Get the cartoon normal cutoff. |
Point3d |
getCenter()
Get the center point. |
double |
getClip()
Set the clip. |
double |
getFrontClip()
|
Tmesh |
getGraphicalObject(int i)
Get the number of graphical objects. |
Tmesh |
getGraphicalObject(java.lang.String targetName)
Return a GraphicalObject with the specified name. |
int |
getGraphicalObjectCount()
Get the number of graphical objects. |
DynamicArray |
getGraphicalObjects(java.lang.String pattern)
Return a DynamicArray of objects that match the pattern. |
int |
getLightingModel()
|
java.lang.String |
getLogo()
Get the current logo. |
double |
getOverallScale()
Return the overall scale. |
int |
getPixel(int x,
int y)
Get a pixel value checking for on screen. |
double |
getRadius()
Get the radius. |
int |
getSamples()
Get the number of samples. |
double |
getScale()
Get the scale. |
java.lang.String |
getStatusString()
Get the current StatusString. |
double |
getZoom()
Get the zoom. |
void |
incrementClip()
Increment the clip plane distance. |
void |
incrementFrontClip()
Increment the clip plane distance. |
void |
postProcess()
Post process the buffers. |
void |
publicRedraw()
Public redrawing operations that can be overridden. |
void |
redraw()
Redraw the image. |
void |
removeGraphicalObjects(java.lang.String pattern)
Remove objects that match a pattern. |
void |
removeGraphicalObjects(Tmesh tm)
Remove specific graphical object. |
void |
removeGraphicalObjectsBeginningWith(java.lang.String prefix)
Remove objects that begin with the specified string. |
void |
removeRendererEventListener(RendererEventListener rel)
Remove a listener for renderer events. |
void |
resetCenterAndRadius()
Reset the center and radius of the view. |
void |
rotateX(double degrees)
Rotate the transform around the x axis. |
void |
rotateY(double degrees)
Rotate the transform around the x axis. |
void |
rotateZ(double degrees)
Rotate the transform around the x axis. |
void |
scaleTexture(java.lang.String pattern,
int attribute,
double value)
Scale texture to the specified objects. |
void |
setAmbient(int rgb)
Set the ambient component of the lighting model. |
void |
setAntiAlias(boolean b)
Set the current antialiasing setting. |
void |
setBackClip(double v)
Set the back clip plane. |
void |
setBackClip(double v,
boolean fireEvent)
|
void |
setBackface(java.lang.String pattern,
boolean value)
Set backface on or off. |
void |
setBackgroundColor(int c)
Set the background colour. |
void |
setCartoonNormalCutoff(double c)
Set the cartoon normal cutoff. |
void |
setCenter(Point3d p)
Set the center point. |
void |
setClip(double d)
Set the clip. |
void |
setClip(double f,
double b)
Set the clip. |
void |
setClipIncrement(double inc)
Set the clip increment. |
void |
setColor(int newc)
Set the material color. |
void |
setDisplayStatusString(boolean b)
Set whether or not to display the status string. |
void |
setDrawGamma(double d)
|
void |
setFrontClip(double v)
Set the front clip plane. |
void |
setFrontClip(double v,
boolean fireEvent)
|
void |
setGradient(boolean b)
Set top of background colour gradient. |
void |
setGradientBottom(int c)
Set top of background colour gradient. |
void |
setGradientTop(int c)
Set top of background colour gradient. |
void |
setGraphicalObjectsColour(java.lang.String pattern,
int colour)
Change the visibility state of GraphicalObjects. |
void |
setGraphicalObjectsVisibility(java.lang.String pattern,
int state)
Change the visibility state of GraphicalObjects. |
void |
setLightingModel(int lm)
Set the lighting model. |
void |
setLogo(java.lang.String newLogo)
Set the current logo. |
void |
setPixel(int x,
int y,
int c)
Set a pixel checking for on screen. |
void |
setPixel(int x,
int y,
int z,
int c)
Set a pixel checking for on screen and z-buffer. |
void |
setPowFactor(double d)
|
void |
setRadius(double d)
Set the radius. |
void |
setSamples(int s)
Set the number of samples. |
void |
setScale(double s)
Set the scale. |
void |
setSize(int width,
int height)
Resize the renderer. |
void |
setStatusString(java.lang.String newStatusString)
Set the current StatusString. |
void |
setWrapAngle(double d)
|
void |
setZoom(double s)
Set the zoom. |
void |
transformNormal(double x,
double y,
double z,
double[] s)
Apply a transform to a point. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int shadowMode
public static final int ShadowsOff
public static final int ShadowsAccumulate
public static final int ShadowsOn
public static final int PreRenderPass
public static final int RenderPass
public static final int PostRenderPass
public static final int FinalRenderPass
public int pixelWidth
public int pixelHeight
public int pixelCount
public int[] pbuffer
public int[] zbuffer
public static final int FixedBits
public static final double ZFixedBits
public double width
public double back
public int backClip
public double front
public int frontClip
public boolean debug
public DynamicArray objects
public static final int DefaultLightingModel
public static final int CartoonLightingModel
public transient boolean lightMapCalculated
public boolean colorInitialised
public DynamicArray lights
public java.util.Hashtable textures
public Texture texture
public boolean clipping
public boolean clipTriangle
public boolean rgb
public boolean phong
public boolean frontFaceOnly
public boolean backlit
public boolean depthcue
public boolean analyticalSpheres
public int zmin
public int zmax
public int triangleColor
public int triangleColorR
public int triangleColorG
public int triangleColorB
public boolean colorTriangle
public double scale
public double zoom
public double clipIncrement
public int[] debugColor
public int[] triangleColors
public transient DynamicArray rendererEventListeners
public boolean antialias
public boolean wuAntiAlias
public boolean emulate555
public Matrix overallMatrix
public Matrix rotationMatrix
public int[] opbuffer
public double powFactor
public double wrapAngle
public double cosWrapAngle
| Constructor Detail |
|---|
public Renderer()
| Method Detail |
|---|
public boolean getAntiAlias()
public void setAntiAlias(boolean b)
public void setLightingModel(int lm)
public int getLightingModel()
public void setCartoonNormalCutoff(double c)
public double getCartoonNormalCutoff()
public void setBackgroundColor(int c)
public int getBackgroundColor()
public void setGradient(boolean b)
public void setGradientTop(int c)
public void setGradientBottom(int c)
public void setScale(double s)
public double getScale()
public void setZoom(double s)
public double getZoom()
public void applyZoom(double factor)
public void setRadius(double d)
public double getRadius()
public void setFrontClip(double v)
public double getFrontClip()
public void setFrontClip(double v,
boolean fireEvent)
public void setBackClip(double v)
public double getBackClip()
public void setBackClip(double v,
boolean fireEvent)
public void setClip(double f,
double b)
public void setClip(double d)
public double getClip()
public void setClipIncrement(double inc)
public void incrementClip()
public void decrementClip()
public void incrementFrontClip()
public void decrementFrontClip()
public Point3d getCenter()
public void setCenter(Point3d p)
public void resetCenterAndRadius()
public void setAmbient(int rgb)
public int getAmbient()
public void addLight(boolean onOff,
double x,
double y,
double z,
int diffuseColor,
int specularColor,
double power)
public void addRendererEventListener(RendererEventListener rel)
public void removeRendererEventListener(RendererEventListener rel)
public void addTmesh(Tmesh tm)
public void addGraphicalObject(Tmesh tm)
public int getGraphicalObjectCount()
public Tmesh getGraphicalObject(int i)
public Tmesh getGraphicalObject(java.lang.String targetName)
public DynamicArray getGraphicalObjects(java.lang.String pattern)
public void setGraphicalObjectsColour(java.lang.String pattern,
int colour)
public void setGraphicalObjectsVisibility(java.lang.String pattern,
int state)
public void removeGraphicalObjects(java.lang.String pattern)
public void removeGraphicalObjects(Tmesh tm)
public void removeGraphicalObjectsBeginningWith(java.lang.String prefix)
public void applyTexture(java.lang.String pattern,
java.lang.String texName)
public void scaleTexture(java.lang.String pattern,
int attribute,
double value)
public void setBackface(java.lang.String pattern,
boolean value)
public void postProcess()
public void drawObjects()
public double getOverallScale()
public void buildOverallMatrix()
public void rotateX(double degrees)
public void rotateY(double degrees)
public void rotateZ(double degrees)
public void applyTransform2(double x,
double y,
double z,
int[] s)
public void applyTransform(double x,
double y,
double z,
double[] s)
public void transformNormal(double x,
double y,
double z,
double[] s)
public void drawCylinder(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
int rgb1,
int rgb2,
double r)
public void drawSphere(double x,
double y,
double z,
double r,
int rgb)
public void drawSphere(double x,
double y,
double z,
double r,
int rgb,
int transp)
public void drawBox(int xt,
int yt,
int zt,
int width,
int c)
public void drawPixels(double x,
double y,
double z,
int w,
int h,
int[] pix,
int hints)
public void drawDirectString(int x,
int y,
int color,
java.lang.String string)
public void drawString(double x,
double y,
double z,
int color,
java.lang.String string)
public void drawString(double x,
double y,
double z,
double zoff,
int color,
java.lang.String string)
public void drawZImage(double x,
double y,
double z,
int[] pix,
int w,
int h)
public void drawDot(int xt,
int yt,
int zt,
int c)
public void setPixel(int x,
int y,
int z,
int c)
public void setPixel(int x,
int y,
int c)
public int getPixel(int x,
int y)
public void drawLine(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
int rgb1,
int rgb2,
int pixelWidth)
public void drawLine(int x1,
int y1,
int z1,
int x2,
int y2,
int z2,
int rgb1,
int rgb2,
int lineWidth)
public void setDrawGamma(double d)
public void drawAntiAliasedLine(int x0,
int y0,
int z0,
int x1,
int y1,
int z1,
int Colour0,
int Colour1)
public void publicRedraw()
public void redraw()
public void setDisplayStatusString(boolean b)
public void setLogo(java.lang.String newLogo)
public java.lang.String getLogo()
public void setStatusString(java.lang.String newStatusString)
public java.lang.String getStatusString()
public void setSize(int width,
int height)
public void setSamples(int s)
public int getSamples()
public void setColor(int newc)
public void setPowFactor(double d)
public void setWrapAngle(double d)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||