Results 1 to 2 of 2

Thread: Camera rotation angles

  1. #1
    Newbie Member
    Join Date
    Sep 2007
    Location
    England
    Posts
    34

    Camera rotation angles

    I am having trouble using camera on an lightscene scene using opengl (in c++)

    I can display a scene (with multiple objects, including child objects) without any problems.

    However, if the camera is attached to a null object, i cannot work out how lightwave calculates:
    glRotated(z, 0.00, 0.00, 1.00)
    glRotated(x, 1.00, 0.00, 0.00)
    glRotated(y, 0.00, 1.00, 0.00)

    I can work out glTranslated()
    I use:
    LWMAT_getRotate(hpb_null_object, matrix)
    matrix[3][xyz] = position_null_object
    LWMAT_transformp(position_camera, matrix)

    To display objects, i pass the matrix to glMultMatrixf(). But this does not seem to work with cameras, any ideas?

  2. #2
    Newbie Member
    Join Date
    Sep 2007
    Location
    England
    Posts
    34
    Problem solved, i needed:
    LWEUL_fromMatrix( camera_matrix, EulOrdZXYr, dest_euler_angle)

    (I had used EulOrdYXZr by mistake)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •