16 Surface *ReadSurface (std::istream &is);
26 virtual Surface *Clone ()
const = 0;
29 virtual int Dimension()
const = 0;
32 virtual int ParamDim()
const = 0;
35 virtual void Scale (
double scale) = 0;
38 virtual void Scale (
const RVector &scale) = 0;
41 virtual void Point2Param (
const Point &p,
RVector &prm)
const = 0;
46 virtual Point Param2Point (
const RVector ¶m)
const = 0;
50 const {
return param2 - param1; }
53 virtual double ChordDist (
const RVector ¶m1,
const RVector ¶m2)
61 virtual void SetCamera (
const Point &cam);
64 virtual bool RayIntersect (
const RVector &dir,
Point &pi)
const;
71 virtual bool Inside (
const Point &p)
const;
74 friend Surface *ReadSurface (std::istream &is);
78 virtual std::ostream &put (std::ostream &os)
const = 0;
81 friend std::ostream &operator<< (std::ostream &os,
const Surface &surf);
90 virtual std::istream &
get (std::istream &is) = 0;
101 int Dimension()
const {
return 2; }
102 virtual double Circumference()
const = 0;
104 virtual double ChordDiff (
const RVector ¶m1,
const RVector ¶m2)
116 int Dimension()
const {
return 3; }
129 int ParamDim()
const {
return 1; }
132 double Circumference()
const {
return Pi2*radius; }
134 void Scale (
double scale);
135 virtual void Scale (
const RVector &scale);
139 double ChordDiff (
const RVector ¶m1,
const RVector ¶m2)
const;
140 double ChordDist (
const RVector ¶m1,
const RVector ¶m2)
const
141 {
return fabs (ChordDiff (param1, param2)); }
144 std::ostream &put (std::ostream &os)
const {
return os << *
this; }
145 friend std::istream &operator>> (std::istream &is,
Surface_Circle &surf);
146 friend std::ostream &operator<< (std::ostream &os,
150 std::istream &
get (std::istream &is) {
return is >> *
this; }
169 int ParamDim()
const {
return 2; }
172 void Scale (
double scale);
173 void Scale (
const RVector &scale);
176 double ChordDist (
const RVector ¶m1,
const RVector ¶m2)
const;
178 void SetCamera (
const Point &_cam);
179 bool RayIntersect (
const RVector &dir,
Point &pi)
const;
180 bool Inside (
const Point &p)
const;
182 std::ostream &put (std::ostream &os)
const {
return os << *
this; }
183 friend std::istream &operator>> (std::istream &is,
Surface_Sphere &surf);
184 friend std::ostream &operator<< (std::ostream &os,
188 std::istream &
get (std::istream &is) {
return is >> *
this; }
216 int ParamDim()
const {
return 2; }
219 void Scale (
double scale);
220 virtual void Scale (
const RVector &scale);
223 double ChordDist (
const RVector ¶m1,
const RVector ¶m2)
const;
226 std::ostream &put (std::ostream &os)
const {
return os << *
this; }
227 friend std::istream &operator>> (std::istream &is,
Surface_Cone &surf);
228 friend std::ostream &operator<< (std::ostream &os,
232 std::istream &
get (std::istream &is) {
return is >> *
this; }
240 void ComputeRotation (
const RVector &d);
244 #endif // !__SURFACE_H
Finite-element mesh management.
Definition: mesh.h:145
Definition: surface.h:113
Definition: surface.h:209
Definition: surface.h:123
Definition: surface.h:163