[357fba] | 1 | /*
|
---|
| 2 | * TesselationHelpers.hpp
|
---|
| 3 | *
|
---|
| 4 | * Auxiliary functions for the tesselation.
|
---|
| 5 | *
|
---|
| 6 | * Created on: Aug 3, 2009
|
---|
| 7 | * Author: heber
|
---|
| 8 | */
|
---|
| 9 |
|
---|
| 10 | #ifndef TESSELATIONHELPERS_HPP_
|
---|
| 11 | #define TESSELATIONHELPERS_HPP_
|
---|
| 12 |
|
---|
| 13 | using namespace std;
|
---|
| 14 |
|
---|
| 15 | // include config.h
|
---|
| 16 | #ifdef HAVE_CONFIG_H
|
---|
| 17 | #include <config.h>
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
| 20 | #include <gsl/gsl_linalg.h>
|
---|
| 21 | #include <gsl/gsl_matrix.h>
|
---|
| 22 | #include <gsl/gsl_multimin.h>
|
---|
| 23 | #include <gsl/gsl_permutation.h>
|
---|
| 24 | #include <gsl/gsl_vector.h>
|
---|
| 25 |
|
---|
[91e7e4a] | 26 | #include "defs.hpp"
|
---|
[57066a] | 27 | #include "tesselation.hpp"
|
---|
[357fba] | 28 | #include "vector.hpp"
|
---|
| 29 |
|
---|
[91e7e4a] | 30 | #define HULLEPSILON 1e-10
|
---|
| 31 |
|
---|
[f1cccd] | 32 | double DetGet(gsl_matrix *A, int inPlace);
|
---|
| 33 | void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS);
|
---|
| 34 | void GetCenterOfSphere(Vector* Center, Vector a, Vector b, Vector c, Vector *NewUmkreismittelpunkt, Vector* Direction, Vector* AlternativeDirection, double HalfplaneIndicator, double AlternativeIndicator, double alpha, double beta, double gamma, double RADIUS, double Umkreisradius);
|
---|
[357fba] | 35 | void GetCenterofCircumcircle(Vector *Center, Vector *a, Vector *b, Vector *c);
|
---|
| 36 | double GetPathLengthonCircumCircle(Vector &CircleCenter, Vector &CirclePlaneNormal, double CircleRadius, Vector &NewSphereCenter, Vector &OldSphereCenter, Vector &NormalVector, Vector &SearchDirection);
|
---|
| 37 | double MinIntersectDistance(const gsl_vector * x, void *params);
|
---|
| 38 | bool existsIntersection(Vector point1, Vector point2, Vector point3, Vector point4);
|
---|
[91e7e4a] | 39 | double CalculateVolumeofGeneralTetraeder(Vector *a, Vector *b, Vector *c, Vector *d);
|
---|
[57066a] | 40 | double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);
|
---|
| 41 |
|
---|
| 42 | bool CheckLineCriteriaForDegeneratedTriangle(class BoundaryPointSet *nodes[3]);
|
---|
| 43 | bool SortCandidates(class CandidateForTesselation* candidate1, class CandidateForTesselation* candidate2);
|
---|
| 44 | TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC);
|
---|
| 45 | TesselPoint* FindSecondClosestPoint(const Vector*, LinkedCell*);
|
---|
| 46 | Vector * GetClosestPointBetweenLine(ofstream *out, class BoundaryLineSet *Base, class BoundaryLineSet *OtherBase);
|
---|
| 47 |
|
---|
| 48 | void WriteTecplotFile(ofstream *out, ofstream *tecplot, class Tesselation *TesselStruct, PointCloud *cloud, int N);
|
---|
| 49 | void WriteRaster3dFile(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, PointCloud *cloud);
|
---|
| 50 | void IncludeSphereinRaster3D(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, PointCloud *cloud);
|
---|
| 51 | void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, PointCloud *cloud);
|
---|
[7dea7c] | 52 | void CalculateConcavityPerBoundaryPoint(ofstream *out, class Tesselation *TesselStruct);
|
---|
| 53 |
|
---|
| 54 | bool CheckListOfBaselines(ofstream *out, Tesselation *TesselStruct);
|
---|
[91e7e4a] | 55 |
|
---|
[357fba] | 56 |
|
---|
| 57 | #endif /* TESSELATIONHELPERS_HPP_ */
|
---|