Changeset 48cd93 for molecuilder/src/tesselationhelpers.cpp
- Timestamp:
- Aug 17, 2009, 1:20:16 PM (16 years ago)
- Children:
- d6b011
- Parents:
- 3de1d2
- File:
-
- 1 edited
-
molecuilder/src/tesselationhelpers.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/tesselationhelpers.cpp
r3de1d2 r48cd93 8 8 #include "tesselationhelpers.hpp" 9 9 10 double det_get(gsl_matrix *A, int inPlace) {10 double DetGet(gsl_matrix *A, int inPlace) { 11 11 /* 12 12 inPlace = 1 => A is replaced with the LU decomposed copy. … … 36 36 }; 37 37 38 void get_sphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS)38 void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS) 39 39 { 40 40 gsl_matrix *A = gsl_matrix_calloc(3,3); … … 46 46 gsl_matrix_set(A, i, 2, c.x[i]); 47 47 } 48 m11 = det_get(A, 1);48 m11 = DetGet(A, 1); 49 49 50 50 for(int i=0;i<3;i++) { … … 53 53 gsl_matrix_set(A, i, 2, c.x[i]); 54 54 } 55 m12 = det_get(A, 1);55 m12 = DetGet(A, 1); 56 56 57 57 for(int i=0;i<3;i++) { … … 60 60 gsl_matrix_set(A, i, 2, c.x[i]); 61 61 } 62 m13 = det_get(A, 1);62 m13 = DetGet(A, 1); 63 63 64 64 for(int i=0;i<3;i++) { … … 67 67 gsl_matrix_set(A, i, 2, b.x[i]); 68 68 } 69 m14 = det_get(A, 1);69 m14 = DetGet(A, 1); 70 70 71 71 if (fabs(m11) < MYEPSILON) … … 101 101 * @param Umkreisradius double radius of circumscribing circle 102 102 */ 103 void Get _center_of_sphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection,103 void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection, 104 104 double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius) 105 105 { … … 107 107 double Restradius; 108 108 Vector OtherCenter; 109 cout << Verbose(3) << "Begin of Get _center_of_sphere.\n";109 cout << Verbose(3) << "Begin of GetCenterOfSphere.\n"; 110 110 Center->Zero(); 111 111 helper.CopyVector(&a); … … 153 153 Center->AddVector(&TempNormal); 154 154 cout << Verbose(0) << "Center of sphere of circumference is " << *Center << ".\n"; 155 get_sphere(&OtherCenter, a, b, c, RADIUS);155 GetSphere(&OtherCenter, a, b, c, RADIUS); 156 156 cout << Verbose(0) << "OtherCenter of sphere of circumference is " << OtherCenter << ".\n"; 157 cout << Verbose(3) << "End of Get _center_of_sphere.\n";157 cout << Verbose(3) << "End of GetCenterOfSphere.\n"; 158 158 }; 159 159 … … 307 307 gsl_multimin_fminimizer *s = NULL; 308 308 gsl_vector *ss, *x; 309 gsl_multimin_function minex _func;309 gsl_multimin_function minexFunction; 310 310 311 311 size_t iter = 0; … … 324 324 325 325 /* Initialize method and iterate */ 326 minex _func.n = NDIM;327 minex _func.f = &MinIntersectDistance;328 minex _func.params = (void *)∥326 minexFunction.n = NDIM; 327 minexFunction.f = &MinIntersectDistance; 328 minexFunction.params = (void *)∥ 329 329 330 330 s = gsl_multimin_fminimizer_alloc(T, NDIM); 331 gsl_multimin_fminimizer_set(s, &minex _func, x, ss);331 gsl_multimin_fminimizer_set(s, &minexFunction, x, ss); 332 332 333 333 do {
Note:
See TracChangeset
for help on using the changeset viewer.
