1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
 * SizingFunctionVar.cpp
 *
 *  Created on: Jun 24, 2011
 *      Author: iulian
 */

#include "meshkit/SizingFunctionVar.hpp"

namespace MeshKit {

SizingFunctionVar::SizingFunctionVar(MKCore *mkcore, int num_int, double int_size):<--- Member variable 'SizingFunctionVar::a' is not initialized in the constructor.<--- Member variable 'SizingFunctionVar::b' is not initialized in the constructor.<--- Member variable 'SizingFunctionVar::c' is not initialized in the constructor.<--- Member variable 'SizingFunctionVar::d' is not initialized in the constructor.<--- Member variable 'SizingFunctionVar::fixed' is not initialized in the constructor.
    SizingFunction(mkcore, num_int, int_size)
{
  // TODO Auto-generated constructor stub

}

SizingFunctionVar::~SizingFunctionVar()
{
  // TODO Auto-generated destructor stub
}

void SizingFunctionVar::set_linear_coeff(double * fixedPoint, double * coeff)<--- The function 'set_linear_coeff' is never used.
{
  fixed[0] = fixedPoint[0];
  fixed[1] = fixedPoint[1];
  fixed[2] = fixedPoint[2];
  a = coeff[0]; b= coeff[1]; c=coeff[2]; d = coeff[3];
}

// another version, easier to pythonize
// this is just because I don't understand swig
void SizingFunctionVar::set_coeff(double x0, double y0, double z0, double a1,<--- The function 'set_coeff' is never used.
      double b1, double c1, double d1)
{
  fixed[0] = x0;
  fixed[1] = y0;
  fixed[2] = z0;
  a = a1; b= b1; c=c1; d = d1;
}

double SizingFunctionVar::size(double *xyz ) const
{
  double sz = d;
  if (xyz)
  {
    sz = sz+(xyz[0]-fixed[0])*a + (xyz[1]-fixed[1])*b + (xyz[2]-fixed[2])*c ;
  }
  return sz;
}
}