Results 1 to 3 of 3

Thread: 3d rotate... [resolved]

  1. #1

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755

    Question 3d rotate... [resolved]

    hey!

    i've made these functions to rotate points in a 3d world...

    VB Code:
    1. Const PiDiv180 As Double = 1.74532925199433E-02
    2.  
    3. Public Function RotateXX(X As Double, Z As Double, Deg As Double)
    4.     RotateXX = Z * Sin((Deg) * PiDiv180) + X * Cos((Deg) * PiDiv180)
    5. End Function
    6.  
    7. Public Function RotateXZ(X As Double, Z As Double, Deg As Double)
    8.     RotateXZ = Z * Cos((Deg) * PiDiv180) - X * Sin((Deg) * PiDiv180)
    9. End Function
    10.  
    11. Public Function RotateYY(Y As Double, Z As Double, Deg As Double)
    12.     RotateYY = Y * Cos((Deg) * PiDiv180) - Z * Sin((Deg) * PiDiv180)
    13. End Function
    14.  
    15. Public Function RotateYZ(Y As Double, Z As Double, Deg As Double)
    16.     RotateYZ = Y * Sin((Deg) * PiDiv180) + Z * Cos((Deg) * PiDiv180)
    17. End Function


    these functions doesnt rotate around all 3 angles in a 3d world...only 2 of them...can anyone help me with the 3rd one?
    Last edited by cyborg; Jul 13th, 2003 at 01:33 AM.
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  2. #2

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    anyone? i know you can! =)
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  3. #3

    Thread Starter
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    found answer on google.
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

Posting Permissions

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



Click Here to Expand Forum to Full Width