Posted By

Desoxena on 09/23/11


Tagged


Versions (?)

Some functions


 / Published in: C++
 

Some functions

  1. float currRot = (360/currAngle)*100;
  2.  
  3. //---------
  4. int locationX, int locationZ;
  5. float PI = 3.141592;
  6. float angle_radians = angle * (float)PI / (float)180;
  7. float myX = locationX + currAngle * (float)cos(angle_radians);
  8. float myZ = locationZ + currAngle * (float)sin(angle_radians);
  9. //-----------
  10. glColor3d(.5, .5, 0);
  11. glTranslated(x+myX+(i*(size/10)), y, z+myZ+(i*(size/10)));
  12. glRotated(currRot, 1, 0, 0);
  13.  
  14. for (int j = 0; j < 5; j++) {
  15. glLoadIdentity();
  16. glColor3d(0, 1, 0);
  17. glTranslated(x+myX+(i*(size/10))+(j*(size/10)), y, z+myZ+(i*(size/10))+(j*(size/10)));
  18. glRotated(currRot);

Report this snippet  

You need to login to post a comment.