|
Core 1.0
|
Hemispheres. More...
#include <hemisphere.h>
Public Member Functions | |
| HemiSphere (const Vector &, const Vector &, const double &) | |
| Create a hemi-sphere. | |
| HemiSphere (const double &) | |
| Create a hemi-sphere centered at the origin and with vertical direction. | |
| ~HemiSphere () | |
| Empty. | |
| Vector | Normal (const Vector &) const |
| Compute the distance vector between the hemisphere and a point. | |
| double | R (const Vector &) const |
| Compute the distance between the hemisphere and a point. | |
| double | Signed (const Vector &) const |
| Compute the Euclidean signed distance between the hemisphere and a point. | |
| bool | Inside (const Vector &) const |
| Compute the Euclidean signed distance between the hemisphere and a point. | |
| Box | GetBox () const |
| Compute the bouding box. | |
| Vector | Center () const |
| Gets the center of a hemisphere. | |
| double | Radius () const |
| Gets the radius of a hemisphere. | |
| Vector | GetAxis () const |
| Gets the axis of the hemisphere. | |
| Vector | Fibonacci (int, int) |
| Compute the i-th Fibonacci direction on the hemisphere. | |
Static Public Member Functions | |
| static Vector | FibonacciUnit (int, int) |
| Compute the i-th Fibonacci direction on the vertical unit hemisphere. | |
| static Vector | RandomDirection (const Vector &, Random &=Random::R239) |
| Generate a random direction. | |
Protected Attributes | |
| Vector | c = Vector::Null |
| Center. | |
| double | r = 1.0 |
| Radius. | |
| Vector | axis = Vector::Z |
| Axis. | |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const HemiSphere &hemisphere) |
| Overloaded output-stream operator. | |
Hemispheres.
Create a hemi-sphere.
| c | Center. |
| r | Radius. |
| a | Axis, should be normalized. |
|
explicit |
Create a hemi-sphere centered at the origin and with vertical direction.
| r | Radius. |
| Vector HemiSphere::Fibonacci | ( | int | i, |
| int | n ) |
Compute the i-th Fibonacci direction on the hemisphere.
| i | Point index. |
| n | Number of samples on the hemisphere. |
|
static |
Compute the i-th Fibonacci direction on the vertical unit hemisphere.
| i | Point index. |
| n | Number of samples on the hemisphere. |
| bool HemiSphere::Inside | ( | const Vector & | p | ) | const |
Compute the Euclidean signed distance between the hemisphere and a point.
| p | Point. |
Compute the distance vector between the hemisphere and a point.
| p | Point. |
| double HemiSphere::R | ( | const Vector & | p | ) | const |
Compute the distance between the hemisphere and a point.
| p | Point. |
|
static |
Generate a random direction.
| axis | Axis. |
| random | Random number generator. |
| double HemiSphere::Signed | ( | const Vector & | p | ) | const |
Compute the Euclidean signed distance between the hemisphere and a point.
| p | Point. |
|
friend |
Overloaded output-stream operator.
| s | Stream. |
| hemisphere | The hemisphere. |