Commit 2b783fed authored by Mike Kremer's avatar Mike Kremer
Browse files

Fixed picking for ManipulatorNode.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6998 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d08823e3
......@@ -543,36 +543,30 @@ ManipulatorNode::mapToCylinder(GLState& _state,
//----------------------------------------------------------------------------
void
ManipulatorNode::
pick(GLState& _state, PickTarget _target)
{
if (_target == PICK_FACE ||
_target == PICK_ANYTHING)
{
if (draw_cylinder_)
{
// cylinder
_state.push_modelview_matrix();
setup_cylinder_system(_state);
glLoadName(1);
gluCylinder(cylinder_,
cylinder_radius_,
cylinder_radius_,
cylinder_height_,
cylinder_slices_,
cylinder_stacks_);
_state.pop_modelview_matrix();
// sphere
_state.push_modelview_matrix();
setup_sphere_system(_state);
glLoadName(2);
glutSolidSphere(2*cylinder_radius_, 20, 20);
_state.pop_modelview_matrix();
}
}
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);
//glLoadName(1);
_state.pick_set_name(0);
gluCylinder(cylinder_, cylinder_radius_, cylinder_radius_, cylinder_height_, cylinder_slices_,
cylinder_stacks_);
_state.pop_modelview_matrix();
// sphere
_state.push_modelview_matrix();
setup_sphere_system(_state);
//glLoadName(2);
_state.pick_set_name(1);
glutSolidSphere(2* cylinder_radius_ , 20, 20);
_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