CS代写|CS 5200 Homework 2 Conceptual design using UML notation


1 Overview

This assignment has 2 major deliverables Part A – OpenGL Scene Renderer and Part B – Unity
Environment. You should complete and submit part A before you begin part B.

Assignment 2 overall is worth 50% towards your grade and has two sub-assessment items:

Part A – OpenGL Scene Renderer (50%)
Part B – Unity Environment (50%)

2 Part A – OpenGL Scene Renderer Introduction

In this assignment you will implement a scene viewer in OpenGL. The assignment is structured to
gradually introduce more advanced OpenGL concepts, beginning with a simple triangle. Each step
introduces a new aspect of OpenGL.

For best results complete the steps in the order given (Extensions can be completed in any order).

2.1 Overview of Starting Code

The assignment includes many Java classes. Some of these you will need to modify when you
implement the assignment, and others do things for you.

2.1.1 Packaging

The starting code is structured into Java packages to make it easier to keep things organised. Four
packages are provided:

inft3032.assign This package contains the main Assignment class, which starts the program.
It also contains the AssignGLListener that you will implement to build your

inft3032.drawables This package contains classes that can be rendered on screen. You will need
to modify many of these classes to have them render on screen.

inft3032.lighting This package contains classes for different lights. You will need to use these
classes to implement lighting in your scene viewer.

inft3032.math This package contains the math classes that you will need to use when
performing mathematical operations.

inft3032.scene This package contains the scene loader and scene specific classes that are
not drawables. You will need to use Scene to decide what to render, and
Camera to calculate the view and projection matrices.

2.1.2 Classes you will modify

• AssignGLListener
• Box
• Cone
• Cylinder
• Geometry
• Sphere
• Texture
• Triangle

2.1.3 Shaders

You will also need to write several GLSL shaders. Empty, correctly named, shader files can be found in
the shaders directory.

2.2 Starting your implementation

A set of suggested steps is provided below to walk you through the assignment. There are a number of
optional features you may attempt once the basic rendering is working. Please refer to the marking
sheet below to help you decide which are optimal for your final grade.

2.2.1 An Empty Window

At the end of this step you will have a black window on screen. This may not sound like much but
you’ll have a lot of the groundwork taken care of. Do the following:

1. Get the starting code into your IDE of choice and make sure everything compiles

2. Modify AssignEventListener’s init method:
a. Set the clear colour to black
b. Enable back-face culling

3. Modify AssignEventListner’s display method:
a. Clear the depth and color buffers Result: