Processing Forum
public
class Demo1 extends PApplet { private static final long serialVersionUID = 1L; CameraState cameraState ;GL
_gl ;PGraphicsOpenGL
_pgl ;PeasyCam
_camera ; private Mesh3D _mesh ;ArrayList<Word>
_wordDictionary ;MatrixSize
_matrixSize ;ArrayList<Node>
_nodes ;HashMap<String, WordIndex>
_dictionary = new HashMap<String, WordIndex>(); int _numOfMaxWordsToDisplay ;WindowControl
_wc ; private boolean _is_setup=false ; @SuppressWarnings("deprecation" ) public void setup() { if(!_is_setup ){ _is_setup=true ;size(
screen
.
}
hint(
ENABLE_OPENGL_4X_SMOOTH ); this._camera = new PeasyCam(this , 0, 0, 0, 500); try { this._wordDictionary = DataParser.getWordDictionary(); this._matrixSize = DataParser.getMatrixSize(); this._nodes = DataParser.getNodes();}
catch (IOException e) {println(
"read error: " + e.getMessage()); return ;}
if (DataParser.wordsToDisplay == -1) {println(
"ERROR!!!!" ); return ;}
fillDictionary(
_wordDictionary ); // inic Mesh3DMesh3D mesh =
new Mesh3D(_wordDictionary, _matrixSize, _nodes ); this._wc = new WindowControl(this,DataParser.wordsToDisplay , mesh, _nodes ); } @SuppressWarnings("deprecation" ) public void draw() { int screenHeight =}
_gl .glViewport(0, 0, screenHeight, screenWidth); _pgl .endGL();