Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: views?  (Read 992 times)

0 Members and 1 Guest are viewing this topic.

DirtyBlasion

  • Newbie
  • *
  • Posts: 14
    • View Profile
    • Email
views?
« on: January 23, 2017, 08:00:35 pm »
So I got started, this library is lovely, but today I got a problem, how do I can move camera in 3d? In 2d I found a tutorial with views but in 3d? I serched, but I didnt found what I was looking for.

 And one more question, is better to organise scripts, is better to organise in multiple files with headers and things?? And make a class and derive it(I dont found why but I see lot of people do this.)

Hapax

  • Hero Member
  • *****
  • Posts: 3363
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: views?
« Reply #1 on: January 24, 2017, 07:54:16 pm »
Since SFML is a 2D library by nature, I presume you are using OpenGL directly to work with 3D.

To move a "camera" in 3D space, you can transform all primitives inversely, which moves them to match the camera rather than moving the camera to match the movement.

You could see if these articles help:
https://www.opengl.org/archives/resources/faq/technical/viewing.htm
https://learnopengl.com/#!Getting-started/Camera
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything