Skip to content

CodeGuro/OpenGL-Rutgers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

new features:
-trajectories
	the right-click menu has a new 'follow' option to circle around the animals
	the 'n' key can be pressed to traverse through either animal
-navigation mode
	the arrow keys and 'f' and 'b' keys allow the user to move in the terrarium
	with much more freedom than before, in addition to existing functionality from the previous project
-lighting
	smooth shading, for realistic lighting of materials
	lighting + attenuation, objects closer to light source are lit brighter than objects further away
-textures
	images are loaded into memory from the .BMP format (I did not use a library to do this, thought it'd be more fun to do myself)
	fish have scales, waterbugs are camouflaged on the seabed
	the seabed itself has a texture
	the fish have a more fish-like shape
-fogging
	fog is implemented as well. Objects too far away are harder to see in the water
	you can always use 'bird's eye view' trajectory if you get lost in navigation mode
	to return to the terrarium

controls:
use the x,y,z keys to go in the direction of the axis
in upper case and lower case, the camera travels in the respective axis in the positive and negative direction, respectively
the camera can now move freely as well. Use the arrow keys (up,down,left,right) to change the camera's direction.
Use the 'f' and 'b' keys to move forward or back, respectively, in the direction the camera is facing.
the direction faced is toward (0,0,0) by default
use the left click button for trajectories or a birds eye view
also a custom trajectory can be set by specifying the position, look-at location, and go-to directions
specify them in x y z format, with no commas or parenthesis (i.e. <4.2, 10.5, 3.4> would be 4.2 10.5 3.4
to stay stationary and look in a different direction, let the position and go-to position be the same coordinates
the look-at direction vector may not be parallel to the up vector (i.e. you may not be standing in <0,0,10> and looking at <0,10,10>
Use the right click button to follow an animal (fish or waterbug) in a circular motion above the animal.
Press 'n' to follow the next fish or waterbug. You can continue to press this for both animals to traverse through them.
Waterbugs are well-camouflaged to hide from their predators. The arrow keys and 'f' and 'b' keys are useful to navigate to them
alternatively, you can follow them using the right-click menu option

Terminal:
Closing the Program:
	To close the program, simply right-click and press 'Exit'. Alternatively, you can press 'q' to quit or press the 'Esc' button

Building
Hold crtl+f5 to launch in debug mode. Release mode in Visual studio releases optimized, faster code.

Compiling:

The bulk of my program is located at "./opengl/opengl/src/main.cpp"
This project is best compiled with Microsoft Visual Studio 2010 or higher.
Double click the 'opengl.sln' if on a microsoft platform to compile/run the project.
If compiling on a *NIX derivative, make sure to set two global preprocessor directives
( GLEW_STATIC and FREEGLUT_STATIC ) to enable static compilation the project.
If you don't want to use glew/freeglut, remove the #includes at 'main.cpp' and replace it with
the appropriate header files. Glew is an extention library I needed, and freeglut is backwards
compatible with the deprecated original glut library. Provided also in "./Release" 
are the binary files necessary to run the program on a windows platform.
If for some reason, it fails to compile, you can run it with that.


Licence:

The licence I included is an MIT licence.
Basically, I'm enabling you to do whatever you want with my source code
with no strings attached. It also serves as a disclaimer that there is
no warranty (I doubt you need it anyway, it's a small assignment).

About

A list of project for Rutgers University CS 456

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published