|
Core 1.0
|
A disc in three dimensions. More...
#include <circle.h>
Public Member Functions | |
| Disc () | |
| Empty. | |
| Disc (const double &) | |
| Creates a horizontal disc centered at origin. | |
| Disc (const Vector &, const Vector &, const double &) | |
| Creates a disc. | |
| Disc (const Vector &, const Vector &, const Vector &) | |
| Creates a disc given three vertices. | |
| ~Disc () | |
| Empty. | |
| double | R (const Vector &) const |
| Computes the distance between a point and the disc. | |
| double | Signed (const Vector &) const |
| Computes the (positive) signed distance between a point and the disc. | |
| Vector | Normal (const Vector &) const |
| Computes the distance vector between a disc and a point. | |
Public Member Functions inherited from Circle | |
| Circle () | |
| Empty. | |
| Circle (const double &) | |
| Creates a circle. | |
| Circle (const Vector &, const Vector &, const double &) | |
| Creates a circle. | |
| Circle (const Vector &, const Vector &, const Vector &) | |
| Creates a circle given three vertices. | |
| ~Circle () | |
| Empty. | |
| bool | Intersect (const Ray &, double &) const |
| Compute the ray-disc intersection. | |
| Vector | Center () const |
| Gets the center of a circle. | |
| Vector | Axis () const |
| Axis of the circle. | |
| double | Radius () const |
| Radius of the circle. | |
| double | R (const Vector &) const |
| Compute the distance between a point and a circle. | |
| Vector | Normal (const Vector &) const |
| Computes the distance vector between a circle and a point. | |
| void | Rotate (const Matrix &) |
| Rotates a circle. | |
| void | Translate (const Vector &) |
| Translates a circle. | |
| void | Scale (const double &) |
| Uniformly scales a circle. | |
| Box | GetBox () const |
| Compute the axis aligned bounding box of a circle. | |
| double | Area () const |
| Area of a circle. | |
| Vector | RandomInside (Random &=Random::R239) const |
| Generate a random vector inside the circle. | |
| Vector | RandomOn (Random &=Random::R239) const |
| Generate a random vector on the circle. | |
| Vector | Vogel (int, int) const |
| Generate a spiraling vector in the disc. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Circle | |
| static double | Area (const double &) |
| Area of a circle given its radius. | |
Protected Attributes inherited from Circle | |
| Vector | c = Vector::Null |
| Center of the circle. | |
| Vector | axis = Vector::Z |
| Axis. | |
| double | r = 1.0 |
| Radius. | |
Static Protected Attributes inherited from Circle | |
| static constexpr const double | epsilon = 1.0e-10 |
| Internal epsilon constant. | |
A disc in three dimensions.
Discs derive from Circle, and only reimplement a few functions, such as Disc::R().
|
explicit |
Creates a horizontal disc centered at origin.
| r | Radius. |
Creates a disc.
| c | Center. |
| axis | Axis, which should be normalized. |
| r | Radius. |
Creates a disc given three vertices.
Basically set the center to the center of the triangle, and compute the radius.
| x,y,z | Argument vertices |
Computes the distance vector between a disc and a point.
This function implicitly projects the point in the plane of the circle and computes the distance to the disc in its plane, before adding the extra term along the normal.
| p | Point. |
| double Disc::R | ( | const Vector & | p | ) | const |
Computes the distance between a point and the disc.
Cost: 10 +, 8 *, 1 sqrt()
| p | Point. |
| double Disc::Signed | ( | const Vector & | p | ) | const |
Computes the (positive) signed distance between a point and the disc.
Cost: 10 +, 8 *, 2 sqrt()
| p | Point. |