Removed ViewListener interface. Renamed View to ViewPanel.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / ViewContext.java
1 /*
2  * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of version 3 of the GNU Lesser General Public License
6  * or later as published by the Free Software Foundation.
7  *
8  */
9
10 package eu.svjatoslav.sixth.e3d.gui;
11
12 import eu.svjatoslav.sixth.e3d.gui.humaninput.KeyboardFocusTracker;
13 import eu.svjatoslav.sixth.e3d.gui.humaninput.UserInputTracker;
14 import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection;
15
16 public class ViewContext {
17
18     private final UserInputTracker userInputTracker = new UserInputTracker(this);
19
20     private final KeyboardFocusTracker keyboardFocusTracker = new KeyboardFocusTracker(
21             this);
22
23     private final Avatar avatar = new Avatar();
24
25     private final ViewPanel viewPanel;
26
27     private final ShapeCollection rootShapeCollection = new ShapeCollection();
28
29     public ViewContext(final ViewPanel viewPanel) {
30         this.viewPanel = viewPanel;
31     }
32
33     public Avatar getAvatar() {
34         return avatar;
35     }
36
37     public KeyboardFocusTracker getKeyboardFocusTracker() {
38         return keyboardFocusTracker;
39     }
40
41     public ShapeCollection getRootShapeCollection() {
42         return rootShapeCollection;
43     }
44
45     public UserInputTracker getUserInputTracker() {
46         return userInputTracker;
47     }
48
49     public ViewPanel getViewPanel() {
50         return viewPanel;
51     }
52
53 }