Git Product home page Git Product logo

15462-p2's Introduction

README
---------------------------------------------------------------------------
Overview
---------------------------------------------------------------------------

In here you will find instructions for building the project and a
short description of each source file.

There is quite a bit of starter code for project 3. It contains math
utility functions and classes, code to load the application, code to load
models, and code to handle mouse/keyboard input.

Report any bugs to the TAs.

---------------------------------------------------------------------------
Building the Code
---------------------------------------------------------------------------

This project uses the CMake build system (www.cmake.org). CMake is a kind of
"meta build-system," in that it creates a build system for you. It supports
many different build systems, ranging from Unix Makefiles to Visual Studio
projects to XCode projects.

1) If you don't have CMake installed, you should install it. If you're running
    Linux, it should be available through your disto's package manager
    (apt-get, pacman, ports, etc). Windows and OSX installers can be downloaded
    from http://www.cmake.org/cmake/resources/software.html
2) Open up a command prompt in the "build" directory and run "cmake ../src".
    CMake will generate the build system in the build directory. By default,
    CMake will generate Makefiles on Linux and OSX and a Visual Studio project
    on Windows. If you'd like to change that, you can pass a different
    "generator" to cmake with the -G flag. A full list of generators can be
    found at the bottom of the output generated by running "cmake". For
    example, "cmake -G 'Xcode' ../src" will generate an Xcode project on OSX.
3) You can now use the build system in the "build" directory. The default
    target will compile everything for you, and the "install" target will copy
    the p2 executable to the main "p2" directory.

WINDOWS NOTE: If you're using Windows, you'll have to add the "windows/bin"
directory to your PATH environment variable so Windows can find the shared
libraries the project will use.

Note: Your program MUST COMPILE on the SCS Linux machines. If you use
Windows, make sure to test on Linux well in advance of the deadline.

---------------------------------------------------------------------------
Running the Program
---------------------------------------------------------------------------

Usage: p2 <scene filename> [<cubemap>]

<scene filename> is a .scene file in the scenes/ folder.
Instructions:

    Use the mouse and scroll wheel to manipulate the object.
    Press 'f' to take a screenshot of the current frame buffer. It is
    written to a file whose name is based on the current system time.

    Press 'y' to subdivide the meshes in the scene.

---------------------------------------------------------------------------
C++ Notes
---------------------------------------------------------------------------

For the sake of simpler math routines and data structures, the code uses
C++ over straight C. The code tries to stay away from most features of the
language to keep it as simple as possible. This project attempts to break
you into C++ easily.

Questions about virtual functions, classes, or any C++ idioms are welcome.

---------------------------------------------------------------------------
Source Files and Directory Structure
---------------------------------------------------------------------------

The code base is rather big, so here's a description of the top-level
directories and every header/source file pair we give you
README              -- this file

models/             -- models used in scenes.
images/             -- textures used in scenes.
scenes/            -- scenes on which to test your program.

src/build/         == Build system stuff.
    CMakeLists.txt  -- Compiler flags can be adjusted by editing the list in
                        here.

src/application/    == General application files. You can ignore all of it.
    application     -- SDL backend, runs main loop.
    camera_roam     -- Functions for camera control via mouse and keyboard.
    imageio         -- Functions to load and save PNG files.
    opengl          -- Header to include correct OpenGL headers.
    scene_loader    -- Code to load a scene from a file.

src/math/           == Math utilities.
    camera*         -- Camera class with functions to mutate.
    color           -- A class for RGB colors and related functions.
    math            -- Basic header and a few generic functions.
    matrix          -- 3D, 4D matrix classes and several related functions.
    quaternion      -- Quaternion class and several related functions--very
                        useful for 3D rotations.
    vector          -- 2D, 3D, 4D vector classes and many related functions.

src/scene/          == Scene-specific files and rendering. You must modify
		       'subdivide.cpp'.

src/tinyxml/        == XML parser, used with scenes. You can ignore this.

15462-p2's People

Contributors

bofeizhu avatar

Watchers

 avatar  avatar

Forkers

dtbinh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.