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