Exemple #1
0
void Figure::InitVertical( )
{
	int figure_0_row = figure[ 0 ].row;
	int figure_0_col = figure[ 0 ].col;
	switch( type )
	{
	case LINE:
		{
			InitLineVertical( );

			break;
		}
	case LEFT_Z:
		{
			InitLeftZVertical( );

			break;
		}
	case RIGHT_Z:
		{
			InitRightZVertical( );

			break;
		}
	case LEFT_L:
		{
			InitLeftLVertical( );

			break;
		}
	case RIGHT_L:
		{
			InitRightLVertical( );

			break;
		}
	case SQUARE:
		{
			InitSquare( );

			break;
		}
	}
}
Exemple #2
0
//http://www.opengl.org/discussion_boards/showthread.php/176961-Modelview-translation-with-GLM
//////////////////////////////////////////////////////////////////////////////////
//
//  Just hard code the geometry
//
void InitGeometry()
{
	vector <Vertex> verts;
	vector <GLuint> indices;

	GLfloat b[3]= {0.0,0.0,1.0};
	GLfloat r[3]= {1.0,0.0,0.0};

	InitSquare(verts,indices);
	cout <<" verts size "<<verts.size()<<" indice "<<indices.size()<<endl;
	vertxLists.push_back(verts);
	tindicesLists.push_back(indices);
	verts.clear();
	indices.clear();

	createSphere(3,20,20,r,verts,indices);
	vertxLists.push_back(verts);
	tindicesLists.push_back(indices);
	verts.clear();
	indices.clear();

	createConics(0.5,0.5,2.0,12,12,r,verts,indices);
	vertxLists.push_back(verts);
	tindicesLists.push_back(indices);
	verts.clear();
	indices.clear();

	createCube(verts,indices);
	vertxLists.push_back(verts);
	tindicesLists.push_back(indices);
	verts.clear();
	indices.clear();

	readMeshData("/home/arindam/Course/lab3/cse5542Lab3/dragon.off",verts,indices);
	vertxLists.push_back(verts);
	tindicesLists.push_back(indices);
	verts.clear();
	indices.clear();
	/*
        // square
        InitSquare(verts,indices);
        cout <<" verts size "<<verts.size()<<" indice "<<indices.size()<<endl;
        vertxLists.push_back(verts);
        tindicesLists.push_back(indices);
        verts.clear();
        indices.clear();
	 */
	/*
    readMeshData("/home/arindam/Course/lab3/cse5542Lab3/dragon.off",verts,indices);
    vertxLists.push_back(verts);
    tindicesLists.push_back(indices);
    verts.clear();
    indices.clear();

    createSphere(2,20,20,r,verts,indices);
    vertxLists.push_back(verts);
    tindicesLists.push_back(indices);
    verts.clear();
    indices.clear();

    createConics(0.5,0.5,2.0,10,10,r,verts,indices);
    vertxLists.push_back(verts);
    tindicesLists.push_back(indices);
    verts.clear();
    indices.clear();

    createConics(1.0,1.0,2.0,10,10,r,verts,indices);
    vertxLists.push_back(verts);
    tindicesLists.push_back(indices);
    verts.clear();
    indices.clear();

    readMeshData("/home/arindam/Course/lab3/cse5542Lab3/bunny.off",verts,indices);
    vertxLists.push_back(verts);
    tindicesLists.push_back(indices);
    verts.clear();
    indices.clear();
	 */
}