~ubuntu-branches/debian/squeeze/gmsh/squeeze

« back to all changes in this revision

Viewing changes to Plugin/CutPlane.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme
  • Date: 2009-07-13 15:49:21 UTC
  • mfrom: (7.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090713154921-zer07j8wixwa07ig
Tags: 2.3.1.dfsg-4
[Christophe Prud'homme]
* Bug fix: "gmsh with cgns write support", thanks to Oliver Borm
  (Closes: #529972).
* debian/rules: make sure that Gmsh is built with occ support on all
  platforms thanks to Denis Barbier (#536435).

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#undef max
18
18
#endif
19
19
 
20
 
extern Context_T CTX;
21
 
 
22
20
int GMSH_CutPlanePlugin::iview = 0;
23
21
 
24
22
StringXNumber CutPlaneOptions_Number[] = {
47
45
  drawContext *ctx = (drawContext*)context;
48
46
  if(num < 0) num = iview;
49
47
  if(num >= 0 && num < (int)PView::list.size()){
50
 
    glColor4ubv((GLubyte *) & CTX.color.fg);
51
 
    glLineWidth(CTX.line_width);
 
48
    glColor4ubv((GLubyte *) & CTX::instance()->color.fg);
 
49
    glLineWidth(CTX::instance()->lineWidth);
52
50
    SBoundingBox3d bb = PView::list[num]->getData()->getBoundingBox();
53
51
    ctx->drawPlaneInBoundingBox(bb.min().x(), bb.min().y(), bb.min().z(), 
54
52
                                bb.max().x(), bb.max().y(), bb.max().z(), 
98
96
double GMSH_CutPlanePlugin::callbackD(int num, int action, double value)
99
97
{
100
98
  return callback(num, action, value, &CutPlaneOptions_Number[3].def,
101
 
                  CTX.lc/200., -CTX.lc, CTX.lc);
 
99
                  CTX::instance()->lc/200., -CTX::instance()->lc, CTX::instance()->lc);
102
100
}
103
101
 
104
102
double GMSH_CutPlanePlugin::callbackVol(int num, int action, double value)
162
160
    CutPlaneOptions_Number[2].def * z + CutPlaneOptions_Number[3].def;
163
161
}
164
162
 
165
 
bool GMSH_CutPlanePlugin::geometricalFilter(Double_Matrix *node_positions) const
 
163
bool GMSH_CutPlanePlugin::geometricalFilter(gmshMatrix<double> *node_positions) const
166
164
{
167
165
  const double l0 = levelset((*node_positions)(0, 0),
168
166
                             (*node_positions)(0, 1),