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

Merge branch 'master' into GLUT

parents fba889b2 33d686d8
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
- Removed a lot of unnecessary large QT includes from the Interfaces (Mostly QtWidgets). You have to add your own include statements in your plugins now. - Removed a lot of unnecessary large QT includes from the Interfaces (Mostly QtWidgets). You have to add your own include statements in your plugins now.
- Removed WhatsThisGenerator include from BaseInterface. You have to include it in the plugins now if you use it. - Removed WhatsThisGenerator include from BaseInterface. You have to include it in the plugins now if you use it.
- Removed the classical ObjectTypes CMake search. Please use the nex style ( Type-<Typename>/ObjectTypes/<Typename> + Type-<Typename>/Plugin-Type<TypeName> ) scheme - Removed the classical ObjectTypes CMake search. Please use the nex style ( Type-<Typename>/ObjectTypes/<Typename> + Type-<Typename>/Plugin-Type<TypeName> ) scheme
- Removed GlutExaminer and GlutViewer from ACG library
- <b>Core</b> - <b>Core</b>
- Introduced basic Python scripting support - Introduced basic Python scripting support
- Use QOpenGLDebuglogger - Use QOpenGLDebuglogger
......
...@@ -81,7 +81,6 @@ set (directories ...@@ -81,7 +81,6 @@ set (directories
Geometry/Types Geometry/Types
Geometry/bsp Geometry/bsp
GL GL
Glut
IO IO
Math Math
QtWidgets QtWidgets
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "ManipulatorNode.hh" #include "ManipulatorNode.hh"
//== NAMESPACES =============================================================== //== NAMESPACES ===============================================================
...@@ -216,19 +215,21 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode * ...@@ -216,19 +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);
GLint previous[2];
glGetIntegerv(GL_POLYGON_MODE,previous);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
_state.scale(cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_); _state.scale(cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_,cylinder_height_+4*cylinder_radius_);
ACG::GLSphere sphere(20, 20); ACG::GLSphere sphere(20, 20);
sphere.draw_primitive(); sphere.draw_primitive();
std::cerr << "Untested code path after replacement of glutWireSphere! Please report glutWireSphere:232 if that path works" << std::endl; glPolygonMode(GL_FRONT,previous[0]);
//glutWireSphere(cylinder_height_+4*cylinder_radius_, 20, 20); glPolygonMode(GL_BACK,previous[1]);
} }
} }
...@@ -256,13 +257,9 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode * ...@@ -256,13 +257,9 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
if(_state.compatibilityProfile()) if(_state.compatibilityProfile())
{ {
ACG::GLState::shadeModel(GL_SMOOTH); ACG::GLState::shadeModel(GL_SMOOTH);
_state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_); _state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
ACG::GLSphere sphere(20, 20); ACG::GLSphere sphere(20, 20);
sphere.draw_primitive(); sphere.draw_primitive();
std::cerr << "Untested code path after replacement of glutWireSphere! Please report glutWireSphere:263 if that path works" << std::endl;
// glutSolidSphere(2*cylinder_radius_, 20, 20);
} }
_state.pop_modelview_matrix(); _state.pop_modelview_matrix();
...@@ -557,38 +554,32 @@ ManipulatorNode::mapToCylinder(GLState& _state, ...@@ -557,38 +554,32 @@ ManipulatorNode::mapToCylinder(GLState& _state,
void ManipulatorNode::pick(GLState& _state, PickTarget _target) { void ManipulatorNode::pick(GLState& _state, PickTarget _target) {
if (_target == PICK_FACE || _target == PICK_ANYTHING) { if (_target == PICK_FACE || _target == PICK_ANYTHING) {
if (draw_cylinder_) { if (draw_cylinder_) {
_state.pick_set_maximum(2); _state.pick_set_maximum(2);
// cylinder // cylinder
_state.push_modelview_matrix(); _state.push_modelview_matrix();
setup_cylinder_system(_state); setup_cylinder_system(_state);
_state.pick_set_name(0); _state.pick_set_name(0);
cylinder_->setBottomRadius(cylinder_radius_); cylinder_->setBottomRadius(cylinder_radius_);
cylinder_->setTopRadius(cylinder_radius_); cylinder_->setTopRadius(cylinder_radius_);
cylinder_->draw(_state, cylinder_height_); cylinder_->draw(_state, cylinder_height_);
_state.pop_modelview_matrix(); _state.pop_modelview_matrix();
// sphere // sphere
_state.push_modelview_matrix(); _state.push_modelview_matrix();
setup_sphere_system(_state); setup_sphere_system(_state);
_state.pick_set_name(1); _state.pick_set_name(1);
if(_state.compatibilityProfile()) {
if(_state.compatibilityProfile()) {
ACG::GLState::shadeModel(GL_SMOOTH);
_state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_); _state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
ACG::GLSphere sphere(20, 20); ACG::GLSphere sphere(20, 20);
sphere.draw_primitive(); sphere.draw_primitive();
std::cerr << "Untested code path after replacement of glutWireSphere! Please report glutWireSphere:585 if that path works" << std::endl; }
//glutSolidSphere(2* cylinder_radius_ , 20, 20); _state.pop_modelview_matrix();
}
} }
_state.pop_modelview_matrix();
}
}
} }
...@@ -601,10 +592,8 @@ ManipulatorNode::set_direction(Vec3d& _v) ...@@ -601,10 +592,8 @@ ManipulatorNode::set_direction(Vec3d& _v)
direction_ = inverse_rotation().transform_vector(_v.normalize()); direction_ = inverse_rotation().transform_vector(_v.normalize());
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
Vec3d Vec3d
ManipulatorNode::direction() const ManipulatorNode::direction() const
{ {
......
...@@ -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 ===============================================================
......
...@@ -71,24 +71,22 @@ namespace SceneGraph { ...@@ -71,24 +71,22 @@ 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]);
glScalef(radius_, radius_, radius_);
glScalef(radius_,radius_,radius_); GLint previous[2];
glGetIntegerv(GL_POLYGON_MODE,previous);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
ACG::GLSphere sphere(20, 20); ACG::GLSphere sphere(20, 20);
sphere.draw_primitive(); sphere.draw_primitive();
std::cerr << "Untested code path after replacement of glutWireSphere! Please report TrackballNode:85 if that path works" << std::endl; glPolygonMode(GL_FRONT,previous[0]);
// glutWireSphere(radius_, 20, 20); glPolygonMode(GL_BACK,previous[1]);
std::cerr << "Sphere 4" << std::endl;
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>
......
Subproject commit 0c55529987a0783eb75f688dde923efe7bc9be0a Subproject commit 93a439fea600c27fbe9a2da361d45f5d0f2a8c65
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