source: molecuilder/src/tesselationhelpers.hpp@ 60cbe5

Last change on this file since 60cbe5 was 60cbe5, checked in by Frederik Heber <heber@…>, 16 years ago

Various fixes and attempt to get convex hull working.

Moved tesselation writing to tesselation.cpp

  • WriteVrmlFile(), WriteRaster3dFile(), WriteTecplotFile() moved to tesselation.cpp
  • these also don't use molecule anymore, but the PointCloud structure (hence, bonds are no more visible)
  • new function TesselStruct::Output() which performs the writing
  • new function InsertSphereInRaster3D(), which places a sphere at the position of the last triangle
  • Property mode set to 100644
File size: 2.4 KB
Line 
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
13using 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
26#include "defs.hpp"
27#include "tesselation.hpp"
28#include "vector.hpp"
29
30#define HULLEPSILON 1e-10
31
32double DetGet(gsl_matrix *A, int inPlace);
33void GetSphere(Vector *center, Vector &a, Vector &b, Vector &c, double RADIUS);
34void 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);
35void GetCenterofCircumcircle(Vector *Center, Vector *a, Vector *b, Vector *c);
36double GetPathLengthonCircumCircle(Vector &CircleCenter, Vector &CirclePlaneNormal, double CircleRadius, Vector &NewSphereCenter, Vector &OldSphereCenter, Vector &NormalVector, Vector &SearchDirection);
37double MinIntersectDistance(const gsl_vector * x, void *params);
38bool existsIntersection(Vector point1, Vector point2, Vector point3, Vector point4);
39double CalculateVolumeofGeneralTetraeder(Vector *a, Vector *b, Vector *c, Vector *d);
40double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);
41
42bool CheckLineCriteriaForDegeneratedTriangle(class BoundaryPointSet *nodes[3]);
43bool SortCandidates(class CandidateForTesselation* candidate1, class CandidateForTesselation* candidate2);
44TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC);
45TesselPoint* FindSecondClosestPoint(const Vector*, LinkedCell*);
46Vector * GetClosestPointBetweenLine(ofstream *out, class BoundaryLineSet *Base, class BoundaryLineSet *OtherBase);
47
48void WriteTecplotFile(ofstream *out, ofstream *tecplot, class Tesselation *TesselStruct, PointCloud *cloud, int N);
49void WriteRaster3dFile(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, PointCloud *cloud);
50void IncludeSphereinRaster3D(ofstream *out, ofstream *rasterfile, class Tesselation *Tess, PointCloud *cloud);
51void WriteVrmlFile(ofstream *out, ofstream *vrmlfile, class Tesselation *Tess, PointCloud *cloud);
52
53
54#endif /* TESSELATIONHELPERS_HPP_ */
Note: See TracBrowser for help on using the repository browser.