de.grogra.imp3d
public class WireframeCanvas extends CanvasAdapter implements RenderState, Selectable
CanvasAdapter.CanvasComponent| Modifier and Type | Field and Description |
|---|---|
protected static int |
COLOR |
protected static int |
DRAW_POLY |
protected static int |
DRAW_RECT |
protected static int |
FILL_POLY |
protected static int |
FILL_RECT |
protected static int |
FONT |
protected static int |
ICON |
protected static int |
LINE |
static int |
OVERLAY |
Pool |
pool |
protected static int |
STRING |
antialiasing, IDENTITY, sceneBufferDISPOSED, DISPOSING, RENDERED_IMAGE, RENDERING, REPAINT_MASKCURRENT_HIGHLIGHTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHALL, CHANGED, MIN_USER_FLAG, SCENE, SELECTION, TOOLS| Constructor and Description |
|---|
WireframeCanvas() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeLayer() |
void |
drawBox(float halfWidth,
float halfLength,
float height,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawFrustum(float height,
float baseRadius,
float topRadius,
boolean baseClosed,
boolean topClosed,
float scaleV,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawFrustumIrregular(float height,
int sectorCount,
float[] baseRadii,
float[] topRadii,
boolean baseClosed,
boolean topClosed,
float scaleV,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawIcon(int vertex,
int dx,
int dy,
javax.swing.Icon icon) |
void |
drawLamella(float halfWidth,
float halfLength,
float height,
float a,
float b,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawLine(int v1,
int v2) |
void |
drawLine(int v1,
int v2,
boolean accentuated) |
void |
drawLine(Tuple3f origin,
Tuple3f end,
Tuple3f color,
int highlight,
Matrix4d t) |
protected void |
drawOverlay(int type) |
void |
drawParallelogram(float height,
Vector3f secondAxis,
float scaleU,
float scaleV,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawPlane(Shader sh,
int highlight,
Matrix4d t) |
void |
drawPoint(Tuple3f origin,
int size,
Tuple3f color,
int highlight,
Matrix4d t) |
void |
drawPointCloud(float[] locations,
float pointSize,
Tuple3f color,
int highlight,
Matrix4d t)
Draw a set of points.
|
void |
drawPolygon(int vertex,
java.awt.Polygon polygon) |
void |
drawPolygons(Polygonizable pz,
java.lang.Object obj,
boolean asNode,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawPrismRectangular(float y,
float xPos,
float xNeg,
float zPos,
float zNeg,
int highlight,
Matrix4d t) |
void |
drawRect(int vertex,
int dx,
int dy,
int width,
int height) |
void |
drawRectangle(int x,
int y,
int w,
int h,
Tuple3f color) |
void |
drawSphere(float radius,
Shader sh,
int highlight,
Matrix4d t) |
void |
drawString(int vertex,
int dx,
int dy,
java.lang.String s) |
void |
drawString(int x,
int y,
java.lang.String text,
java.awt.Font font,
Tuple3f color) |
void |
drawSupershape(float a,
float b,
float m1,
float n11,
float n12,
float n13,
float m2,
float n21,
float n22,
float n23,
Shader sh,
int highlight,
Matrix4d t)
Draw a supershape around the origin (0/0/0).
|
void |
drawTextBlock(java.lang.String caption,
java.awt.Font font,
float depth,
Shader s,
int highlight,
Matrix4d t) |
float |
estimateScaleAt(Tuple3f point) |
void |
fillPolygon(int vertex,
java.awt.Polygon polygon) |
void |
fillRect(int vertex,
int dx,
int dy,
int width,
int height) |
void |
fillRectangle(int x,
int y,
int w,
int h,
Tuple3f color) |
protected void |
finalizePaint() |
java.awt.Color |
getColor() |
int |
getCurrentHighlight() |
Shader |
getCurrentShader() |
Pool |
getPool() |
View3D |
getView3D() |
boolean |
getWindowPos(Tuple3f origin,
Tuple2f out)
Computes the window coordinates in pixels of a location
in the current object coordinates.
|
protected void |
initPaint(int flags,
int width,
int height) |
void |
initView(View view,
EventListener listener)
Initializes this component.
|
void |
openLayer(int layer) |
protected void |
optionValueChanged(java.lang.String name,
java.lang.Object value) |
protected void |
paintHighlight(int flags,
java.awt.Graphics2D g) |
protected void |
paintScene(int flags,
java.awt.Graphics2D g) |
void |
setColor(java.awt.Color color) |
void |
setFont(java.awt.Font font) |
void |
setVertex(int index,
double x,
double y,
double z,
Matrix4d t) |
void |
setVertex(int index,
float x,
float y,
float z) |
void |
setVertex(int index,
Tuple3d v) |
void |
setVertex(int index,
Tuple3d v,
Matrix4d t) |
void |
setVertex(int index,
Tuple3f v) |
void |
setVertex(int index,
Tuple3f v,
Matrix4d t) |
checkBuffers, getComponent, getGraphics, getObserverForRenderer, imageUpdate, initCanvas, initRender, invokeRender, makeSnapshot, render, resetGraphicsTransform, setColor, setColor, setColor, setColor, setColor, writeEPScheckRepaint, checkRepaintWrapException, dispose, disposeRenderer, getColor, getColor, getFactory, getFontMetrics, getGlobalLOD, getIntColor, getInterruptedException, getOption, getRenderGraphState, getView, initFactory, installListeners, invokeRenderSync, render, render, renderUninterruptibly, repaint, run, toSelection, uninstallListenersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFontMetrics, getRenderGraphStatetoSelectionprotected static final int COLOR
protected static final int DRAW_POLY
protected static final int DRAW_RECT
protected static final int FILL_POLY
protected static final int FILL_RECT
protected static final int FONT
protected static final int ICON
protected static final int LINE
public static final int OVERLAY
public final Pool pool
protected static final int STRING
public final void closeLayer()
public void drawBox(float halfWidth,
float halfLength,
float height,
Shader sh,
int highlight,
Matrix4d t)
drawBox in interface RenderStatepublic void drawFrustum(float height,
float baseRadius,
float topRadius,
boolean baseClosed,
boolean topClosed,
float scaleV,
Shader sh,
int highlight,
Matrix4d t)
drawFrustum in interface RenderStatepublic void drawFrustumIrregular(float height,
int sectorCount,
float[] baseRadii,
float[] topRadii,
boolean baseClosed,
boolean topClosed,
float scaleV,
Shader sh,
int highlight,
Matrix4d t)
drawFrustumIrregular in interface RenderStatepublic final void drawIcon(int vertex,
int dx,
int dy,
javax.swing.Icon icon)
public void drawLamella(float halfWidth,
float halfLength,
float height,
float a,
float b,
Shader sh,
int highlight,
Matrix4d t)
drawLamella in interface RenderStatea - amplitudeb - frequencypublic final void drawLine(int v1,
int v2)
public final void drawLine(int v1,
int v2,
boolean accentuated)
public void drawLine(Tuple3f origin, Tuple3f end, Tuple3f color, int highlight, Matrix4d t)
drawLine in interface RenderStateprotected void drawOverlay(int type)
public void drawParallelogram(float height,
Vector3f secondAxis,
float scaleU,
float scaleV,
Shader sh,
int highlight,
Matrix4d t)
drawParallelogram in interface RenderStatepublic void drawPlane(Shader sh, int highlight, Matrix4d t)
drawPlane in interface RenderStatepublic void drawPoint(Tuple3f origin, int size, Tuple3f color, int highlight, Matrix4d t)
drawPoint in interface RenderStatepublic void drawPointCloud(float[] locations,
float pointSize,
Tuple3f color,
int highlight,
Matrix4d t)
RenderStatedrawPointCloud in interface RenderStatelocations - array containing a sequence (x,y,z) of pointspointSize - size of the point on screencolor - color of the pointt - transformation of the point cloudpublic final void drawPolygon(int vertex,
java.awt.Polygon polygon)
public void drawPolygons(Polygonizable pz, java.lang.Object obj, boolean asNode, Shader sh, int highlight, Matrix4d t)
drawPolygons in interface RenderStatepublic void drawPrismRectangular(float y,
float xPos,
float xNeg,
float zPos,
float zNeg,
int highlight,
Matrix4d t)
drawPrismRectangular in interface RenderStatepublic final void drawRect(int vertex,
int dx,
int dy,
int width,
int height)
public void drawRectangle(int x,
int y,
int w,
int h,
Tuple3f color)
drawRectangle in interface RenderStatepublic void drawSphere(float radius,
Shader sh,
int highlight,
Matrix4d t)
drawSphere in interface RenderStatepublic final void drawString(int vertex,
int dx,
int dy,
java.lang.String s)
public void drawString(int x,
int y,
java.lang.String text,
java.awt.Font font,
Tuple3f color)
drawString in interface RenderStatepublic void drawSupershape(float a,
float b,
float m1,
float n11,
float n12,
float n13,
float m2,
float n21,
float n22,
float n23,
Shader sh,
int highlight,
Matrix4d t)
drawSupershape in interface RenderStatea, - b length of curvesm, - n shape parametersshader - highlight - t - transformation of the point cloudpublic void drawTextBlock(java.lang.String caption,
java.awt.Font font,
float depth,
Shader s,
int highlight,
Matrix4d t)
drawTextBlock in interface RenderStatepublic float estimateScaleAt(Tuple3f point)
estimateScaleAt in interface RenderStatepublic final void fillPolygon(int vertex,
java.awt.Polygon polygon)
public final void fillRect(int vertex,
int dx,
int dy,
int width,
int height)
public void fillRectangle(int x,
int y,
int w,
int h,
Tuple3f color)
fillRectangle in interface RenderStateprotected void finalizePaint()
public final java.awt.Color getColor()
public int getCurrentHighlight()
getCurrentHighlight in interface RenderStatepublic Shader getCurrentShader()
getCurrentShader in interface RenderStatepublic Pool getPool()
getPool in interface RenderStatepublic View3D getView3D()
public boolean getWindowPos(Tuple3f origin, Tuple2f out)
RenderStategetWindowPos in interface RenderStateorigin - a location in local object coordinatesout - the computed window coordinates are placed in heretrue iff the window coordinates are valid
(i.e., the location is in the clipping region)protected void initPaint(int flags,
int width,
int height)
initPaint in class CanvasAdapterpublic void initView(View view, EventListener listener)
ViewComponentview
within which this view component is used to display the graph.
It also sets an event listener. this has to be informed of
mouse and keys events within the view component by implementations
of this method.initView in interface ViewComponentinitView in class CanvasAdapterview - the containing viewlistener - mouse and key events will be reported to this listenerpublic final void openLayer(int layer)
protected void optionValueChanged(java.lang.String name,
java.lang.Object value)
optionValueChanged in class CanvasAdapterprotected void paintHighlight(int flags,
java.awt.Graphics2D g)
paintHighlight in class CanvasAdapterprotected void paintScene(int flags,
java.awt.Graphics2D g)
throws java.lang.InterruptedException
paintScene in class CanvasAdapterjava.lang.InterruptedExceptionpublic void setColor(java.awt.Color color)
setColor in class CanvasAdapterpublic final void setFont(java.awt.Font font)
public final void setVertex(int index,
double x,
double y,
double z,
Matrix4d t)
public final void setVertex(int index,
float x,
float y,
float z)
public final void setVertex(int index,
Tuple3d v)
public final void setVertex(int index,
Tuple3f v)