import graphics3d.Graphics3DFramework; import Graphics3D; // This function is called at the start of the program void onStart ( int rendererID ) { // Optional: Set the window size and background color setWindowSize( 800, 600 ); setBackgroundColor( 0, 0, 0, 255 ); // Create and place the axis model int axis = newAxisModel( 3.0, 3.0, 3.0 ); mountModel( axis, rendererID ); // Create and place a point polygon int point = newPointPolygon( 0.0,0.0,0.0, 0.3 ); mountPolygon( point, rendererID ); // Create and place a line polygon int line = newLinePolygon( 0.0,0.0,0.0, 2.0,2.0,0.0 ); mountPolygon( line, rendererID ); // Create and place a triangle polygon int triangle = newTrianglePolygon( 0.0,0.0,0.0, 1.0,0.0,0.0, 1.0,1.0,0.0 ); mountPolygon( triangle, rendererID ); movePolygon( triangle, 1.0, 0.0, 0.0 ); // Translate position // setPolygonCull( triangle, false, false ); // Uncomment to render back face // Create and place a quadrangle polygon int quad = newQuadranglePolygon( 0.0,0.0,0.0, 1.0,0.0,0.0, 1.0,1.0,0.0, 0.0,1.0,0.0 ); mountPolygon( quad, rendererID ); movePolygon( quad, 0.0, 1.0, 0.0 ); // Translate position // setPolygonCull( quad, false, false ); // Uncomment to render back face }