Commit 6a4c7020 authored by Jan Möbius's avatar Jan Möbius

Removed remaining glutSoldiSphere and glutWireSphere. refs #1

parent 5f57660e
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "ManipulatorNode.hh" #include "ManipulatorNode.hh"
//== NAMESPACES =============================================================== //== NAMESPACES ===============================================================
...@@ -216,14 +215,21 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode * ...@@ -216,14 +215,21 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
// BIG wireframe sphere // BIG wireframe sphere
if( sphere_clicked_) if( sphere_clicked_ )
{ {
_state.set_diffuse_color(select_color * 0.6f); _state.set_diffuse_color(select_color * 0.6f);
_state.set_specular_color(select_color * 0.0f); _state.set_specular_color(select_color * 0.0f);
if(_state.compatibilityProfile()) if(_state.compatibilityProfile())
{ {
ACG::GLState::shadeModel(GL_SMOOTH); ACG::GLState::shadeModel(GL_SMOOTH);
glutWireSphere(cylinder_height_+4*cylinder_radius_, 20, 20); GLint mode = 0;
glGetIntegerv(GL_POLYGON_MODE,&mode);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
_state.scale(cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_);
ACG::GLSphere sphere(20, 20);
sphere.draw_primitive();
glPolygonMode(GL_FRONT_AND_BACK,mode);
} }
} }
......
...@@ -60,12 +60,13 @@ ...@@ -60,12 +60,13 @@
// GMU // GMU
#include "BaseNode.hh" #include "BaseNode.hh"
#include "TransformNode.hh" #include "TransformNode.hh"
#include <ACG/GL/GLPrimitives.hh>
// Qt // Qt
#include <QEvent> #include <QEvent>
#include <QMouseEvent> #include <QMouseEvent>
#include <ACG/GL/GLPrimitives.hh>
//== NAMESPACES =============================================================== //== NAMESPACES ===============================================================
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include "TrackballNode.hh" #include "TrackballNode.hh"
#include <ACG/GL/GLPrimitives.hh>
//== NAMESPACES =============================================================== //== NAMESPACES ===============================================================
...@@ -70,14 +71,21 @@ namespace SceneGraph { ...@@ -70,14 +71,21 @@ namespace SceneGraph {
void void
TrackballNode::draw(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawMode */ ) TrackballNode::draw(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawMode */ )
{ {
// draw the trackball // draw the track ball
if (drawTrackball_) if (drawTrackball_)
{ {
ACG::GLState::disable(GL_LIGHTING); ACG::GLState::disable(GL_LIGHTING);
ACG::GLState::shadeModel( GL_FLAT ); ACG::GLState::shadeModel( GL_FLAT );
glPushMatrix(); glPushMatrix();
glTranslatef(center()[0], center()[1], center()[2]); glTranslatef(center()[0], center()[1], center()[2]);
glutWireSphere(radius_, 20, 20); glScalef(radius_, radius_, radius_);
GLint mode = 0;
glGetIntegerv(GL_POLYGON_MODE,&mode);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
ACG::GLSphere sphere(20, 20);
sphere.draw_primitive();
glPolygonMode(GL_FRONT_AND_BACK,mode);
glPopMatrix(); glPopMatrix();
} }
......
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
#include "BaseNode.hh" #include "BaseNode.hh"
#include "TransformNode.hh" #include "TransformNode.hh"
#include <vector>
// Qt // Qt
#include <QEvent> #include <QEvent>
#include <QMouseEvent> #include <QMouseEvent>
......
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