This class defines a sphere. More...
Inheritance diagram for Feel::Sphere:
Collaboration diagram for Feel::Sphere:Methods | |
| void | createFromCenterRadius (const Point &c, const double r) |
| Defines a sphere of radius r centered at c. | |
| bool | intersects (const Sphere &other_sphere) const |
| bool | aboveSurface (const Point &p) const override |
| bool | belowSurface (const Point &p) const override |
| bool | onSurface (const Point &p) const override |
| Point | closestPoint (const Point &p) const override |
| Point | unitNormal (const Point &p) const override |
| Point | surfaceCoords (const Point &cart) const override |
| Point | worldCoords (const Point &sph) const override |
Constructors, destructor | |
| Sphere () | |
| Sphere (Sphere const &s) | |
| Sphere (const Point &c, const double r) | |
| ~Sphere () override | |
Accessors | |
| double | radius () const |
| Returns the radius of the sphere. | |
| const Point & | center () const |
Mutators | |
| void | setCenter (Point const &p) |
| set the center. | |
| void | setRadius (double r) |
| set the radius | |
Additional Inherited Members | |
Public Member Functions inherited from Feel::Surface | |
| Surface () | |
| Constructor. More... | |
| Surface (const Surface &) | |
| Copy-constructor. | |
| virtual | ~Surface () |
| Destructor. | |
This class defines a sphere.
It also computes coordinate transformations between cartesian \( (x, y, z) \) and spherical \( (r, \theta, \phi) \) coordinates. The spherical coordinates are valid in the ranges:
The coordinates are related as follows: \( \phi \) is the angle in the xy plane starting with 0. from the positive x axis, \( \theta \) is measured against the positive z axis.
\ | Z \theta| \ | . \ | . \ | . \ | . \|. ---------------+---------.--------- /|\ . Y /phi\ . / | \ . / | \ . /.........\ / | X /
Implements Feel::Surface.
References center(), and radius().
Referenced by belowSurface().
Implements Feel::Surface.
References aboveSurface().
| const Point & Feel::Sphere::center | ( | ) | const |
Referenced by aboveSurface(), closestPoint(), intersects(), onSurface(), unitNormal(), and worldCoords().
Implements Feel::Surface.
References center(), Feel::Geo0D< Dim, T, IndexT >::node(), radius(), and unitNormal().
Implements Feel::Surface.
cart. Reimplemented from Feel::Surface.
References Feel::Geo0D< Dim, T, IndexT >::node().
Implements Feel::Surface.
References center(), and Feel::Geo0D< Dim, T, IndexT >::node().
Referenced by closestPoint().
sph. Reimplemented from Feel::Surface.
References center().