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 @@
#include "ManipulatorNode.hh"
//== NAMESPACES ===============================================================
......@@ -216,14 +215,21 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
// BIG wireframe sphere
if( sphere_clicked_)
if( sphere_clicked_ )
{
_state.set_diffuse_color(select_color * 0.6f);
_state.set_specular_color(select_color * 0.0f);
if(_state.compatibilityProfile())
{
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 @@
// GMU
#include "BaseNode.hh"
#include "TransformNode.hh"
#include <ACG/GL/GLPrimitives.hh>
// Qt
#include <QEvent>
#include <QMouseEvent>
#include <ACG/GL/GLPrimitives.hh>
//== NAMESPACES ===============================================================
......
......@@ -55,6 +55,7 @@
#include "TrackballNode.hh"
#include <ACG/GL/GLPrimitives.hh>
//== NAMESPACES ===============================================================
......@@ -70,14 +71,21 @@ namespace SceneGraph {
void
TrackballNode::draw(GLState& /* _state */ , const DrawModes::DrawMode& /* _drawMode */ )
{
// draw the trackball
// draw the track ball
if (drawTrackball_)
{
ACG::GLState::disable(GL_LIGHTING);
ACG::GLState::shadeModel( GL_FLAT );
glPushMatrix();
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();
}
......
......@@ -61,8 +61,6 @@
#include "BaseNode.hh"
#include "TransformNode.hh"
#include <vector>
// Qt
#include <QEvent>
#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