Guest User

Untitled

a guest
Dec 10th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1.   void InstBoundingVolume::Draw()
  2.   {
  3.     glUseProgram(GLOBALS->program_id);
  4.  
  5.     glPushMatrix();
  6.  
  7.     glTranslatef(centroid.x, centroid.y, centroid.z);
  8.     if(type == BVT_OBB || type == BVT_PCA_ELLIPSOID)
  9.     {
  10.       glRotatef(rotation->x, 1.0f, 0.0f, 0.0f);
  11.       glRotatef(rotation->y, 0.0f, 1.0f, 0.0f);
  12.       glRotatef(rotation->z, 0.0f, 0.0f, 1.0f);
  13.  
  14.       glRotatef(rotatoid.x, 1.0f, 0.0f, 0.0f);
  15.       glRotatef(rotatoid.y, 0.0f, 1.0f, 0.0f);
  16.       glRotatef(rotatoid.z, 0.0f, 0.0f, 1.0f);
  17.     }
  18.     if(type == BVT_AABB || type == BVT_OBB || type == BVT_PCA_ELLIPSOID)
  19.       glScalef(half_extents.x*2.0f, half_extents.y*2.0f, half_extents.z*2.0f);
  20.     else
  21.       glScalef(radius*2.0f, radius*2.0f, radius*2.0f);
  22.  
  23.     SFW::Shape::DrawWireFrame(shape);
  24.  
  25.     glPopMatrix();
  26.  
  27.     glUseProgram(0);
  28.   }
Add Comment
Please, Sign In to add comment