void init(){ // glMatrixMode(GL_PROJECTION); // glLoadIdentity(); // gluOrtho2D(0.0, IslandWidth, IslandHeight, 0.0); // Call random point generator IslandMode = inputter(&pointMode); generateRandomPoints(&setPoints, numberofPoints); vd = generateVoronoi(&setPoints, numberofPoints); // Define elevation circlePointCt = terrainInput(elevation, biomesInformation, circleVertices, circleColors, perlinOffsets, pointMode, IslandMode); perlinArray = convertToArray(perlinOffsets); idx = VoronoiVerticesColors(vd, &voronoiPoints, &voronoiColors); // Adjust voronoi points voronoiVertices = adjustVoronoi(&voronoiPoints, &voronoiColors, elevation, circleColors, idx); // Find coords voronoiCoords = findCoords(&voronoiPoints, idx); // Find normals voronoiNormals = findNormals(voronoiVertices, idx); // Initialize shaders initShadersVAOS(); }
JSON JSON::pop() { convertToArray(); return m_array.pop(); }
void JSON::push(const JSON& item) { convertToArray(); return m_array.push(item); }
JSON& JSON::operator[] (Size iArrayIndex) { convertToArray(); return m_array[iArrayIndex]; }
void var::resize (const int numArrayElementsWanted) { convertToArray()->resize (numArrayElementsWanted); }
void var::insert (const int index, const var& n) { convertToArray()->insert (index, n); }
void var::append (const var& n) { convertToArray()->add (n); }