|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.view.Renderer2D
public class Renderer2D
Constructor Summary | |
---|---|
Renderer2D(javax.vecmath.Point3f bottomLeft,
javax.vecmath.Point3f topRight,
int w,
int h)
|
Method Summary | |
---|---|
void |
arrowPath(java.awt.Graphics2D g,
float width,
javax.vecmath.Point3f start,
javax.vecmath.Point3f end)
Draws an arrow head (a triangle) with the base at start and the head at end |
void |
curvePath(java.awt.geom.GeneralPath path,
java.awt.geom.Point2D.Float[] p2f)
Draws a curve in the 2D window |
void |
drawRect(java.awt.Graphics2D g,
javax.vecmath.Point3f pos,
float width,
float height)
|
void |
fillCircle(java.awt.Graphics2D g,
javax.vecmath.Point3f pos,
float size)
|
void |
fillRect(java.awt.Graphics2D g,
javax.vecmath.Point3f pos,
float width,
float height)
|
void |
fillSquare(java.awt.Graphics2D g,
javax.vecmath.Point3f pos,
float size)
|
javax.vecmath.Point2f |
getScreenPoint(float x,
float y)
Converts a x and y floats to a 2D point in the window of specified size |
javax.vecmath.Point2f |
getScreenPoint(java.awt.geom.Point2D.Float p2f)
Converts a 2D float point to a 2D point in the window of specified size |
javax.vecmath.Point2f |
getScreenPoint(javax.vecmath.Point3f p3f)
Converts a 3D point to a 2D point in the window of specified size |
void |
linePath(java.awt.Graphics2D g,
javax.vecmath.Point3f start,
javax.vecmath.Point3f end)
|
float |
scaleX(float x)
scales a value such as a radius to fit the screen horizontal |
float |
scaleY(float y)
scales a value such as a radius to fit the screen vertical |
void |
taperedLinePath(java.awt.Graphics2D g,
float startWidth,
float endWidth,
javax.vecmath.Point3f start,
javax.vecmath.Point3f end)
Draws a tapered line from start to end with end widths as specified |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Renderer2D(javax.vecmath.Point3f bottomLeft, javax.vecmath.Point3f topRight, int w, int h)
bottomLeft
- bottom left corner of bounding boxtopRight
- top right corner of bounding boxw
- width of target screenh
- height of target screenMethod Detail |
---|
public javax.vecmath.Point2f getScreenPoint(javax.vecmath.Point3f p3f)
p3f
- 3D Point to render to the window
public javax.vecmath.Point2f getScreenPoint(java.awt.geom.Point2D.Float p2f)
p2f
- 2D float Point to render to the window
public javax.vecmath.Point2f getScreenPoint(float x, float y)
x
- horizontal float coord to render to the windowy
- vertical float coord to render to the window
public void curvePath(java.awt.geom.GeneralPath path, java.awt.geom.Point2D.Float[] p2f)
path
- add the curve to this pathp2f
- array of points (will be converted to screen points)public void fillSquare(java.awt.Graphics2D g, javax.vecmath.Point3f pos, float size)
public void fillRect(java.awt.Graphics2D g, javax.vecmath.Point3f pos, float width, float height)
public void drawRect(java.awt.Graphics2D g, javax.vecmath.Point3f pos, float width, float height)
public void fillCircle(java.awt.Graphics2D g, javax.vecmath.Point3f pos, float size)
public void linePath(java.awt.Graphics2D g, javax.vecmath.Point3f start, javax.vecmath.Point3f end)
public void arrowPath(java.awt.Graphics2D g, float width, javax.vecmath.Point3f start, javax.vecmath.Point3f end)
g
- width
- start
- end
- public void taperedLinePath(java.awt.Graphics2D g, float startWidth, float endWidth, javax.vecmath.Point3f start, javax.vecmath.Point3f end)
g
- startWidth
- endWidth
- start
- end
- public float scaleX(float x)
x
- value to scale
public float scaleY(float y)
x
- value to scale
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |