Coder Social home page Coder Social logo

openglsceneeditor's Introduction

#openGLSceneEditor:

  • This project consists of 3 main classes that encapsulate it's functionality:

    • louModel:

        - A class that parses and stores data about a model from any obj file, including normals and texture coordinates. If the normals aren't present in the file, it takes the surface normal as the normal for each vertex. It also has a matrix that stores any transformations that are to be done on this model alone, such as translation.
        
        - translateToCenter() loads the transformation matrix with one that translates the object's center to the origin of the world space.
      
        - drawFaces() simply makes the calls to the openGL functions necessary to draw the model.
      
    • shaderManager:

        - A singleton class that facilitates loading and running shaders. It is a simple class that has methods for creating vertex and fragment shaders and adding them to the pipeline. It's API is very straightforward as demonstrated in the main() function.
      
    • scene:

        - A singleton class that stores information about the current scene and provides an interface for adding models to the scene, saving the new scene state to the original scene file loaded and switching camera modes dynamically. The information it parses from the scene file is simply the path to the obj files to be loaded, and the x,y,z coordinates of their center.
      
  • main.cpp demonstrates how to use the API of the scene and shader manager classes. It also contains event handlers for the mouse to rotate the camera, for the arrow keys to navigate through the scene, and certain character keys to call methods in the scene class.

####Screenshot Samples:

Loading a new model into the scene Orthographic view Perspective view Specular light 1 Specular light 2

openglsceneeditor's People

Contributors

loufis avatar

Watchers

James Cloos avatar  avatar

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.