projects
/
sixth-3d-demos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
335758c
)
Removed ViewContext.
author
Svjatoslav Agejenko
<svjatoslav@svjatoslav.eu>
Fri, 13 Jul 2018 23:44:52 +0000
(
02:44
+0300)
committer
Svjatoslav Agejenko
<svjatoslav@svjatoslav.eu>
Fri, 13 Jul 2018 23:44:52 +0000
(
02:44
+0300)
src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/RandomPolygonsDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java
patch
|
blob
|
history
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java
index
e2ee634
..
5e2009d
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/GraphDemo.java
@@
-22,7
+22,7
@@
public class GraphDemo {
private static final double scale = 50d;
private static final double scale = 50d;
- private static Graph getCosin
us
Graph(final Point3D location)
+ private static Graph getCosin
e
Graph(final Point3D location)
throws IOException {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
throws IOException {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
@@
-32,7
+32,7
@@
public class GraphDemo {
data.add(p);
}
data.add(p);
}
- return new Graph(scale, data, "Cosin
us
", location);
+ return new Graph(scale, data, "Cosin
e
", location);
}
private static Graph getFormula1Graph(final Point3D location)
}
private static Graph getFormula1Graph(final Point3D location)
@@
-74,7
+74,7
@@
public class GraphDemo {
return new Graph(scale, data, "y = sin(x/2) + sin(x/1.26)", location);
}
return new Graph(scale, data, "y = sin(x/2) + sin(x/1.26)", location);
}
- private static Graph getSin
us
Graph(final Point3D location)
+ private static Graph getSin
e
Graph(final Point3D location)
throws IOException {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
throws IOException {
final List<Point2D> data = new ArrayList<>();
for (double x = 0; x < 20; x += 0.25) {
@@
-84,7
+84,7
@@
public class GraphDemo {
data.add(p);
}
data.add(p);
}
- return new Graph(scale, data, "Sin
us
", location);
+ return new Graph(scale, data, "Sin
e
", location);
}
private static Graph getTangentGraph(final Point3D location)
}
private static Graph getTangentGraph(final Point3D location)
@@
-110,16
+110,16
@@
public class GraphDemo {
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection geometryCollection = viewFrame.getViewPanel()
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection geometryCollection = viewFrame.getViewPanel()
- .get
Context().get
RootShapeCollection();
+ .getRootShapeCollection();
Point3D location = new Point3D(-600, -300, 0);
Point3D location = new Point3D(-600, -300, 0);
- geometryCollection.addShape(getSin
us
Graph(location));
+ geometryCollection.addShape(getSin
e
Graph(location));
location = new Point3D(600, -300, 0);
geometryCollection.addShape(getFormula1Graph(location));
location = new Point3D(-600, 0, 0);
location = new Point3D(600, -300, 0);
geometryCollection.addShape(getFormula1Graph(location));
location = new Point3D(-600, 0, 0);
- geometryCollection.addShape(getCosin
us
Graph(location));
+ geometryCollection.addShape(getCosin
e
Graph(location));
location = new Point3D(600, 0, 0);
geometryCollection.addShape(getFormula2Graph(location));
location = new Point3D(600, 0, 0);
geometryCollection.addShape(getFormula2Graph(location));
@@
-130,7
+130,7
@@
public class GraphDemo {
location = new Point3D(600, 300, 0);
geometryCollection.addShape(getFormula3Graph(location));
location = new Point3D(600, 300, 0);
geometryCollection.addShape(getFormula3Graph(location));
- viewFrame.getViewPanel().get
Context().get
Avatar()
+ viewFrame.getViewPanel().getAvatar()
.setLocation(new Point3D(0, 0, -500));
}
.setLocation(new Point3D(0, 0, -500));
}
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java
index
f5a9d08
..
5e5e15f
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/OctreeDemo.java
@@
-9,8
+9,8
@@
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
+import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
import eu.svjatoslav.sixth.e3d.math.Transform;
import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.gui.ViewContext;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker;
import eu.svjatoslav.sixth.e3d.renderer.octree.OctreeVolume;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker;
import eu.svjatoslav.sixth.e3d.renderer.octree.OctreeVolume;
@@
-37,7
+37,7
@@
public class OctreeDemo extends WorldNavigationTracker {
private final Vector<LightSource> lights = new Vector<>();
private OctreeVolume octreeVolume;
private ShapeCollection shapeCollection;
private final Vector<LightSource> lights = new Vector<>();
private OctreeVolume octreeVolume;
private ShapeCollection shapeCollection;
- private View
Context context
;
+ private View
Panel viewPanel
;
public static void main(final String[] args) {
new OctreeDemo().init();
public static void main(final String[] args) {
new OctreeDemo().init();
@@
-90,13
+90,13
@@
public class OctreeDemo extends WorldNavigationTracker {
private void init() {
final ViewFrame viewFrame = new ViewFrame();
private void init() {
final ViewFrame viewFrame = new ViewFrame();
-
context = viewFrame.getViewPanel().getContext
();
+
viewPanel = viewFrame.getViewPanel
();
-
context
.getAvatar().setLocation(new Point3D(0, -30, -300));
+
viewPanel
.getAvatar().setLocation(new Point3D(0, -30, -300));
octreeVolume = new OctreeVolume();
octreeVolume = new OctreeVolume();
- shapeCollection =
context
.getRootShapeCollection();
+ shapeCollection =
viewPanel
.getRootShapeCollection();
shapeCollection.addShape(new Grid3D(
new Point3D(-10000, -10000, -10000), new Point3D(10000, 10000,
shapeCollection.addShape(new Grid3D(
new Point3D(-10000, -10000, -10000), new Point3D(10000, 10000,
@@
-124,18
+124,18
@@
public class OctreeDemo extends WorldNavigationTracker {
Color.WHITE, Color.PURPLE);
shapeCollection.addShape(message);
Color.WHITE, Color.PURPLE);
shapeCollection.addShape(message);
-
context
.getKeyboardFocusTracker().setFocusOwner(this);
-
context.getViewPanel()
.repaintDuringNextViewUpdate();
+
viewPanel
.getKeyboardFocusTracker().setFocusOwner(this);
+
viewPanel
.repaintDuringNextViewUpdate();
}
@Override
}
@Override
- public void keyPressed(final KeyEvent event, final View
Context viewContext
) {
+ public void keyPressed(final KeyEvent event, final View
Panel viewPanel
) {
if ('r' == event.getKeyChar()) {
raytrace();
return;
}
if ('r' == event.getKeyChar()) {
raytrace();
return;
}
- super.keyPressed(event, view
Context
);
+ super.keyPressed(event, view
Panel
);
}
private void putPixel(final int x, final int y, final int z,
}
private void putPixel(final int x, final int y, final int z,
@@
-159,12
+159,12
@@
public class OctreeDemo extends WorldNavigationTracker {
private void raytrace() {
// create and add camera object to scene
private void raytrace() {
// create and add camera object to scene
- final Camera camera = new Camera(
context
.getAvatar(), magnification);
+ final Camera camera = new Camera(
viewPanel
.getAvatar(), magnification);
shapeCollection.addShape(camera);
// initialize and start Raytracer in a separate thread
final RayTracer rayTracer = new RayTracer(camera.getTexture(),
shapeCollection.addShape(camera);
// initialize and start Raytracer in a separate thread
final RayTracer rayTracer = new RayTracer(camera.getTexture(),
- octreeVolume, lights, camera,
context.getViewPanel()
);
+ octreeVolume, lights, camera,
viewPanel
);
final Thread thread = new Thread(rayTracer);
thread.start();
}
final Thread thread = new Thread(rayTracer);
thread.start();
}
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java
index
63d1b38
..
0729693
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/PointCloudDemo.java
@@
-21,7
+21,7
@@
public class PointCloudDemo {
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection geometryCollection = viewFrame.getViewPanel()
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection geometryCollection = viewFrame.getViewPanel()
- .get
Context().get
RootShapeCollection();
+ .getRootShapeCollection();
Transform transform = new Transform(new Point3D(0, -1000, 1000), 0, 0);
Transform transform = new Transform(new Point3D(0, -1000, 1000), 0, 0);
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java
index
557d5ff
..
b88a105
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/RainingNumbersDemo.java
@@
-9,8
+9,8
@@
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
+import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
import eu.svjatoslav.sixth.e3d.math.Transform;
import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.gui.ViewContext;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.ViewRenderListener;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.ViewRenderListener;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
@@
-33,10
+33,10
@@
public class RainingNumbersDemo implements ViewRenderListener {
}
@Override
}
@Override
- public boolean beforeRender(final View
Context viewContext
,
+ public boolean beforeRender(final View
Panel viewPanel
,
final int millisecondsSinceLastFrame) {
final int millisecondsSinceLastFrame) {
- final Collection<AbstractShape> shapes = view
Context
+ final Collection<AbstractShape> shapes = view
Panel
.getRootShapeCollection().getShapes();
final double translateAmount = millisecondsSinceLastFrame / 50d;
.getRootShapeCollection().getShapes();
final double translateAmount = millisecondsSinceLastFrame / 50d;
@@
-53,11
+53,11
@@
public class RainingNumbersDemo implements ViewRenderListener {
return true;
}
return true;
}
- private void run()
throws IOException
{
+ private void run() {
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection geometryCollection = viewFrame.getViewPanel()
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection geometryCollection = viewFrame.getViewPanel()
- .get
Context().get
RootShapeCollection();
+ .getRootShapeCollection();
Random random = new Random();
Random random = new Random();
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/RandomPolygonsDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/RandomPolygonsDemo.java
index
7534148
..
4f26470
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/RandomPolygonsDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/RandomPolygonsDemo.java
@@
-62,7
+62,7
@@
public class RandomPolygonsDemo {
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection shapeCollection = viewFrame.getViewPanel()
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection shapeCollection = viewFrame.getViewPanel()
- .get
Context().get
RootShapeCollection();
+ .getRootShapeCollection();
// add grid
final LineAppearance appearance = new LineAppearance(5, new Color(100,
// add grid
final LineAppearance appearance = new LineAppearance(5, new Color(100,
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java
index
d89486f
..
24b455f
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/SphereDemo.java
@@
-9,8
+9,8
@@
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.gui.ViewContext;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
+import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
@@
-56,9
+56,9
@@
public class SphereDemo {
public static void main(final String[] args) {
final ViewFrame viewFrame = new ViewFrame();
public static void main(final String[] args) {
final ViewFrame viewFrame = new ViewFrame();
- final View
Context context = viewFrame.getViewPanel().getContext
();
+ final View
Panel viewPanel = viewFrame.getViewPanel
();
- final ShapeCollection geometryCollection =
context
+ final ShapeCollection geometryCollection =
viewPanel
.getRootShapeCollection();
final LineAppearance appearance = new LineAppearance(4, new Color(255,
.getRootShapeCollection();
final LineAppearance appearance = new LineAppearance(4, new Color(255,
@@
-72,7
+72,7
@@
public class SphereDemo {
makeWobblySurface(geometryCollection, 200);
makeWobblySurface(geometryCollection, -200);
makeWobblySurface(geometryCollection, 200);
makeWobblySurface(geometryCollection, -200);
-
context
.getAvatar().setLocation(new Point3D(0, 0, -340));
+
viewPanel
.getAvatar().setLocation(new Point3D(0, 0, -340));
}
}
}
}
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java
index
ea2a867
..
4cc2a75
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java
@@
-11,8
+11,8
@@
package eu.svjatoslav.sixth.e3d.examples;
import eu.svjatoslav.sixth.e3d.geometry.Point2D;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
import eu.svjatoslav.sixth.e3d.geometry.Rectangle;
import eu.svjatoslav.sixth.e3d.geometry.Point2D;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
import eu.svjatoslav.sixth.e3d.geometry.Rectangle;
+import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
import eu.svjatoslav.sixth.e3d.math.Transform;
import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.gui.ViewContext;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.textEditorComponent.TextEditComponent;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.textEditorComponent.TextEditComponent;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
@@
-36,10
+36,10
@@
public class TextEditorDemo {
public static void main(final String[] args) {
final ViewFrame viewFrame = new ViewFrame();
public static void main(final String[] args) {
final ViewFrame viewFrame = new ViewFrame();
- final View
Context viewContext = viewFrame.getViewPanel().getContext
();
+ final View
Panel viewPanel = viewFrame.getViewPanel
();
final ShapeCollection shapeCollection = viewFrame.getViewPanel()
final ShapeCollection shapeCollection = viewFrame.getViewPanel()
- .get
Context().get
RootShapeCollection();
+ .getRootShapeCollection();
shapeCollection.addShape(createGrid());
shapeCollection.addShape(createGrid());
@@
-48,15
+48,15
@@
public class TextEditorDemo {
for (double x = -500 * m; x <= (500 * m); x += 250 * m) {
final TextEditComponent textEditor = new TextEditComponent(
for (double x = -500 * m; x <= (500 * m); x += 250 * m) {
final TextEditComponent textEditor = new TextEditComponent(
- new Transform(new Point3D(x, 0, z)), view
Context
,
+ new Transform(new Point3D(x, 0, z)), view
Panel
,
new Point2D(200, 120));
shapeCollection.addShape(textEditor);
}
new Point2D(200, 120));
shapeCollection.addShape(textEditor);
}
- view
Context
.getAvatar().setLocation(new Point3D(500, -300, -800));
- view
Context
.getAvatar().setAngleXZ(0.6);
- view
Context
.getAvatar().setAngleYZ(-0.5);
+ view
Panel
.getAvatar().setLocation(new Point3D(500, -300, -800));
+ view
Panel
.getAvatar().setAngleXZ(0.6);
+ view
Panel
.getAvatar().setAngleYZ(-0.5);
}
}
}
}
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java
b/src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java
index
99fc3e1
..
3a633df
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/examples/life/Main.java
@@
-2,11
+2,11
@@
package eu.svjatoslav.sixth.e3d.examples.life;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
import eu.svjatoslav.sixth.e3d.geometry.Rectangle;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
import eu.svjatoslav.sixth.e3d.geometry.Rectangle;
-import eu.svjatoslav.sixth.e3d.math.Transform;
import eu.svjatoslav.sixth.e3d.gui.Avatar;
import eu.svjatoslav.sixth.e3d.gui.Avatar;
-import eu.svjatoslav.sixth.e3d.gui.ViewContext;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
import eu.svjatoslav.sixth.e3d.gui.ViewFrame;
+import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker;
import eu.svjatoslav.sixth.e3d.gui.humaninput.WorldNavigationTracker;
+import eu.svjatoslav.sixth.e3d.math.Transform;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
@@
-29,7
+29,7
@@
public class Main extends WorldNavigationTracker {
* Handle keyboard input.
*/
@Override
* Handle keyboard input.
*/
@Override
- public void keyPressed(final KeyEvent event, final View
Context viewContext
) {
+ public void keyPressed(final KeyEvent event, final View
Panel viewPanel
) {
switch (event.getKeyChar()) {
case ' ': // space key
MATRIX.evolve(false);
switch (event.getKeyChar()) {
case ' ': // space key
MATRIX.evolve(false);
@@
-41,7
+41,7
@@
public class Main extends WorldNavigationTracker {
MATRIX.clear();
break;
default:
MATRIX.clear();
break;
default:
- super.keyPressed(event, view
Context
);
+ super.keyPressed(event, view
Panel
);
}
}
}
}
@@
-51,27
+51,27
@@
public class Main extends WorldNavigationTracker {
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection shapeCollection = viewFrame.getViewPanel()
final ViewFrame viewFrame = new ViewFrame();
final ShapeCollection shapeCollection = viewFrame.getViewPanel()
- .get
Context().get
RootShapeCollection();
+ .getRootShapeCollection();
// add matrix
shapeCollection.addShape(MATRIX);
// add matrix
shapeCollection.addShape(MATRIX);
- // add wireframe grid (optional)
+ // add wire
-
frame grid (optional)
shapeCollection.addShape(createGrid());
shapeCollection.addShape(createGrid());
- final View
Context context = viewFrame.getViewPanel().getContext
();
+ final View
Panel viewPanel = viewFrame.getViewPanel
();
- setAvatarOrientation(
context
.getAvatar());
+ setAvatarOrientation(
viewPanel
.getAvatar());
// enable receiving of keyboard events
// enable receiving of keyboard events
-
context
.getKeyboardFocusTracker().setFocusOwner(this);
+
viewPanel
.getKeyboardFocusTracker().setFocusOwner(this);
// Done! World is built. So ensure screen is updated too.
// Done! World is built. So ensure screen is updated too.
-
context.getViewPanel()
.repaintDuringNextViewUpdate();
+
viewPanel
.repaintDuringNextViewUpdate();
}
/**
}
/**
- * Create pink wireframe grid below (for decorative purposes).
+ * Create pink wire
-
frame grid below (for decorative purposes).
*/
private Grid2D createGrid() {
return new Grid2D(
*/
private Grid2D createGrid() {
return new Grid2D(