Jump to content

  • Log In with Google      Sign In   
  • Create Account

time problem??


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • This topic is locked This topic is locked
1 reply to this topic

#1 ashwini_rt   Members   -  Reputation: 100

Like
0Likes
Like

Posted 30 April 2010 - 05:52 AM

hii eveyone.. I hv drawn a Beam which must complete it's rotation n 8sec..to with that i hav used the sec value of sys time..so that the beam completes 45deg in 1sec..Thus,makes 1 complete rotation (360deg) in 8sec.. but the problem is it looks like clock tick..I wana make it as sweep how can i do that?? or another option s ther any function to acess the mili second value of time so that my beam can make 10deg rotation in each 20mSec ?? so plz..can any 1 help me out..?? here s my snippet of code........... void display(void) { time(<ime); // Get time newtime = localtime(<ime); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glColor3f( 1.0, 0.0, 1.0); bitmap_output(-r_max,-r_max, asctime(newtime),GLUT_BITMAP_TIMES_ROMAN_24); glPushMatrix(); glRotatef( 180, 1.0, 0.0, 0.0); glPushMatrix(); glRotatef( (360/8) * (newtime->tm_sec), 0.0, 0.0, 1.0); drawBeam(0.0,0.0,0.0, 12); glPopMatrix(); glPopMatrix(); glutSwapBuffers() ; }

Sponsor:

#2 Josh Petrie   Moderators   -  Reputation: 3117

Like
0Likes
Like

Posted 30 April 2010 - 05:59 AM

Stop cross posting.

Josh Petrie | Core Tools Engineer, 343i | Microsoft C++ MVP





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS