2009-01-13 04:40:13 +05:00
|
|
|
#ifndef FILE_GENCYL
|
|
|
|
#define FILE_GENCYL
|
|
|
|
|
|
|
|
/**************************************************************************/
|
|
|
|
/* File: gencyl.hh */
|
|
|
|
/* Author: Joachim Schoeberl */
|
|
|
|
/* Date: 14. Oct. 96 */
|
|
|
|
/**************************************************************************/
|
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
namespace netgen
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2009-01-13 04:40:13 +05:00
|
|
|
|
|
|
|
Generalized Cylinder
|
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
*/
|
2009-01-13 04:40:13 +05:00
|
|
|
|
|
|
|
|
|
|
|
///
|
2009-09-07 17:50:13 +06:00
|
|
|
class GeneralizedCylinder : public Surface
|
|
|
|
{
|
|
|
|
///
|
|
|
|
ExplicitCurve2d & crosssection;
|
|
|
|
///
|
|
|
|
Point<3> planep;
|
|
|
|
///
|
|
|
|
Vec<3> planee1, planee2, planee3;
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
/// Vec<3> ex, ey, ez;
|
|
|
|
Vec2d e2x, e2y;
|
2009-01-13 04:40:13 +05:00
|
|
|
///
|
2009-09-07 17:50:13 +06:00
|
|
|
Point<3> cp;
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
public:
|
|
|
|
///
|
|
|
|
GeneralizedCylinder (ExplicitCurve2d & acrosssection,
|
|
|
|
Point<3> ap, Vec<3> ae1, Vec<3> ae2);
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
///
|
|
|
|
virtual void Project (Point<3> & p) const;
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
///
|
|
|
|
virtual int BoxInSolid (const BoxSphere<3> & box) const;
|
|
|
|
/// 0 .. no, 1 .. yes, 2 .. maybe
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
virtual double CalcFunctionValue (const Point<3> & point) const;
|
|
|
|
///
|
|
|
|
virtual void CalcGradient (const Point<3> & point, Vec<3> & grad) const;
|
|
|
|
///
|
|
|
|
virtual void CalcHesse (const Point<3> & point, Mat<3> & hesse) const;
|
|
|
|
///
|
|
|
|
virtual double HesseNorm () const;
|
|
|
|
///
|
|
|
|
virtual double MaxCurvatureLoc (const Point<3> & c, double rad) const;
|
|
|
|
///
|
|
|
|
virtual Point<3> GetSurfacePoint () const;
|
|
|
|
///
|
|
|
|
virtual void Print (ostream & str) const;
|
2009-01-13 04:40:13 +05:00
|
|
|
|
2009-09-07 17:50:13 +06:00
|
|
|
///
|
|
|
|
virtual void Reduce (const BoxSphere<3> & box);
|
|
|
|
///
|
|
|
|
virtual void UnReduce ();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2009-01-13 04:40:13 +05:00
|
|
|
|
|
|
|
#endif
|