Git Product home page Git Product logo

Comments (5)

bkolligs avatar bkolligs commented on May 25, 2024

Will need to figure out exactly how to abstract the window input into a class so that it's not needed inside the window loop explicilty.

from vobo.

bkolligs avatar bkolligs commented on May 25, 2024

For events should use the glfwSetWindowUserPointer which we can then use to modify a structure we create.

from vobo.

bkolligs avatar bkolligs commented on May 25, 2024

May need to use GLM::lookAt to get the view matrix since right now I am moving relative to the camera. What I want to do is actually move where I’m looking.

from vobo.

bkolligs avatar bkolligs commented on May 25, 2024

Look at is useful here but unfortunately there's some singularity with the GLM look at function when the camera direction is aligned with the up vector. I can handle this with a dot product but perhaps there’s a better way to do this without lookat. I'm investigating other options for orbiting cameras. http://www.songho.ca/opengl/gl_camera.html#example1

I think I’ll implement the Arcball:

  1. http://courses.cms.caltech.edu/cs171/assignments/hw3/hw3-notes/notes-hw3.html
  2. https://en.m.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Arcball
  3. https://asliceofrendering.com/camera/2019/11/30/ArcballCamera/

from vobo.

bkolligs avatar bkolligs commented on May 25, 2024

I now have orbit and pan working! Need to address zooming next. I plan to listen to the scroll commands and use it to update the camera z position in the pivot frame. This is done using a window data pointer and polling it every frame update.

from vobo.

Related Issues (11)

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.