Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void InstBoundingVolume::Draw()
- {
- glUseProgram(GLOBALS->program_id);
- glPushMatrix();
- glTranslatef(centroid.x, centroid.y, centroid.z);
- if(type == BVT_OBB || type == BVT_PCA_ELLIPSOID)
- {
- glRotatef(rotation->x, 1.0f, 0.0f, 0.0f);
- glRotatef(rotation->y, 0.0f, 1.0f, 0.0f);
- glRotatef(rotation->z, 0.0f, 0.0f, 1.0f);
- glRotatef(rotatoid.x, 1.0f, 0.0f, 0.0f);
- glRotatef(rotatoid.y, 0.0f, 1.0f, 0.0f);
- glRotatef(rotatoid.z, 0.0f, 0.0f, 1.0f);
- }
- if(type == BVT_AABB || type == BVT_OBB || type == BVT_PCA_ELLIPSOID)
- glScalef(half_extents.x*2.0f, half_extents.y*2.0f, half_extents.z*2.0f);
- else
- glScalef(radius*2.0f, radius*2.0f, radius*2.0f);
- SFW::Shape::DrawWireFrame(shape);
- glPopMatrix();
- glUseProgram(0);
- }
Add Comment
Please, Sign In to add comment