mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
dll_headers for geometry dll (only 2D yet)
This commit is contained in:
parent
16f5742c37
commit
3d2f7d7457
@ -17,8 +17,8 @@ extern "C" int Ng_CSG_Init (Tcl_Interp * interp);
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
extern NetgenGeometry * ng_geometry;
|
||||
extern AutoPtr<Mesh> mesh;
|
||||
extern DLL_HEADER NetgenGeometry * ng_geometry;
|
||||
extern DLL_HEADER AutoPtr<Mesh> mesh;
|
||||
|
||||
static VisualSceneGeometry vsgeom;
|
||||
|
||||
|
@ -28,10 +28,10 @@ namespace netgen
|
||||
int nr;
|
||||
|
||||
public:
|
||||
Identification (int anr, const CSGeometry & ageom);
|
||||
virtual ~Identification ();
|
||||
virtual void Print (ostream & ost) const = 0;
|
||||
virtual void GetData (ostream & ost) const = 0;
|
||||
DLL_HEADER Identification (int anr, const CSGeometry & ageom);
|
||||
DLL_HEADER virtual ~Identification ();
|
||||
DLL_HEADER virtual void Print (ostream & ost) const = 0;
|
||||
DLL_HEADER virtual void GetData (ostream & ost) const = 0;
|
||||
|
||||
/// obsolete
|
||||
// virtual void IdentifySpecialPoints (Array<class SpecialPoint> & points);
|
||||
|
@ -30,56 +30,56 @@ class Flags
|
||||
SYMBOLTABLE<Array<double>*> numlistflags;
|
||||
public:
|
||||
///
|
||||
Flags ();
|
||||
DLL_HEADER Flags ();
|
||||
///
|
||||
~Flags ();
|
||||
DLL_HEADER ~Flags ();
|
||||
|
||||
/// Deletes all flags
|
||||
void DeleteFlags ();
|
||||
DLL_HEADER void DeleteFlags ();
|
||||
/// Sets string flag, overwrite if exists
|
||||
void SetFlag (const char * name, const char * val);
|
||||
DLL_HEADER void SetFlag (const char * name, const char * val);
|
||||
/// Sets numerical flag, overwrite if exists
|
||||
void SetFlag (const char * name, double val);
|
||||
DLL_HEADER void SetFlag (const char * name, double val);
|
||||
/// Sets boolean flag
|
||||
void SetFlag (const char * name);
|
||||
DLL_HEADER void SetFlag (const char * name);
|
||||
/// Sets string arary falg
|
||||
void SetFlag (const char * name, const Array<char*> & val);
|
||||
DLL_HEADER void SetFlag (const char * name, const Array<char*> & val);
|
||||
/// Sets double array flag
|
||||
void SetFlag (const char * name, const Array<double> & val);
|
||||
DLL_HEADER void SetFlag (const char * name, const Array<double> & val);
|
||||
|
||||
/// Save flags to file
|
||||
void SaveFlags (const char * filename) const;
|
||||
DLL_HEADER void SaveFlags (const char * filename) const;
|
||||
/// write flags to stream
|
||||
void PrintFlags (ostream & ost) const;
|
||||
DLL_HEADER void PrintFlags (ostream & ost) const;
|
||||
/// Load flags from file
|
||||
void LoadFlags (const char * filename);
|
||||
DLL_HEADER void LoadFlags (const char * filename);
|
||||
/// set flag of form -name=hello -val=0.5 -defined
|
||||
void SetCommandLineFlag (const char * st);
|
||||
DLL_HEADER void SetCommandLineFlag (const char * st);
|
||||
|
||||
/// Returns string flag, default value if not exists
|
||||
const char * GetStringFlag (const char * name, const char * def) const;
|
||||
DLL_HEADER const char * GetStringFlag (const char * name, const char * def) const;
|
||||
/// Returns numerical flag, default value if not exists
|
||||
double GetNumFlag (const char * name, double def) const;
|
||||
DLL_HEADER double GetNumFlag (const char * name, double def) const;
|
||||
/// Returns address of numerical flag, null if not exists
|
||||
const double * GetNumFlagPtr (const char * name) const;
|
||||
DLL_HEADER const double * GetNumFlagPtr (const char * name) const;
|
||||
/// Returns address of numerical flag, null if not exists
|
||||
double * GetNumFlagPtr (const char * name);
|
||||
DLL_HEADER double * GetNumFlagPtr (const char * name);
|
||||
/// Returns boolean flag
|
||||
bool GetDefineFlag (const char * name) const;
|
||||
DLL_HEADER bool GetDefineFlag (const char * name) const;
|
||||
/// Returns string list flag, empty array if not exist
|
||||
const Array<char*> & GetStringListFlag (const char * name) const;
|
||||
DLL_HEADER const Array<char*> & GetStringListFlag (const char * name) const;
|
||||
/// Returns num list flag, empty array if not exist
|
||||
const Array<double> & GetNumListFlag (const char * name) const;
|
||||
DLL_HEADER const Array<double> & GetNumListFlag (const char * name) const;
|
||||
|
||||
|
||||
/// Test, if string flag is defined
|
||||
bool StringFlagDefined (const char * name) const;
|
||||
DLL_HEADER bool StringFlagDefined (const char * name) const;
|
||||
/// Test, if num flag is defined
|
||||
bool NumFlagDefined (const char * name) const;
|
||||
DLL_HEADER bool NumFlagDefined (const char * name) const;
|
||||
/// Test, if string list flag is defined
|
||||
bool StringListFlagDefined (const char * name) const;
|
||||
DLL_HEADER bool StringListFlagDefined (const char * name) const;
|
||||
/// Test, if num list flag is defined
|
||||
bool NumListFlagDefined (const char * name) const;
|
||||
DLL_HEADER bool NumListFlagDefined (const char * name) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -45,17 +45,17 @@ istream& operator >> (istream &, MyStr &);
|
||||
class MyStr
|
||||
{
|
||||
public:
|
||||
MyStr();
|
||||
MyStr(const char *);
|
||||
MyStr(char);
|
||||
MyStr(const MyStr &);
|
||||
MyStr(int);
|
||||
MyStr(void *);
|
||||
MyStr(long);
|
||||
MyStr(double);
|
||||
MyStr(const Point3d& p);
|
||||
MyStr(const Vec3d& p);
|
||||
MyStr(const string & st);
|
||||
DLL_HEADER MyStr();
|
||||
DLL_HEADER MyStr(const char *);
|
||||
DLL_HEADER MyStr(char);
|
||||
DLL_HEADER MyStr(const MyStr &);
|
||||
DLL_HEADER MyStr(int);
|
||||
DLL_HEADER MyStr(void *);
|
||||
DLL_HEADER MyStr(long);
|
||||
DLL_HEADER MyStr(double);
|
||||
DLL_HEADER MyStr(const Point3d& p);
|
||||
DLL_HEADER MyStr(const Vec3d& p);
|
||||
DLL_HEADER MyStr(const string & st);
|
||||
|
||||
~MyStr();
|
||||
MyStr Left(unsigned);
|
||||
|
@ -17,12 +17,12 @@ class NgException
|
||||
string what;
|
||||
public:
|
||||
///
|
||||
NgException (const string & s);
|
||||
DLL_HEADER NgException (const string & s);
|
||||
///
|
||||
virtual ~NgException ();
|
||||
DLL_HEADER virtual ~NgException ();
|
||||
|
||||
/// append string to description
|
||||
void Append (const string & s);
|
||||
DLL_HEADER void Append (const string & s);
|
||||
// void Append (const char * s);
|
||||
|
||||
/// verbal description of exception
|
||||
|
@ -528,7 +528,7 @@ namespace netgen
|
||||
mesh -> SetNextMajorTimeStamp();
|
||||
|
||||
|
||||
extern void Render();
|
||||
extern DLL_HEADER void Render();
|
||||
Render();
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,9 @@
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
extern NetgenGeometry * ng_geometry;
|
||||
|
||||
|
||||
extern DLL_HEADER NetgenGeometry * ng_geometry;
|
||||
static VisualSceneGeometry2d vsgeom2d;
|
||||
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace netgen
|
||||
|
||||
glBegin (GL_LINE_STRIP);
|
||||
for (int j = 0; j < points.Size(); j++)
|
||||
glVertex3f (points[j](0), points[j](1), 0);
|
||||
glVertex3d (points[j](0), points[j](1), 0);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
@ -76,8 +76,8 @@ namespace netgen
|
||||
glBegin (GL_LINES);
|
||||
for (int j = 1; j < 5; j++)
|
||||
{
|
||||
glVertex3f (points[j](0), points[j](1), 0);
|
||||
glVertex3f (otherpoints[j](0), otherpoints[j](1), 0);
|
||||
glVertex3d (points[j](0), points[j](1), 0);
|
||||
glVertex3d (otherpoints[j](0), otherpoints[j](1), 0);
|
||||
}
|
||||
glEnd ();
|
||||
}
|
||||
|
@ -449,12 +449,12 @@ class Point3dTree
|
||||
ADTree3 * tree;
|
||||
|
||||
public:
|
||||
Point3dTree (const Point<3> & pmin, const Point<3> & pmax);
|
||||
~Point3dTree ();
|
||||
void Insert (const Point<3> & p, int pi);
|
||||
DLL_HEADER Point3dTree (const Point<3> & pmin, const Point<3> & pmax);
|
||||
DLL_HEADER ~Point3dTree ();
|
||||
DLL_HEADER void Insert (const Point<3> & p, int pi);
|
||||
void DeleteElement (int pi)
|
||||
{ tree->DeleteElement(pi); }
|
||||
void GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
|
||||
DLL_HEADER void GetIntersecting (const Point<3> & pmin, const Point<3> & pmax,
|
||||
Array<int> & pis) const;
|
||||
const ADTree3 & Tree() const { return *tree; };
|
||||
};
|
||||
|
@ -41,10 +41,10 @@ namespace netgen
|
||||
inline Vec2d operator- (const Vec2d & p1, const Vec2d & v);
|
||||
inline Vec2d operator+ (const Vec2d & p1, const Vec2d & v);
|
||||
inline Vec2d operator* (double scal, const Vec2d & v);
|
||||
double Angle (const Vec2d & v);
|
||||
double FastAngle (const Vec2d & v);
|
||||
double Angle (const Vec2d & v1, const Vec2d & v2);
|
||||
double FastAngle (const Vec2d & v1, const Vec2d & v2);
|
||||
DLL_HEADER double Angle (const Vec2d & v);
|
||||
DLL_HEADER double FastAngle (const Vec2d & v);
|
||||
DLL_HEADER double Angle (const Vec2d & v1, const Vec2d & v2);
|
||||
DLL_HEADER double FastAngle (const Vec2d & v1, const Vec2d & v2);
|
||||
ostream & operator<<(ostream & s, const Vec2d & v);
|
||||
double Dist2(const Line2d & g, const Line2d & h ); // GH
|
||||
int Near (const Point2d & p1, const Point2d & p2, const double eps);
|
||||
@ -54,8 +54,8 @@ namespace netgen
|
||||
int IsOnLongLine (const Line2d & l, const Point2d & p);
|
||||
int Hit (const Line2d & l1, const Line2d & l2, double heps = EPSGEOM);
|
||||
ostream & operator<<(ostream & s, const Line2d & l);
|
||||
Point2d CrossPoint (const PLine2d & l1, const PLine2d & l2);
|
||||
Point2d CrossPoint (const Line2d & l1, const Line2d & l2);
|
||||
DLL_HEADER Point2d CrossPoint (const PLine2d & l1, const PLine2d & l2);
|
||||
DLL_HEADER Point2d CrossPoint (const Line2d & l1, const Line2d & l2);
|
||||
int Parallel (const PLine2d & l1, const PLine2d & l2, double peps = EPSGEOM);
|
||||
int IsOnLine (const PLine2d & l, const Point2d & p, double heps = EPSGEOM);
|
||||
int IsOnLongLine (const PLine2d & l, const Point2d & p);
|
||||
@ -290,13 +290,13 @@ namespace netgen
|
||||
/// Angle in [0,2*PI)
|
||||
|
||||
///
|
||||
friend double Angle (const Vec2d & v);
|
||||
friend DLL_HEADER double Angle (const Vec2d & v);
|
||||
///
|
||||
friend double FastAngle (const Vec2d & v);
|
||||
friend DLL_HEADER double FastAngle (const Vec2d & v);
|
||||
///
|
||||
friend double Angle (const Vec2d & v1, const Vec2d & v2);
|
||||
friend DLL_HEADER double Angle (const Vec2d & v1, const Vec2d & v2);
|
||||
///
|
||||
friend double FastAngle (const Vec2d & v1, const Vec2d & v2);
|
||||
friend DLL_HEADER double FastAngle (const Vec2d & v1, const Vec2d & v2);
|
||||
|
||||
///
|
||||
friend ostream & operator<<(ostream & s, const Vec2d & v);
|
||||
@ -356,7 +356,7 @@ namespace netgen
|
||||
friend double Dist2(const Line2d & g, const Line2d & h ); // GH
|
||||
|
||||
///
|
||||
friend Point2d CrossPoint (const Line2d & l1, const Line2d & l2);
|
||||
friend DLL_HEADER Point2d CrossPoint (const Line2d & l1, const Line2d & l2);
|
||||
/// returns 1 iff parallel
|
||||
friend int CrossPointBarycentric (const Line2d & l1, const Line2d & l2,
|
||||
double & lam1, double & lam2);
|
||||
|
@ -11,7 +11,7 @@ namespace netgen
|
||||
{
|
||||
|
||||
|
||||
extern void MyError (const char * ch);
|
||||
extern DLL_HEADER void MyError (const char * ch);
|
||||
|
||||
class Point3d;
|
||||
class Vec3d;
|
||||
|
@ -270,6 +270,66 @@ namespace netgen
|
||||
}
|
||||
|
||||
|
||||
template<int D>
|
||||
void SplineSeg3<D> :: LineIntersections (const double a, const double b, const double c,
|
||||
Array < Point<D> > & points, const double eps) const
|
||||
{
|
||||
points.SetSize(0);
|
||||
|
||||
double t;
|
||||
|
||||
const double c1 = a*p1(0) - sqrt(2.)*a*p2(0) + a*p3(0)
|
||||
+ b*p1(1) - sqrt(2.)*b*p2(1) + b*p3(1)
|
||||
+ (2.-sqrt(2.))*c;
|
||||
const double c2 = -2.*a*p1(0) + sqrt(2.)*a*p2(0) -2.*b*p1(1) + sqrt(2.)*b*p2(1) + (sqrt(2.)-2.)*c;
|
||||
const double c3 = a*p1(0) + b*p1(1) + c;
|
||||
|
||||
if(fabs(c1) < 1e-20)
|
||||
{
|
||||
if(fabs(c2) < 1e-20)
|
||||
return;
|
||||
|
||||
t = -c3/c2;
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
return;
|
||||
}
|
||||
|
||||
const double discr = c2*c2-4.*c1*c3;
|
||||
|
||||
if(discr < 0)
|
||||
return;
|
||||
|
||||
if(fabs(discr/(c1*c1)) < 1e-14)
|
||||
{
|
||||
t = -0.5*c2/c1;
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
return;
|
||||
}
|
||||
|
||||
t = (-c2 + sqrt(discr))/(2.*c1);
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
|
||||
t = (-c2 - sqrt(discr))/(2.*c1);
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
}
|
||||
|
||||
|
||||
template < int D >
|
||||
void SplineSeg3<D> :: GetRawData (Array<double> & data) const
|
||||
{
|
||||
data.Append(3);
|
||||
for(int i=0; i<D; i++)
|
||||
data.Append(p1[i]);
|
||||
for(int i=0; i<D; i++)
|
||||
data.Append(p2[i]);
|
||||
for(int i=0; i<D; i++)
|
||||
data.Append(p3[i]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template class SplineSeg3<2>;
|
||||
|
@ -154,7 +154,7 @@ namespace netgen
|
||||
virtual Vec<D> GetTangent (const double t) const;
|
||||
|
||||
|
||||
virtual void GetDerivatives (const double t,
|
||||
DLL_HEADER virtual void GetDerivatives (const double t,
|
||||
Point<D> & point,
|
||||
Vec<D> & first,
|
||||
Vec<D> & second) const;
|
||||
@ -169,14 +169,14 @@ namespace netgen
|
||||
|
||||
const GeomPoint<D> & TangentPoint (void) const { return p2; }
|
||||
|
||||
virtual void LineIntersections (const double a, const double b, const double c,
|
||||
DLL_HEADER virtual void LineIntersections (const double a, const double b, const double c,
|
||||
Array < Point<D> > & points, const double eps) const;
|
||||
|
||||
virtual double MaxCurvature(void) const;
|
||||
DLL_HEADER virtual double MaxCurvature(void) const;
|
||||
|
||||
virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const;
|
||||
DLL_HEADER virtual void Project (const Point<D> point, Point<D> & point_on_curve, double & t) const;
|
||||
|
||||
virtual void GetRawData (Array<double> & data) const;
|
||||
DLL_HEADER virtual void GetRawData (Array<double> & data) const;
|
||||
};
|
||||
|
||||
|
||||
@ -520,66 +520,6 @@ namespace netgen
|
||||
*/
|
||||
|
||||
|
||||
template<int D>
|
||||
void SplineSeg3<D> :: LineIntersections (const double a, const double b, const double c,
|
||||
Array < Point<D> > & points, const double eps) const
|
||||
{
|
||||
points.SetSize(0);
|
||||
|
||||
double t;
|
||||
|
||||
const double c1 = a*p1(0) - sqrt(2.)*a*p2(0) + a*p3(0)
|
||||
+ b*p1(1) - sqrt(2.)*b*p2(1) + b*p3(1)
|
||||
+ (2.-sqrt(2.))*c;
|
||||
const double c2 = -2.*a*p1(0) + sqrt(2.)*a*p2(0) -2.*b*p1(1) + sqrt(2.)*b*p2(1) + (sqrt(2.)-2.)*c;
|
||||
const double c3 = a*p1(0) + b*p1(1) + c;
|
||||
|
||||
if(fabs(c1) < 1e-20)
|
||||
{
|
||||
if(fabs(c2) < 1e-20)
|
||||
return;
|
||||
|
||||
t = -c3/c2;
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
return;
|
||||
}
|
||||
|
||||
const double discr = c2*c2-4.*c1*c3;
|
||||
|
||||
if(discr < 0)
|
||||
return;
|
||||
|
||||
if(fabs(discr/(c1*c1)) < 1e-14)
|
||||
{
|
||||
t = -0.5*c2/c1;
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
return;
|
||||
}
|
||||
|
||||
t = (-c2 + sqrt(discr))/(2.*c1);
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
|
||||
t = (-c2 - sqrt(discr))/(2.*c1);
|
||||
if((t > -eps) && (t < 1.+eps))
|
||||
points.Append(GetPoint(t));
|
||||
}
|
||||
|
||||
|
||||
template < int D >
|
||||
void SplineSeg3<D> :: GetRawData (Array<double> & data) const
|
||||
{
|
||||
data.Append(3);
|
||||
for(int i=0; i<D; i++)
|
||||
data.Append(p1[i]);
|
||||
for(int i=0; i<D; i++)
|
||||
data.Append(p2[i]);
|
||||
for(int i=0; i<D; i++)
|
||||
data.Append(p3[i]);
|
||||
}
|
||||
|
||||
|
||||
//########################################################################
|
||||
// circlesegment
|
||||
|
@ -29,11 +29,11 @@ namespace netgen
|
||||
Array < GeomPoint<D> > geompoints;
|
||||
Array < SplineSeg<D>* > splines;
|
||||
|
||||
~SplineGeometry();
|
||||
DLL_HEADER ~SplineGeometry();
|
||||
|
||||
int Load (const Array<double> & raw_data, const int startpos = 0);
|
||||
DLL_HEADER int Load (const Array<double> & raw_data, const int startpos = 0);
|
||||
|
||||
void GetRawData (Array<double> & raw_data) const;
|
||||
DLL_HEADER void GetRawData (Array<double> & raw_data) const;
|
||||
|
||||
|
||||
const Array<SplineSeg<D>*> & GetSplines () const
|
||||
@ -44,7 +44,7 @@ namespace netgen
|
||||
SplineSeg<D> & GetSpline (const int i) {return *splines[i];}
|
||||
const SplineSeg<D> & GetSpline (const int i) const {return *splines[i];}
|
||||
|
||||
void GetBoundingBox (Box<D> & box) const;
|
||||
DLL_HEADER void GetBoundingBox (Box<D> & box) const;
|
||||
Box<D> GetBoundingBox () const
|
||||
{ Box<D> box; GetBoundingBox (box); return box; }
|
||||
|
||||
@ -52,7 +52,7 @@ namespace netgen
|
||||
const GeomPoint<D> & GetPoint(int i) const { return geompoints[i]; }
|
||||
|
||||
// void SetGrading (const double grading);
|
||||
void AppendPoint (const Point<D> & p, const double reffac = 1., const bool hpref = false);
|
||||
DLL_HEADER void AppendPoint (const Point<D> & p, const double reffac = 1., const bool hpref = false);
|
||||
|
||||
|
||||
void AppendSegment(SplineSeg<D> * spline)
|
||||
|
@ -25,14 +25,16 @@
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef NGINTERFACE_EXPORTS
|
||||
#define DLL_HEADER __declspec(dllexport)
|
||||
#else
|
||||
#define DLL_HEADER __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define DLL_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define noDEMOVERSION
|
||||
#define noDEVELOP
|
||||
#define noSTEP
|
||||
|
@ -244,12 +244,12 @@ namespace netgen
|
||||
{
|
||||
double det;
|
||||
|
||||
if (m1.width != m1.height)
|
||||
if (m1.Width() != m1.Height())
|
||||
{
|
||||
(*myerr) << "CalcInverse: matrix not symmetric" << endl;
|
||||
return;
|
||||
}
|
||||
if (m1.width != m2.width || m1.height != m2.height)
|
||||
if (m1.Width() != m2.Width() || m1.Height() != m2.Height())
|
||||
{
|
||||
(*myerr) << "CalcInverse: dim(m2) != dim(m1)" << endl;
|
||||
return;
|
||||
@ -267,7 +267,7 @@ namespace netgen
|
||||
}
|
||||
|
||||
det = 1.0 / det;
|
||||
switch (m1.width)
|
||||
switch (m1.Width())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
|
@ -21,16 +21,16 @@ protected:
|
||||
|
||||
public:
|
||||
///
|
||||
DenseMatrix ();
|
||||
DLL_HEADER DenseMatrix ();
|
||||
///
|
||||
DenseMatrix (int h, int w = 0);
|
||||
DLL_HEADER DenseMatrix (int h, int w = 0);
|
||||
///
|
||||
DenseMatrix (const DenseMatrix & m2);
|
||||
DLL_HEADER DenseMatrix (const DenseMatrix & m2);
|
||||
///
|
||||
~DenseMatrix ();
|
||||
DLL_HEADER ~DenseMatrix ();
|
||||
|
||||
///
|
||||
void SetSize (int h, int w = 0);
|
||||
DLL_HEADER void SetSize (int h, int w = 0);
|
||||
|
||||
int Height() const { return height; }
|
||||
int Width() const {return width; }
|
||||
@ -41,19 +41,19 @@ public:
|
||||
double operator() (int i) const { return data[i]; }
|
||||
|
||||
///
|
||||
DenseMatrix & operator= (const DenseMatrix & m2);
|
||||
DLL_HEADER DenseMatrix & operator= (const DenseMatrix & m2);
|
||||
///
|
||||
DenseMatrix & operator+= (const DenseMatrix & m2);
|
||||
DLL_HEADER DenseMatrix & operator+= (const DenseMatrix & m2);
|
||||
///
|
||||
DenseMatrix & operator-= (const DenseMatrix & m2);
|
||||
DLL_HEADER DenseMatrix & operator-= (const DenseMatrix & m2);
|
||||
|
||||
///
|
||||
DenseMatrix & operator= (double v);
|
||||
DLL_HEADER DenseMatrix & operator= (double v);
|
||||
///
|
||||
DenseMatrix & operator*= (double v);
|
||||
DLL_HEADER DenseMatrix & operator*= (double v);
|
||||
|
||||
///
|
||||
void Mult (const FlatVector & v, FlatVector & prod) const
|
||||
DLL_HEADER void Mult (const FlatVector & v, FlatVector & prod) const
|
||||
{
|
||||
double sum;
|
||||
const double * mp, * sp;
|
||||
@ -106,11 +106,11 @@ public:
|
||||
}
|
||||
|
||||
///
|
||||
void MultTrans (const Vector & v, Vector & prod) const;
|
||||
DLL_HEADER void MultTrans (const Vector & v, Vector & prod) const;
|
||||
///
|
||||
void Residuum (const Vector & x, const Vector & b, Vector & res) const;
|
||||
DLL_HEADER void Residuum (const Vector & x, const Vector & b, Vector & res) const;
|
||||
///
|
||||
double Det () const;
|
||||
DLL_HEADER double Det () const;
|
||||
|
||||
///
|
||||
friend DenseMatrix operator* (const DenseMatrix & m1, const DenseMatrix & m2);
|
||||
@ -122,17 +122,17 @@ public:
|
||||
///
|
||||
friend void Mult (const DenseMatrix & m1, const DenseMatrix & m2, DenseMatrix & m3);
|
||||
///
|
||||
friend void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2);
|
||||
// friend void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2);
|
||||
///
|
||||
friend void CalcAAt (const DenseMatrix & a, DenseMatrix & m2);
|
||||
///
|
||||
friend void CalcAtA (const DenseMatrix & a, DenseMatrix & m2);
|
||||
// friend void CalcAtA (const DenseMatrix & a, DenseMatrix & m2);
|
||||
///
|
||||
friend void CalcABt (const DenseMatrix & a, const DenseMatrix & b, DenseMatrix & m2);
|
||||
///
|
||||
friend void CalcAtB (const DenseMatrix & a, const DenseMatrix & b, DenseMatrix & m2);
|
||||
///
|
||||
void Solve (const Vector & b, Vector & x) const;
|
||||
DLL_HEADER void Solve (const Vector & b, Vector & x) const;
|
||||
///
|
||||
void SolveDestroy (const Vector & b, Vector & x);
|
||||
///
|
||||
@ -270,8 +270,8 @@ extern ostream & operator<< (ostream & ost, const MatrixFixWidth<WIDTH> & m)
|
||||
};
|
||||
|
||||
|
||||
extern void CalcAtA (const DenseMatrix & a, DenseMatrix & m2);
|
||||
extern void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2);
|
||||
extern DLL_HEADER void CalcAtA (const DenseMatrix & a, DenseMatrix & m2);
|
||||
extern DLL_HEADER void CalcInverse (const DenseMatrix & m1, DenseMatrix & m2);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
namespace netgen
|
||||
{
|
||||
|
||||
Array<GeometryRegister*> geometryregister;
|
||||
DLL_HEADER Array<GeometryRegister*> geometryregister;
|
||||
|
||||
GeometryRegister :: ~GeometryRegister()
|
||||
{ ; }
|
||||
|
@ -13,7 +13,7 @@ struct Tcl_Interp;
|
||||
namespace netgen
|
||||
{
|
||||
|
||||
class NetgenGeometry
|
||||
class DLL_HEADER NetgenGeometry
|
||||
{
|
||||
public:
|
||||
virtual ~NetgenGeometry () { ; }
|
||||
@ -31,7 +31,7 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
class GeometryRegister
|
||||
class DLL_HEADER GeometryRegister
|
||||
{
|
||||
public:
|
||||
virtual ~GeometryRegister();
|
||||
@ -42,7 +42,7 @@ namespace netgen
|
||||
virtual void SetParameters (Tcl_Interp * interp) { ; }
|
||||
};
|
||||
|
||||
extern Array<GeometryRegister*> geometryregister;
|
||||
extern DLL_HEADER Array<GeometryRegister*> geometryregister;
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ extern void ZRefinement (Mesh &, const class NetgenGeometry *,
|
||||
|
||||
|
||||
|
||||
class Refinement
|
||||
class DLL_HEADER Refinement
|
||||
{
|
||||
MeshOptimize2d * optimizer2d;
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace netgen
|
||||
/// calling parameters
|
||||
// extern Flags parameters;
|
||||
|
||||
extern MeshingParameters mparam;
|
||||
extern DLL_HEADER MeshingParameters mparam;
|
||||
|
||||
extern Array<int> tets_in_qualclass;
|
||||
|
||||
|
@ -182,9 +182,9 @@ namespace netgen
|
||||
|
||||
|
||||
///
|
||||
Mesh();
|
||||
DLL_HEADER Mesh();
|
||||
///
|
||||
~Mesh();
|
||||
DLL_HEADER ~Mesh();
|
||||
|
||||
Mesh & operator= (const Mesh & mesh2);
|
||||
|
||||
@ -214,8 +214,8 @@ namespace netgen
|
||||
void SetAllocSize(int nnodes, int nsegs, int nsel, int nel);
|
||||
|
||||
|
||||
PointIndex AddPoint (const Point3d & p, int layer = 1);
|
||||
PointIndex AddPoint (const Point3d & p, int layer, POINTTYPE type);
|
||||
DLL_HEADER PointIndex AddPoint (const Point3d & p, int layer = 1);
|
||||
DLL_HEADER PointIndex AddPoint (const Point3d & p, int layer, POINTTYPE type);
|
||||
#ifdef PARALLEL
|
||||
PointIndex AddPoint (const Point3d & p, bool aisghost, int layer = 1);
|
||||
PointIndex AddPoint (const Point3d & p, bool aisghost, int layer, POINTTYPE type);
|
||||
@ -234,7 +234,7 @@ namespace netgen
|
||||
T_POINTS & Points() { return points; }
|
||||
|
||||
|
||||
SegmentIndex AddSegment (const Segment & s);
|
||||
DLL_HEADER SegmentIndex AddSegment (const Segment & s);
|
||||
void DeleteSegment (int segnr)
|
||||
{
|
||||
segments.Elem(segnr)[0] = PointIndex::BASE-1;
|
||||
@ -257,7 +257,7 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
SurfaceElementIndex AddSurfaceElement (const Element2d & el);
|
||||
DLL_HEADER SurfaceElementIndex AddSurfaceElement (const Element2d & el);
|
||||
void DeleteSurfaceElement (int eli)
|
||||
{
|
||||
surfelements.Elem(eli).Delete();
|
||||
@ -284,10 +284,10 @@ namespace netgen
|
||||
{ return surfelements[ei]; }
|
||||
|
||||
|
||||
void RebuildSurfaceElementLists ();
|
||||
void GetSurfaceElementsOfFace (int facenr, Array<SurfaceElementIndex> & sei) const;
|
||||
DLL_HEADER void RebuildSurfaceElementLists ();
|
||||
DLL_HEADER void GetSurfaceElementsOfFace (int facenr, Array<SurfaceElementIndex> & sei) const;
|
||||
|
||||
ElementIndex AddVolumeElement (const Element & el);
|
||||
DLL_HEADER ElementIndex AddVolumeElement (const Element & el);
|
||||
|
||||
int GetNE () const { return volelements.Size(); }
|
||||
|
||||
@ -311,10 +311,10 @@ namespace netgen
|
||||
|
||||
|
||||
///
|
||||
double ElementError (int eli) const;
|
||||
DLL_HEADER double ElementError (int eli) const;
|
||||
|
||||
///
|
||||
void AddLockedPoint (PointIndex pi);
|
||||
DLL_HEADER void AddLockedPoint (PointIndex pi);
|
||||
///
|
||||
void ClearLockedPoints ();
|
||||
|
||||
@ -341,7 +341,7 @@ namespace netgen
|
||||
boundary elements without inner element.
|
||||
Results are stored in openelements.
|
||||
if dom == 0, all sub-domains, else subdomain dom */
|
||||
void FindOpenElements (int dom = 0);
|
||||
DLL_HEADER void FindOpenElements (int dom = 0);
|
||||
|
||||
|
||||
/**
|
||||
@ -349,11 +349,11 @@ namespace netgen
|
||||
and surface elements without neighbours.
|
||||
store in opensegmentsy
|
||||
*/
|
||||
void FindOpenSegments (int surfnr = 0);
|
||||
DLL_HEADER void FindOpenSegments (int surfnr = 0);
|
||||
/**
|
||||
remove one layer of surface elements
|
||||
*/
|
||||
void RemoveOneLayerSurfaceElements ();
|
||||
DLL_HEADER void RemoveOneLayerSurfaceElements ();
|
||||
|
||||
|
||||
int GetNOpenSegments () { return opensegments.Size(); }
|
||||
@ -363,43 +363,43 @@ namespace netgen
|
||||
Checks overlap of boundary
|
||||
return == 1, iff overlap
|
||||
*/
|
||||
int CheckOverlappingBoundary ();
|
||||
DLL_HEADER int CheckOverlappingBoundary ();
|
||||
/**
|
||||
Checks consistent boundary
|
||||
return == 0, everything ok
|
||||
*/
|
||||
int CheckConsistentBoundary () const;
|
||||
DLL_HEADER int CheckConsistentBoundary () const;
|
||||
|
||||
/*
|
||||
checks element orientation
|
||||
*/
|
||||
int CheckVolumeMesh () const;
|
||||
DLL_HEADER int CheckVolumeMesh () const;
|
||||
|
||||
|
||||
/**
|
||||
finds average h of surface surfnr if surfnr > 0,
|
||||
else of all surfaces.
|
||||
*/
|
||||
double AverageH (int surfnr = 0) const;
|
||||
DLL_HEADER double AverageH (int surfnr = 0) const;
|
||||
/// Calculates localh
|
||||
void CalcLocalH ();
|
||||
DLL_HEADER void CalcLocalH ();
|
||||
///
|
||||
void SetLocalH (const Point3d & pmin, const Point3d & pmax, double grading);
|
||||
DLL_HEADER void SetLocalH (const Point3d & pmin, const Point3d & pmax, double grading);
|
||||
///
|
||||
void RestrictLocalH (const Point3d & p, double hloc);
|
||||
DLL_HEADER void RestrictLocalH (const Point3d & p, double hloc);
|
||||
///
|
||||
void RestrictLocalHLine (const Point3d & p1, const Point3d & p2,
|
||||
DLL_HEADER void RestrictLocalHLine (const Point3d & p1, const Point3d & p2,
|
||||
double hloc);
|
||||
/// number of elements per radius
|
||||
void CalcLocalHFromSurfaceCurvature(double elperr);
|
||||
DLL_HEADER void CalcLocalHFromSurfaceCurvature(double elperr);
|
||||
///
|
||||
void CalcLocalHFromPointDistances(void);
|
||||
DLL_HEADER void CalcLocalHFromPointDistances(void);
|
||||
///
|
||||
void RestrictLocalH (resthtype rht, int nr, double loch);
|
||||
DLL_HEADER void RestrictLocalH (resthtype rht, int nr, double loch);
|
||||
///
|
||||
void LoadLocalMeshSize (const char * meshsizefilename);
|
||||
DLL_HEADER void LoadLocalMeshSize (const char * meshsizefilename);
|
||||
///
|
||||
void SetGlobalH (double h);
|
||||
DLL_HEADER void SetGlobalH (double h);
|
||||
///
|
||||
void SetMinimalH (double h);
|
||||
///
|
||||
@ -416,10 +416,10 @@ namespace netgen
|
||||
bool LocalHFunctionGenerated(void) const { return (lochfunc != NULL); }
|
||||
|
||||
/// Find bounding box
|
||||
void GetBox (Point3d & pmin, Point3d & pmax, int dom = -1) const;
|
||||
DLL_HEADER void GetBox (Point3d & pmin, Point3d & pmax, int dom = -1) const;
|
||||
|
||||
/// Find bounding box of points of typ ptyp or less
|
||||
void GetBox (Point3d & pmin, Point3d & pmax, POINTTYPE ptyp ) const;
|
||||
DLL_HEADER void GetBox (Point3d & pmin, Point3d & pmax, POINTTYPE ptyp ) const;
|
||||
|
||||
///
|
||||
int GetNOpenElements() const
|
||||
@ -470,7 +470,7 @@ namespace netgen
|
||||
/**
|
||||
Remove unused points. etc.
|
||||
*/
|
||||
void Compress ();
|
||||
DLL_HEADER void Compress ();
|
||||
|
||||
///
|
||||
void Save (ostream & outfile) const;
|
||||
@ -574,13 +574,13 @@ namespace netgen
|
||||
{ return edgedecoding.Append(fd) - 1; }
|
||||
|
||||
///
|
||||
void SetMaterial (int domnr, const char * mat);
|
||||
DLL_HEADER void SetMaterial (int domnr, const char * mat);
|
||||
///
|
||||
const char * GetMaterial (int domnr) const;
|
||||
|
||||
void SetNBCNames ( int nbcn );
|
||||
DLL_HEADER void SetNBCNames ( int nbcn );
|
||||
|
||||
void SetBCName ( int bcnr, const string & abcname );
|
||||
DLL_HEADER void SetBCName ( int bcnr, const string & abcname );
|
||||
|
||||
string GetBCName ( int bcnr ) const;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
namespace netgen
|
||||
{
|
||||
|
||||
void Optimize2d (Mesh & mesh, MeshingParameters & mp)
|
||||
DLL_HEADER void Optimize2d (Mesh & mesh, MeshingParameters & mp)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -43,27 +43,27 @@ class Meshing2
|
||||
|
||||
public:
|
||||
///
|
||||
Meshing2 (const Box<3> & aboundingbox);
|
||||
DLL_HEADER Meshing2 (const Box<3> & aboundingbox);
|
||||
|
||||
///
|
||||
virtual ~Meshing2 ();
|
||||
DLL_HEADER virtual ~Meshing2 ();
|
||||
|
||||
/// Load rules, either from file, or compiled rules
|
||||
void LoadRules (const char * filename);
|
||||
|
||||
///
|
||||
MESHING2_RESULT GenerateMesh (Mesh & mesh, double gh, int facenr);
|
||||
DLL_HEADER MESHING2_RESULT GenerateMesh (Mesh & mesh, double gh, int facenr);
|
||||
|
||||
void Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp);
|
||||
void BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp);
|
||||
DLL_HEADER void Delaunay (Mesh & mesh, int domainnr, const MeshingParameters & mp);
|
||||
DLL_HEADER void BlockFillLocalH (Mesh & mesh, const MeshingParameters & mp);
|
||||
|
||||
|
||||
///
|
||||
void AddPoint (const Point3d & p, PointIndex globind, MultiPointGeomInfo * mgi = NULL,
|
||||
DLL_HEADER void AddPoint (const Point3d & p, PointIndex globind, MultiPointGeomInfo * mgi = NULL,
|
||||
bool pointonsurface = true);
|
||||
|
||||
///
|
||||
void AddBoundaryElement (INDEX i1, INDEX i2,
|
||||
DLL_HEADER void AddBoundaryElement (INDEX i1, INDEX i2,
|
||||
const PointGeomInfo & gi1, const PointGeomInfo & gi2);
|
||||
|
||||
///
|
||||
|
@ -39,8 +39,8 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
extern int GetTimeStamp();
|
||||
extern int NextTimeStamp();
|
||||
extern DLL_HEADER int GetTimeStamp();
|
||||
extern DLL_HEADER int NextTimeStamp();
|
||||
|
||||
class PointGeomInfo
|
||||
{
|
||||
@ -335,7 +335,7 @@ namespace netgen
|
||||
///
|
||||
Element2d (int anp);
|
||||
///
|
||||
Element2d (ELEMENT_TYPE type);
|
||||
DLL_HEADER Element2d (ELEMENT_TYPE type);
|
||||
///
|
||||
Element2d (int pi1, int pi2, int pi3);
|
||||
///
|
||||
@ -802,8 +802,8 @@ namespace netgen
|
||||
{
|
||||
public:
|
||||
///
|
||||
Segment();
|
||||
Segment (const Segment& other);
|
||||
DLL_HEADER Segment();
|
||||
DLL_HEADER Segment (const Segment& other);
|
||||
|
||||
~Segment()
|
||||
{ ; }
|
||||
@ -927,13 +927,13 @@ namespace netgen
|
||||
double domout_singular;
|
||||
|
||||
public:
|
||||
FaceDescriptor();
|
||||
FaceDescriptor(int surfnri, int domini, int domouti, int tlosurfi);
|
||||
FaceDescriptor(const Segment & seg);
|
||||
FaceDescriptor(const FaceDescriptor& other);
|
||||
~FaceDescriptor() { ; }
|
||||
DLL_HEADER FaceDescriptor();
|
||||
DLL_HEADER FaceDescriptor(int surfnri, int domini, int domouti, int tlosurfi);
|
||||
DLL_HEADER FaceDescriptor(const Segment & seg);
|
||||
DLL_HEADER FaceDescriptor(const FaceDescriptor& other);
|
||||
DLL_HEADER ~FaceDescriptor() { ; }
|
||||
|
||||
int SegmentFits (const Segment & seg);
|
||||
DLL_HEADER int SegmentFits (const Segment & seg);
|
||||
|
||||
int SurfNr () const { return surfnr; }
|
||||
int DomainIn () const { return domin; }
|
||||
@ -1231,17 +1231,17 @@ namespace netgen
|
||||
|
||||
public:
|
||||
///
|
||||
Identifications (class Mesh & amesh);
|
||||
DLL_HEADER Identifications (class Mesh & amesh);
|
||||
///
|
||||
~Identifications ();
|
||||
DLL_HEADER ~Identifications ();
|
||||
|
||||
void Delete ();
|
||||
DLL_HEADER void Delete ();
|
||||
|
||||
/*
|
||||
Identify points pi1 and pi2, due to
|
||||
identification nr identnr
|
||||
*/
|
||||
void Add (PointIndex pi1, PointIndex pi2, int identnr);
|
||||
DLL_HEADER void Add (PointIndex pi1, PointIndex pi2, int identnr);
|
||||
|
||||
|
||||
int Get (PointIndex pi1, PointIndex pi2) const;
|
||||
|
@ -17,39 +17,39 @@ namespace netgen
|
||||
//Message Pipeline:
|
||||
|
||||
//importance: importance of message: 1=very important, 3=middle, 5=low, 7=unimportant
|
||||
extern void PrintMessage(int importance,
|
||||
extern DLL_HEADER void PrintMessage(int importance,
|
||||
const MyStr& s1, const MyStr& s2=MyStr());
|
||||
extern void PrintMessage(int importance,
|
||||
extern DLL_HEADER void PrintMessage(int importance,
|
||||
const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4=MyStr());
|
||||
extern void PrintMessage(int importance,
|
||||
extern DLL_HEADER void PrintMessage(int importance,
|
||||
const MyStr& s1, const MyStr& s2, const MyStr& s3, const MyStr& s4,
|
||||
const MyStr& s5, const MyStr& s6=MyStr(), const MyStr& s7=MyStr(), const MyStr& s8=MyStr());
|
||||
|
||||
// CR without line-feed
|
||||
extern void PrintMessageCR(int importance,
|
||||
extern DLL_HEADER void PrintMessageCR(int importance,
|
||||
const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintFnStart(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintFnStart(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintWarning(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintWarning(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintFileError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintFileError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintSysError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintSysError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintUserError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintUserError(const MyStr& s1, const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void PrintTime(const MyStr& s1="", const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
extern DLL_HEADER void PrintTime(const MyStr& s1="", const MyStr& s2="", const MyStr& s3="", const MyStr& s4="",
|
||||
const MyStr& s5="", const MyStr& s6="", const MyStr& s7="", const MyStr& s8="");
|
||||
extern void SetStatMsg(const MyStr& s);
|
||||
extern DLL_HEADER void SetStatMsg(const MyStr& s);
|
||||
|
||||
extern void PushStatus(const MyStr& s);
|
||||
extern void PushStatusF(const MyStr& s);
|
||||
extern void PopStatus();
|
||||
extern void SetThreadPercent(double percent);
|
||||
extern void GetStatus(MyStr & s, double & percentage);
|
||||
extern DLL_HEADER void PushStatus(const MyStr& s);
|
||||
extern DLL_HEADER void PushStatusF(const MyStr& s);
|
||||
extern DLL_HEADER void PopStatus();
|
||||
extern DLL_HEADER void SetThreadPercent(double percent);
|
||||
extern DLL_HEADER void GetStatus(MyStr & s, double & percentage);
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
Point3d VisualScene :: center;
|
||||
double VisualScene :: rad;
|
||||
GLdouble VisualScene :: backcolor;
|
||||
DLL_HEADER Point3d VisualScene :: center;
|
||||
DLL_HEADER double VisualScene :: rad;
|
||||
DLL_HEADER GLdouble VisualScene :: backcolor;
|
||||
|
||||
/*
|
||||
#if TOGL_MAJOR_VERSION!=2
|
||||
@ -97,8 +97,8 @@ namespace netgen
|
||||
}
|
||||
|
||||
|
||||
extern void Render();
|
||||
void Render ()
|
||||
extern DLL_HEADER void Render();
|
||||
DLL_HEADER void Render ()
|
||||
{
|
||||
multithread.redraw = 1;
|
||||
}
|
||||
|
@ -19,19 +19,19 @@ namespace netgen
|
||||
class VisualScene
|
||||
{
|
||||
protected:
|
||||
static Point3d center;
|
||||
static double rad;
|
||||
static DLL_HEADER Point3d center;
|
||||
static DLL_HEADER double rad;
|
||||
|
||||
static float lookatmat[16];
|
||||
static float transmat[16];
|
||||
static float rotmat[16];
|
||||
static float centermat[16];
|
||||
static float transformationmat[16];
|
||||
static DLL_HEADER float transformationmat[16];
|
||||
|
||||
GLdouble clipplane[4];
|
||||
|
||||
int changeval;
|
||||
static GLdouble backcolor;
|
||||
static DLL_HEADER GLdouble backcolor;
|
||||
|
||||
static int selface;
|
||||
static int selelement;
|
||||
@ -52,42 +52,42 @@ namespace netgen
|
||||
|
||||
|
||||
public:
|
||||
VisualScene ();
|
||||
virtual ~VisualScene();
|
||||
DLL_HEADER VisualScene ();
|
||||
DLL_HEADER virtual ~VisualScene();
|
||||
|
||||
virtual void BuildScene (int zoomall = 0);
|
||||
virtual void DrawScene ();
|
||||
DLL_HEADER virtual void BuildScene (int zoomall = 0);
|
||||
DLL_HEADER virtual void DrawScene ();
|
||||
|
||||
void CalcTransformationMatrices();
|
||||
void StandardRotation (const char * dir);
|
||||
void ArbitraryRotation (const Array<double> & alpha, const Array<Vec3d> & vec);
|
||||
void ArbitraryRotation (const double alpha, const Vec3d & vec);
|
||||
DLL_HEADER void CalcTransformationMatrices();
|
||||
DLL_HEADER void StandardRotation (const char * dir);
|
||||
DLL_HEADER void ArbitraryRotation (const Array<double> & alpha, const Array<Vec3d> & vec);
|
||||
DLL_HEADER void ArbitraryRotation (const double alpha, const Vec3d & vec);
|
||||
|
||||
void MouseMove(int oldx, int oldy,
|
||||
DLL_HEADER void MouseMove(int oldx, int oldy,
|
||||
int newx, int newy,
|
||||
char mode);
|
||||
|
||||
void LookAt (const Point<3> & cam, const Point<3> & obj,
|
||||
DLL_HEADER void LookAt (const Point<3> & cam, const Point<3> & obj,
|
||||
const Point<3> & camup);
|
||||
|
||||
void SetClippingPlane ();
|
||||
DLL_HEADER void SetClippingPlane ();
|
||||
|
||||
virtual void MouseDblClick (int px, int py);
|
||||
DLL_HEADER virtual void MouseDblClick (int px, int py);
|
||||
|
||||
void SetLight ();
|
||||
DLL_HEADER void SetLight ();
|
||||
static void SetBackGroundColor (double col)
|
||||
{ backcolor = col; }
|
||||
|
||||
void CreateTexture (int ncols, int linear, int typ = GL_DECAL);
|
||||
void DrawColorBar (double minval, double maxval, int logscale = 0, bool linear = 1);
|
||||
void DrawCoordinateCross ();
|
||||
void DrawNetgenLogo ();
|
||||
void SetOpenGlColor(double val, double valmin, double valmax, int logscale = 0);
|
||||
DLL_HEADER void CreateTexture (int ncols, int linear, int typ = GL_DECAL);
|
||||
DLL_HEADER void DrawColorBar (double minval, double maxval, int logscale = 0, bool linear = 1);
|
||||
DLL_HEADER void DrawCoordinateCross ();
|
||||
DLL_HEADER void DrawNetgenLogo ();
|
||||
DLL_HEADER void SetOpenGlColor(double val, double valmin, double valmax, int logscale = 0);
|
||||
|
||||
|
||||
#ifdef PARALLELGL
|
||||
void InitParallelGL ();
|
||||
void Broadcast ();
|
||||
DLL_HEADER void InitParallelGL ();
|
||||
DLL_HEADER void Broadcast ();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user