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

removed useless variables

parent 2680957e
No related branches found
No related tags found
No related merge requests found
// $Id: CutMap.cpp,v 1.20 2001-08-09 18:28:23 remacle Exp $ // $Id: CutMap.cpp,v 1.21 2001-08-09 20:53:23 geuzaine Exp $
#include "CutMap.h" #include "CutMap.h"
#include "List.h" #include "List.h"
...@@ -13,13 +13,12 @@ extern "C" ...@@ -13,13 +13,12 @@ extern "C"
{ {
GMSH_Plugin *GMSH_RegisterCutMapPlugin () GMSH_Plugin *GMSH_RegisterCutMapPlugin ()
{ {
return new GMSH_CutMapPlugin (CutMapOptions_Number[0].def); return new GMSH_CutMapPlugin ();
} }
} }
GMSH_CutMapPlugin::GMSH_CutMapPlugin(double a) GMSH_CutMapPlugin::GMSH_CutMapPlugin()
:A(a)
{ {
} }
...@@ -58,7 +57,7 @@ double GMSH_CutMapPlugin :: levelset (double x, double y, double z, double val) ...@@ -58,7 +57,7 @@ double GMSH_CutMapPlugin :: levelset (double x, double y, double z, double val)
// we must look into the map for A - Map(x,y,z) // we must look into the map for A - Map(x,y,z)
// this is the case when the map is the same as the view, // this is the case when the map is the same as the view,
// the result is the extraction of isovalue A // the result is the extraction of isovalue A
return A - val; return CutMapOptions_Number[0].def - val;
} }
extern List_T *Post_ViewList; extern List_T *Post_ViewList;
...@@ -66,7 +65,6 @@ extern List_T *Post_ViewList; ...@@ -66,7 +65,6 @@ extern List_T *Post_ViewList;
Post_View *GMSH_CutMapPlugin::execute (Post_View *v) Post_View *GMSH_CutMapPlugin::execute (Post_View *v)
{ {
Post_View *vv; Post_View *vv;
A = CutMapOptions_Number[0].def;
int iView = (int)CutMapOptions_Number[1].def; int iView = (int)CutMapOptions_Number[1].def;
_ith_field_to_draw_on_the_iso = (int)CutMapOptions_Number[2].def; _ith_field_to_draw_on_the_iso = (int)CutMapOptions_Number[2].def;
......
...@@ -8,10 +8,9 @@ extern "C" ...@@ -8,10 +8,9 @@ extern "C"
class GMSH_CutMapPlugin : public GMSH_LevelsetPlugin class GMSH_CutMapPlugin : public GMSH_LevelsetPlugin
{ {
double A;
virtual double levelset (double x, double y, double z, double val) const; virtual double levelset (double x, double y, double z, double val) const;
public: public:
GMSH_CutMapPlugin(double A); GMSH_CutMapPlugin();
virtual void getName (char *name) const; virtual void getName (char *name) const;
virtual void getInfos (char *author, virtual void getInfos (char *author,
char *copyright, char *copyright,
......
// $Id: CutPlane.cpp,v 1.16 2001-08-06 11:00:26 geuzaine Exp $ // $Id: CutPlane.cpp,v 1.17 2001-08-09 20:53:23 geuzaine Exp $
#include "CutPlane.h" #include "CutPlane.h"
#include "List.h" #include "List.h"
...@@ -15,16 +15,12 @@ extern "C" ...@@ -15,16 +15,12 @@ extern "C"
{ {
GMSH_Plugin *GMSH_RegisterCutPlanePlugin () GMSH_Plugin *GMSH_RegisterCutPlanePlugin ()
{ {
return new GMSH_CutPlanePlugin (CutPlaneOptions_Number[0].def, return new GMSH_CutPlanePlugin ();
CutPlaneOptions_Number[1].def,
CutPlaneOptions_Number[2].def,
CutPlaneOptions_Number[3].def);
} }
} }
GMSH_CutPlanePlugin::GMSH_CutPlanePlugin(double A, double B, double C, double D) GMSH_CutPlanePlugin::GMSH_CutPlanePlugin()
:a(A),b(B),c(C),d(D)
{ {
} }
...@@ -60,7 +56,10 @@ void GMSH_CutPlanePlugin::CatchErrorMessage (char *errorMessage) const ...@@ -60,7 +56,10 @@ void GMSH_CutPlanePlugin::CatchErrorMessage (char *errorMessage) const
double GMSH_CutPlanePlugin :: levelset (double x, double y, double z, double val) const double GMSH_CutPlanePlugin :: levelset (double x, double y, double z, double val) const
{ {
return a * x + b * y + c * z + d; return CutPlaneOptions_Number[0].def * x +
CutPlaneOptions_Number[1].def * y +
CutPlaneOptions_Number[2].def * z +
CutPlaneOptions_Number[3].def ;
} }
extern List_T *Post_ViewList; extern List_T *Post_ViewList;
...@@ -68,10 +67,7 @@ extern List_T *Post_ViewList; ...@@ -68,10 +67,7 @@ extern List_T *Post_ViewList;
Post_View *GMSH_CutPlanePlugin::execute (Post_View *v) Post_View *GMSH_CutPlanePlugin::execute (Post_View *v)
{ {
Post_View *vv; Post_View *vv;
a = CutPlaneOptions_Number[0].def;
b = CutPlaneOptions_Number[1].def;
c = CutPlaneOptions_Number[2].def;
d = CutPlaneOptions_Number[3].def;
int iView = (int)CutPlaneOptions_Number[4].def; int iView = (int)CutPlaneOptions_Number[4].def;
if(v && iView < 0) if(v && iView < 0)
......
...@@ -10,11 +10,9 @@ extern "C" ...@@ -10,11 +10,9 @@ extern "C"
class GMSH_CutPlanePlugin : public GMSH_LevelsetPlugin class GMSH_CutPlanePlugin : public GMSH_LevelsetPlugin
{ {
/*Plane a x + b y + c z + d = 0*/
double a,b,c,d;
virtual double levelset (double x, double y, double z, double val) const; virtual double levelset (double x, double y, double z, double val) const;
public: public:
GMSH_CutPlanePlugin(double A, double B, double C, double D); GMSH_CutPlanePlugin();
virtual void getName (char *name) const; virtual void getName (char *name) const;
virtual void getInfos (char *author, virtual void getInfos (char *author,
char *copyright, char *copyright,
......
// $Id: CutSphere.cpp,v 1.15 2001-08-06 11:00:26 geuzaine Exp $ // $Id: CutSphere.cpp,v 1.16 2001-08-09 20:53:23 geuzaine Exp $
#include <string.h> #include <string.h>
#include "CutSphere.h" #include "CutSphere.h"
...@@ -16,16 +16,12 @@ extern "C" ...@@ -16,16 +16,12 @@ extern "C"
{ {
GMSH_Plugin *GMSH_RegisterCutSpherePlugin () GMSH_Plugin *GMSH_RegisterCutSpherePlugin ()
{ {
return new GMSH_CutSpherePlugin (CutSphereOptions_Number[0].def, return new GMSH_CutSpherePlugin ();
CutSphereOptions_Number[1].def,
CutSphereOptions_Number[2].def,
CutSphereOptions_Number[3].def);
} }
} }
GMSH_CutSpherePlugin::GMSH_CutSpherePlugin(double A, double B, double C, double D) GMSH_CutSpherePlugin::GMSH_CutSpherePlugin()
:a(A),b(B),c(C),r(D)
{ {
} }
...@@ -61,6 +57,10 @@ void GMSH_CutSpherePlugin::CatchErrorMessage (char *errorMessage) const ...@@ -61,6 +57,10 @@ void GMSH_CutSpherePlugin::CatchErrorMessage (char *errorMessage) const
double GMSH_CutSpherePlugin :: levelset (double x, double y, double z, double val) const double GMSH_CutSpherePlugin :: levelset (double x, double y, double z, double val) const
{ {
double a = CutSphereOptions_Number[0].def;
double b = CutSphereOptions_Number[1].def;
double c = CutSphereOptions_Number[2].def;
double r = CutSphereOptions_Number[3].def;
return (x-a)*(x-a) + (y-b)*(y-b) + (z-c)*(z-c) - r*r; return (x-a)*(x-a) + (y-b)*(y-b) + (z-c)*(z-c) - r*r;
} }
...@@ -69,10 +69,6 @@ extern List_T *Post_ViewList; ...@@ -69,10 +69,6 @@ extern List_T *Post_ViewList;
Post_View *GMSH_CutSpherePlugin::execute (Post_View *v) Post_View *GMSH_CutSpherePlugin::execute (Post_View *v)
{ {
Post_View *vv; Post_View *vv;
a = CutSphereOptions_Number[0].def;
b = CutSphereOptions_Number[1].def;
c = CutSphereOptions_Number[2].def;
r = CutSphereOptions_Number[3].def;
int iView = (int)CutSphereOptions_Number[4].def; int iView = (int)CutSphereOptions_Number[4].def;
if(v && iView < 0) if(v && iView < 0)
......
...@@ -10,11 +10,9 @@ extern "C" ...@@ -10,11 +10,9 @@ extern "C"
class GMSH_CutSpherePlugin : public GMSH_LevelsetPlugin class GMSH_CutSpherePlugin : public GMSH_LevelsetPlugin
{ {
/*Sphere (x-a)^2 + (y-b)^2 + (z-c)^2 - r^2 = 0*/
double a,b,c,r;
virtual double levelset (double x, double y, double z, double val) const; virtual double levelset (double x, double y, double z, double val) const;
public: public:
GMSH_CutSpherePlugin(double A, double B, double C, double R); GMSH_CutSpherePlugin();
virtual void getName (char *name) const; virtual void getName (char *name) const;
virtual void getInfos (char *author, virtual void getInfos (char *author,
char *copyright, char *copyright,
......
// $Id: Transform.cpp,v 1.6 2001-08-06 11:13:25 geuzaine Exp $ // $Id: Transform.cpp,v 1.7 2001-08-09 20:53:23 geuzaine Exp $
#include "Plugin.h" #include "Plugin.h"
#include "Transform.h" #include "Transform.h"
...@@ -22,26 +22,13 @@ extern "C" ...@@ -22,26 +22,13 @@ extern "C"
{ {
GMSH_Plugin *GMSH_RegisterTransformPlugin () GMSH_Plugin *GMSH_RegisterTransformPlugin ()
{ {
return new GMSH_TransformPlugin (TransformOptions_Number[0].def, return new GMSH_TransformPlugin ();
TransformOptions_Number[1].def,
TransformOptions_Number[2].def,
TransformOptions_Number[3].def,
TransformOptions_Number[4].def,
TransformOptions_Number[5].def,
TransformOptions_Number[6].def,
TransformOptions_Number[7].def,
TransformOptions_Number[8].def);
} }
} }
GMSH_TransformPlugin::GMSH_TransformPlugin(double d11, double d12, double d13, GMSH_TransformPlugin::GMSH_TransformPlugin()
double d21, double d22, double d23,
double d31, double d32, double d33)
{ {
mat[0][0] = d11; mat[0][1] = d12; mat[0][2] = d13;
mat[1][0] = d21; mat[1][1] = d22; mat[1][2] = d23;
mat[2][0] = d31; mat[2][1] = d32; mat[2][2] = d33;
} }
void GMSH_TransformPlugin::getName(char *name) const void GMSH_TransformPlugin::getName(char *name) const
...@@ -78,6 +65,7 @@ extern List_T *Post_ViewList; ...@@ -78,6 +65,7 @@ extern List_T *Post_ViewList;
Post_View *GMSH_TransformPlugin::execute (Post_View *v) Post_View *GMSH_TransformPlugin::execute (Post_View *v)
{ {
Post_View *vv; Post_View *vv;
double mat[3][3];
mat[0][0] = TransformOptions_Number[0].def; mat[0][0] = TransformOptions_Number[0].def;
mat[0][1] = TransformOptions_Number[1].def; mat[0][1] = TransformOptions_Number[1].def;
......
...@@ -8,11 +8,8 @@ extern "C" ...@@ -8,11 +8,8 @@ extern "C"
class GMSH_TransformPlugin : public GMSH_Post_Plugin class GMSH_TransformPlugin : public GMSH_Post_Plugin
{ {
double mat[3][3];
public: public:
GMSH_TransformPlugin(double a11, double a12, double a13, GMSH_TransformPlugin();
double a21, double a22, double a23,
double a31, double a32, double a33);
virtual void Run(); virtual void Run();
virtual void Save(); virtual void Save();
virtual void getName (char *name) const; virtual void getName (char *name) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment