Commit bf434e6d authored by Jan Möbius's avatar Jan Möbius

Removed glutSolidSphere calls

parent f9b229fc
......@@ -251,7 +251,9 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
if(_state.compatibilityProfile())
{
ACG::GLState::shadeModel(GL_SMOOTH);
glutSolidSphere(2*cylinder_radius_, 20, 20);
_state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
ACG::GLSphere sphere(20, 20);
sphere.draw_primitive();
}
_state.pop_modelview_matrix();
......@@ -546,29 +548,32 @@ ManipulatorNode::mapToCylinder(GLState& _state,
void ManipulatorNode::pick(GLState& _state, PickTarget _target) {
if (_target == PICK_FACE || _target == PICK_ANYTHING) {
if (draw_cylinder_) {
_state.pick_set_maximum(2);
// cylinder
_state.push_modelview_matrix();
setup_cylinder_system(_state);
_state.pick_set_name(0);
cylinder_->setBottomRadius(cylinder_radius_);
cylinder_->setTopRadius(cylinder_radius_);
cylinder_->draw(_state, cylinder_height_);
_state.pop_modelview_matrix();
// sphere
_state.push_modelview_matrix();
setup_sphere_system(_state);
_state.pick_set_name(1);
if(_state.compatibilityProfile())
glutSolidSphere(2* cylinder_radius_ , 20, 20);
_state.pop_modelview_matrix();
}
}
if (_target == PICK_FACE || _target == PICK_ANYTHING) {
if (draw_cylinder_) {
_state.pick_set_maximum(2);
// cylinder
_state.push_modelview_matrix();
setup_cylinder_system(_state);
_state.pick_set_name(0);
cylinder_->setBottomRadius(cylinder_radius_);
cylinder_->setTopRadius(cylinder_radius_);
cylinder_->draw(_state, cylinder_height_);
_state.pop_modelview_matrix();
// sphere
_state.push_modelview_matrix();
setup_sphere_system(_state);
_state.pick_set_name(1);
if(_state.compatibilityProfile()) {
_state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
ACG::GLSphere sphere(20, 20);
sphere.draw_primitive();
}
_state.pop_modelview_matrix();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment