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

Merge branch 'master' into GLUT

parents fba889b2 33d686d8
......@@ -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 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 GlutExaminer and GlutViewer from ACG library
- <b>Core</b>
- Introduced basic Python scripting support
- Use QOpenGLDebuglogger
......
......@@ -81,7 +81,6 @@ set (directories
Geometry/Types
Geometry/bsp
GL
Glut
IO
Math
QtWidgets
......
......@@ -56,7 +56,6 @@
#include "ManipulatorNode.hh"
//== NAMESPACES ===============================================================
......@@ -216,19 +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);
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_);
ACG::GLSphere sphere(20, 20);
sphere.draw_primitive();
std::cerr << "Untested code path after replacement of glutWireSphere! Please report glutWireSphere:232 if that path works" << std::endl;
//glutWireSphere(cylinder_height_+4*cylinder_radius_, 20, 20);
glPolygonMode(GL_FRONT,previous[0]);
glPolygonMode(GL_BACK,previous[1]);
}
}
......@@ -256,13 +257,9 @@ ManipulatorNode::draw(GLState& _state, const DrawModes::DrawMode& /* _drawMode *
if(_state.compatibilityProfile())
{
ACG::GLState::shadeModel(GL_SMOOTH);
_state.scale(2*cylinder_radius_,2*cylinder_radius_,2*cylinder_radius_);
ACG::GLSphere sphere(20, 20);
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();
......@@ -557,38 +554,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()) {
ACG::GLState::shadeModel(GL_SMOOTH);
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();
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)
direction_ = inverse_rotation().transform_vector(_v.normalize());
}
//----------------------------------------------------------------------------
Vec3d
ManipulatorNode::direction() const
{
......
......@@ -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 ===============================================================
......
......@@ -71,24 +71,22 @@ 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]);
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);
sphere.draw_primitive();
std::cerr << "Untested code path after replacement of glutWireSphere! Please report TrackballNode:85 if that path works" << std::endl;
// glutWireSphere(radius_, 20, 20);
std::cerr << "Sphere 4" << std::endl;
glPolygonMode(GL_FRONT,previous[0]);
glPolygonMode(GL_BACK,previous[1]);
glPopMatrix();
}
......
......@@ -61,8 +61,6 @@
#include "BaseNode.hh"
#include "TransformNode.hh"
#include <vector>
// Qt
#include <QEvent>
#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