|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Renderer
Base class for all renderer objects which renders 3-D polygon meshes.
| Field Summary | |
protected static float |
AMBIENT_BLUE
Default blue ambient value |
protected static float |
AMBIENT_GREEN
Default Green ambient value |
protected static float |
AMBIENT_RED
Default red ambient value |
protected Image |
backingStore
The backing store. |
static String |
CS_REALWORLD
The real world coordinate system name. |
protected static float |
FATT_C1
The first constant for the attenuation factor. |
protected static float |
FATT_C2
The second constant for the attenuation factor. |
protected static float |
FATT_C3
The third constant for the attenuation factor. |
protected Metafile |
metafile
The metafile containing the specification of the polygon meshes. |
protected Component |
owner
The owner component. |
protected ViewPlane |
viewPlane
The view plane on which to project the polygon mesh. |
| Constructor Summary | |
Renderer(Component owner)
Creates the renderer to draw in the owner component. |
|
| Method Summary | |
void |
drawGrid(Graphics2D g,
int xspace,
int yspace)
draws a grid. |
Metafile |
getMetafile()
Returns the current metafile of the renderer, |
Dimension |
getSize()
Returns how big the display size should be. |
protected void |
initBackingStore()
Creates an image for the backing store. |
protected Jama.Matrix |
makeParallelProjection()
Creates a parallel projection matrix. |
protected Jama.Matrix |
makePerspectiveProjection()
Creates a perspective projection matrix. |
void |
moveCamera(double dx,
double dy,
double dz)
Translates the camera. |
protected void |
notifyDataChanged()
Called when there are changes to the Renderer data. |
static boolean |
overlaps(double min1,
double max1,
double min2,
double max2)
Determines if two sets of range values overlaps |
void |
paint(Graphics2D g)
Renders the 3-D scene. |
protected static Jama.Matrix |
parallelProjection(double l,
double psi)
Returns a 4x4 homogeneous matrix for parallel projection |
void |
render()
Called to re-render the image internally. |
void |
rotateCameraX(double degs)
Rotates the camera by the X axis. |
void |
rotateCameraY(double degs)
Rotates the camera by the Y axis. |
void |
rotateCameraZ(double degs)
Rotates the camera by the Z axis. |
void |
rotateCoorSysX(String name,
double degs)
Rotates a coordinate system by the X axis. |
void |
rotateCoorSysY(String name,
double degs)
Rotates a coordinate system by the Y axis. |
void |
rotateCoorSysZ(String name,
double degs)
Rotates a coordinate system by the Z axis. |
void |
setMetafile(Metafile m)
Sets a new metafile. |
protected void |
setupCartesian(Graphics2D g)
Modifies the Graphic object coordinate system to cartesian. |
void |
translateCoorSys(String name,
double dx,
double dy,
double dz)
Translates a coordinate system. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected ViewPlane viewPlane
protected Metafile metafile
protected Component owner
protected Image backingStore
public static final String CS_REALWORLD
protected static final float AMBIENT_RED
protected static final float AMBIENT_GREEN
protected static final float AMBIENT_BLUE
protected static final float FATT_C1
protected static final float FATT_C2
protected static final float FATT_C3
| Constructor Detail |
public Renderer(Component owner)
| Method Detail |
public void render()
public void paint(Graphics2D g)
g - the graphics context.public void setMetafile(Metafile m)
m - the metafile.public Metafile getMetafile()
public void moveCamera(double dx,
double dy,
double dz)
dx - x-delta.dy - y-delta.dz - z-delta.public void rotateCameraX(double degs)
degs - the rotation angle, in degrees.public void rotateCameraY(double degs)
degs - the rotation angle, in degrees.public void rotateCameraZ(double degs)
degs - the rotation angle, in degrees.
public void translateCoorSys(String name,
double dx,
double dy,
double dz)
name - the coordinate system name.dx - x-delta.dy - y-delta.dz - z-delta.
public void rotateCoorSysX(String name,
double degs)
name - the coordinate system name.degs - the rotation angle, in degrees.
public void rotateCoorSysY(String name,
double degs)
name - the coordinate system name.degs - the rotation angle, in degrees.
public void rotateCoorSysZ(String name,
double degs)
name - the coordinate system name.degs - the rotation angle, in degrees.public Dimension getSize()
public void drawGrid(Graphics2D g,
int xspace,
int yspace)
g - the graphics context.xspace - the spacing of vertical lines.yspace - the spacing or horizontal linesprotected void notifyDataChanged()
protected static Jama.Matrix parallelProjection(double l,
double psi)
protected Jama.Matrix makeParallelProjection()
protected Jama.Matrix makePerspectiveProjection()
public static final boolean overlaps(double min1,
double max1,
double min2,
double max2)
protected void initBackingStore()
backingStoreprotected void setupCartesian(Graphics2D g)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||