Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
bf434e6d
Commit
bf434e6d
authored
Feb 06, 2019
by
Jan Möbius
Browse files
Removed glutSolidSphere calls
parent
f9b229fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
libs_required/ACG/Scenegraph/ManipulatorNode.cc
View file @
bf434e6d
...
...
@@ -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
();
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment