Skip to content
Snippets Groups Projects
Commit b58f4054 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

better mousewheel interaction
parent 3b2f128a
No related branches found
No related tags found
No related merge requests found
// $Id: Opengl_Window.cpp,v 1.77 2006-11-27 22:22:10 geuzaine Exp $
// $Id: Opengl_Window.cpp,v 1.78 2006-12-17 22:23:16 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -287,6 +287,7 @@ int Opengl_Window::handle(int event)
CTX.s[0] *= ((dy > 0) ? fact : 1./fact);
CTX.s[1] = CTX.s[0];
CTX.s[2] = CTX.s[0];
prev.recenter();
redraw();
}
WID->update_manip_window();
......
// $Id: GModel.cpp,v 1.25 2006-12-12 18:16:41 geuzaine Exp $
// $Id: GModel.cpp,v 1.26 2006-12-17 22:23:17 geuzaine Exp $
//
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
//
......@@ -298,10 +298,10 @@ void GModel::deleteMeshPartitions()
double GModel::getMeshSize ()
{
if (meshSize < 0)
{
SBoundingBox3d b = bounds();
return 0.1 * norm( SVector3 ( b.max() , b.min() ) );
}
else return meshSize;
if(meshSize < 0){
SBoundingBox3d b = bounds();
return 0.1 * norm(SVector3(b.max(), b.min()));
}
else
return meshSize;
}
......@@ -32,12 +32,15 @@
// OCC Internals have to be stored in the model
class OCC_Internals;
// A geometric model. The model is a "not yet" non-manifold B-Rep.
class GModel
{
private:
void deleteOCCInternals();
OCC_Internals *occ_internals;
double meshSize;
protected:
std::string modelName;
std::set<GRegion*, GEntityLessThan> regions;
......@@ -46,10 +49,11 @@ class GModel
std::set<GVertex*, GEntityLessThan> vertices;
std::set<int> meshPartitions;
std::map<int, std::string> physicalNames;
public:
GModel() : modelName("Untitled"), normals(0), meshSize(-1.) {}
GModel(const std::string &name) : modelName(name), normals(0), meshSize(-1.) {}
virtual ~GModel(){ deleteOCCInternals();destroy(); }
virtual ~GModel(){ deleteOCCInternals(); destroy(); }
typedef std::set<GRegion*, GEntityLessThan>::iterator riter;
typedef std::set<GFace*, GEntityLessThan>::iterator fiter;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment