Commit 8d32c830 by Andrew Maclean

### STYLE: Changed parameter names in Evaluate and EvaluateScalar

parent 8e2a4000
 ... ... @@ -16,7 +16,7 @@ #include "vtkObjectFactory.h" #include "vtkMath.h" vtkCxxRevisionMacro(vtkParametricConicSpiral, "1.1"); vtkCxxRevisionMacro(vtkParametricConicSpiral, "1.2"); vtkStandardNewMacro(vtkParametricConicSpiral); vtkParametricConicSpiral::vtkParametricConicSpiral() ... ... @@ -50,31 +50,13 @@ vtkParametricConicSpiral::~vtkParametricConicSpiral() { } void vtkParametricConicSpiral::Evaluate(double U[3], double Pt[3], double DU[9]) void vtkParametricConicSpiral::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = U[0]; double v = U[1]; double *Du = DU; double *Dv = DU + 3; // A parametric representation of a conic spiral surface // Define: // - X(u,v) = a*(1-v/(2*pi))*cos(n*v)*(1+cos(u))+c*cos(n*v) // - Y(u,v) = a*(1-v/(2*pi))*sin(n*v)*(1+cos(u))+c*sin(n*v) // - Z(u,v) = b*v/(2*pi)+a*(1-v/(2*pi))*sin(u) // // Where: a=0.2,b=1,c=0.1,n=2,u=0..2*pi},v=0..2*pi // // Then // - S(u,v) = (X(u,v),Y(u,v),Z(u,v)) defines the surface. // // The derivatives are given by: // - d(X(u,v)/du = -a*(1-1/2*v/pi)*cos(n*v)*sin(u) // - d(X(u,v)/dv = -1/2*a/pi*cos(n*v)*(1+cos(u))-a*(1-1/2*v/pi)*sin(n*v)*n*(1+cos(u))-c*sin(n*v)*n // - d(Y(u,v)/du = -a*(1-1/2*v/pi)*sin(n*v)*sin(u) // - d(Y(u,v)/dv = -1/2*a/Pi*sin(n*v)*(1+cos(u))+a*(1-1/2*v/pi)*cos(n*v)*n*(1+cos(u))+c*cos(n*v)*n // - d(Z(u,v)/du = a*(1-1/2*v/pi)*cos(u) // - d(Z(u,v)/dv = 1/2*b/pi-1/2*a/pi*sin(u) double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw + 3; double inv2pi = 1.0/(2.0*vtkMath::Pi()); double cnv = cos(this->N*v); ... ...
 ... ... @@ -93,10 +93,10 @@ public: // This function performs the mapping fn(u,v)->(x,y,x), returning it // as Pt. It also returns the partial derivatives Du and Dv. // Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv) void Evaluate(double u[3], double Pt[3], double Du[9]); void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,v,Pt,Du,Dv. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u,v are the parameters with Pt being the the cartesian point, // Du, Dv are the derivatives of this point with respect to u and v. ... ... @@ -107,7 +107,7 @@ public: // // If the user does not need to calculate a scalar, then the // instantiated function should return zero. double EvaluateScalar(double u[3], double Pt[3], double Du[9]); double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricConicSpiral(); ... ...
 ... ... @@ -16,7 +16,7 @@ #include "vtkObjectFactory.h" #include "vtkMath.h" vtkCxxRevisionMacro(vtkParametricFigure8Klein, "1.1"); vtkCxxRevisionMacro(vtkParametricFigure8Klein, "1.2"); vtkStandardNewMacro(vtkParametricFigure8Klein); vtkParametricFigure8Klein::vtkParametricFigure8Klein() ... ... @@ -40,12 +40,12 @@ vtkParametricFigure8Klein::~vtkParametricFigure8Klein() { } void vtkParametricFigure8Klein::Evaluate(double U[3], double Pt[3], double Duv[9]) void vtkParametricFigure8Klein::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = U[0]; double v = U[1]; double *Du = Duv; double *Dv = Duv + 3; double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw + 3; double cu = cos(u); double cu2 = cos(u / 2); ... ...
 ... ... @@ -92,10 +92,10 @@ public: // This function performs the mapping fn(u,v)->(x,y,x), returning it as // Pt. It also returns the partial derivatives Du and Dv. Pt = (x, y, z), // Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv) virtual void Evaluate(double u[3], double Pt[3], double Du[9]); virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,v,Pt,Du,Dv. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u,v are the parameters with Pt being the the cartesian point, // Du, Dv are the derivatives of this point with respect to u and v. ... ... @@ -107,7 +107,7 @@ public: // If the user does not need to calculate a scalar, then the // instantiated function should return zero. // virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]); virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricFigure8Klein(); ... ...
 ... ... @@ -16,7 +16,7 @@ #include "vtkObjectFactory.h" #include "vtkMath.h" vtkCxxRevisionMacro(vtkParametricKlein, "1.1"); vtkCxxRevisionMacro(vtkParametricKlein, "1.2"); vtkStandardNewMacro(vtkParametricKlein); vtkParametricKlein::vtkParametricKlein() ... ... @@ -39,12 +39,12 @@ vtkParametricKlein::~vtkParametricKlein() { } void vtkParametricKlein::Evaluate(double U[3], double Pt[3], double Duv[9]) void vtkParametricKlein::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = U[0]; double v = U[1]; double *Du = Duv; double *Dv = Duv + 3; double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw + 3; double cu = cos(u); double su = sin(u); ... ...
 ... ... @@ -110,10 +110,10 @@ public: // This function performs the mapping Evaluate(u)->(x), returning it // as Pt. It also returns the partial derivatives Du and Dv. // Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv). virtual void Evaluate(double u[3], double Pt[3], double Du[9]); virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,Pt,Du. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u[3] are the parameters with Pt being the the cartesian point, // Du[9] are the derivatives of this point with respect to u and v. ... ... @@ -125,7 +125,7 @@ public: // If the user does not need to calculate a scalar, then the // instantiated function should return zero. // virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]); virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricKlein(); ... ...
 ... ... @@ -16,7 +16,7 @@ #include "vtkObjectFactory.h" #include "vtkMath.h" vtkCxxRevisionMacro(vtkParametricMobius, "1.1"); vtkCxxRevisionMacro(vtkParametricMobius, "1.2"); vtkStandardNewMacro(vtkParametricMobius); vtkParametricMobius::vtkParametricMobius() ... ... @@ -40,12 +40,12 @@ vtkParametricMobius::~vtkParametricMobius() { } void vtkParametricMobius::Evaluate(double U[3], double Pt[3], double Duv[9]) void vtkParametricMobius::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = U[0]; double v = U[1]; double *Du = Duv; double *Dv = Duv+3; double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw+3; double cu = cos(u); double cu2 = cos( u / 2 ); ... ...
 ... ... @@ -77,10 +77,10 @@ public: // This function performs the mapping fn(u,v)->(x,y,x), returning it // as Pt. It also returns the partial derivatives Du and Dv. // Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv) virtual void Evaluate(double u[3], double Pt[3], double Du[9]); virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,v,Pt,Du,Dv. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u,v are the parameters with Pt being the the cartesian point, // Du, Dv are the derivatives of this point with respect to u and v. ... ... @@ -92,7 +92,7 @@ public: // If the user does not need to calculate a scalar, then the // instantiated function should return zero. // virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]); virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricMobius(); ... ...
 ... ... @@ -17,7 +17,7 @@ #include "vtkMath.h" #include vtkCxxRevisionMacro(vtkParametricSuperEllipsoid, "1.1"); vtkCxxRevisionMacro(vtkParametricSuperEllipsoid, "1.2"); vtkStandardNewMacro(vtkParametricSuperEllipsoid); vtkParametricSuperEllipsoid::vtkParametricSuperEllipsoid() : ... ... @@ -45,12 +45,12 @@ vtkParametricSuperEllipsoid::~vtkParametricSuperEllipsoid() { } void vtkParametricSuperEllipsoid::Evaluate(double U[3], double Pt[3], double Duv[9]) void vtkParametricSuperEllipsoid::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = U[0]; double v = U[1]; double *Du = Duv; double *Dv = Duv + 3; double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw + 3; for ( int i = 0; i < 3; ++i) { ... ...
 ... ... @@ -196,10 +196,10 @@ public: // This function performs the mapping fn(u,v)->(x,y,x), returning it // as Pt. It also returns the partial derivatives Du and Dv. // Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv) void Evaluate(double u[3], double Pt[3], double Du[9]); void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,v,Pt,Du,Dv. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u,v are the parameters with Pt being the the cartesian point, // Du, Dv are the derivatives of this point with respect to u and v. ... ... @@ -211,7 +211,7 @@ public: // If the user does not need to calculate a scalar, then the // instantiated function should return zero. // double EvaluateScalar(double u[3], double Pt[3], double Du[9]); double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricSuperEllipsoid(); ... ...
 ... ... @@ -17,7 +17,7 @@ #include "vtkMath.h" #include vtkCxxRevisionMacro(vtkParametricSuperToroid, "1.1"); vtkCxxRevisionMacro(vtkParametricSuperToroid, "1.2"); vtkStandardNewMacro(vtkParametricSuperToroid); vtkParametricSuperToroid::vtkParametricSuperToroid() : ... ... @@ -48,12 +48,12 @@ vtkParametricSuperToroid::~vtkParametricSuperToroid() } void vtkParametricSuperToroid::Evaluate(double U[3], double Pt[3], double Duv[9]) void vtkParametricSuperToroid::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = U[0]; double v = U[1]; double *Du = Duv; double *Dv = Duv + 3; double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw + 3; for ( int i = 0; i < 3; ++i) { ... ...
 ... ... @@ -139,10 +139,10 @@ public: // as Pt. It also returns the partial derivatives Du and Dv. // Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv) // void Evaluate(double u[3], double Pt[3], double Du[9]); void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,v,Pt,Du,Dv. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u,v are the parameters with Pt being the the cartesian point, Du, Dv are // the derivatives of this point with respect to u and v. Pt, Du, Dv are ... ... @@ -154,7 +154,7 @@ public: // If the user does not need to calculate a scalar, then the // instantiated function should return zero. // double EvaluateScalar(double u[3], double Pt[3], double Du[9]); double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricSuperToroid(); ... ...
 ... ... @@ -16,7 +16,7 @@ #include "vtkObjectFactory.h" #include "vtkMath.h" vtkCxxRevisionMacro(vtkParametricTorus, "1.1"); vtkCxxRevisionMacro(vtkParametricTorus, "1.2"); vtkStandardNewMacro(vtkParametricTorus); vtkParametricTorus::vtkParametricTorus() : ... ... @@ -39,12 +39,12 @@ vtkParametricTorus::~vtkParametricTorus() { } void vtkParametricTorus::Evaluate(double uv[3], double Pt[3], double Duv[9]) void vtkParametricTorus::Evaluate(double uvw[3], double Pt[3], double Duvw[9]) { double u = uv[0]; double v = uv[1]; double *Du = Duv; double *Dv = Duv + 3; double u = uvw[0]; double v = uvw[1]; double *Du = Duvw; double *Dv = Duvw + 3; double cu = cos(u); double su = sin(u); ... ...
 ... ... @@ -92,10 +92,10 @@ public: // as Pt. It also returns the partial derivatives Du and Dv. // Pt = (x, y, z), Du = (dx/du, dy/du, dz/du), Dv = (dx/dv, dy/dv, dz/dv) // virtual void Evaluate(double u[3], double Pt[3], double Du[9]); virtual void Evaluate(double uvw[3], double Pt[3], double Duvw[9]); // Description: // Calculate a user defined scalar using one or all of u,Pt,Du. // Calculate a user defined scalar using one or all of uvw,Pt,Duvw. // // u[3] are the parameters with Pt being the the Cartesian point, // Du[9] are the derivatives of this point with respect to u and v. ... ... @@ -107,7 +107,7 @@ public: // If the user does not need to calculate a scalar, then the // instantiated function should return zero. // virtual double EvaluateScalar(double u[3], double Pt[3], double Du[9]); virtual double EvaluateScalar(double uvw[3], double Pt[3], double Duvw[9]); protected: vtkParametricTorus(); ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!