Basic render 3D perspective projection onto 2D screen with camera (without opengl)

后端 未结 8 1026
南方客
南方客 2020-12-04 10:21

Let\'s say I have a data structure like the following:

Camera {
   double x, y, z

   /** ideally the camera angle is positioned to aim at the 0,0,0 point */         


        
8条回答
  •  执念已碎
    2020-12-04 10:31

    You want to transform your scene with a matrix similar to OpenGL's gluLookAt and then calculate the projection using a projection matrix similar to OpenGL's gluPerspective.

    You could try to just calculate the matrices and do the multiplication in software.

提交回复
热议问题