예제 #1
0
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();

}
예제 #2
0
JSON JSON::pop()
{
	convertToArray();

	return m_array.pop();
}
예제 #3
0
void JSON::push(const JSON& item)
{
	convertToArray();

	return m_array.push(item);
}
예제 #4
0
JSON& JSON::operator[] (Size iArrayIndex)
{
	convertToArray();

	return m_array[iArrayIndex];
}
예제 #5
0
void var::resize (const int numArrayElementsWanted)
{
    convertToArray()->resize (numArrayElementsWanted);
}
예제 #6
0
void var::insert (const int index, const var& n)
{
    convertToArray()->insert (index, n);
}
예제 #7
0
void var::append (const var& n)
{
    convertToArray()->add (n);
}