|
Core 1.0
|
Bubbles. More...
#include <bubble.h>
Public Member Functions | |
| Bubble () | |
| Empty. | |
| Bubble (const Vector &, const double &=0.0, const double &=0.0) | |
| Creates a bubble. | |
| Bubble (const Sphere &, const double &=0.0) | |
| Creates a bubble. | |
| ~Bubble () | |
| Empty. | |
| Vector | Center () const |
| Gets the center of a bubble. | |
| double | Radius () const |
| Gets the external radius of a bubble. | |
| double | InternalRadius () const |
| Gets the internal radius of a bubble. | |
| Box | GetBox () const |
| Compute the bounding box of a bubble. | |
| bool | Inside (const Vector &) const |
| Check if a point is inside or outside the bubble. | |
| double | Volume () const |
| Volume. | |
| double | Area () const |
| Surface area. | |
| Vector | Normal (const Vector &) const |
| Computes the normal vector between a point and the bubble. | |
| double | R (const Vector &) const |
| Compute the squared distance between a point and the bubble. | |
| double | Signed (const Vector &) const |
| Compute the signed distance between a point and the bubble. | |
| void | Rotate (const Matrix &) |
| Rotates a bubble. | |
| void | Translate (const Vector &) |
| Translates a bubble. | |
| void | Scale (const double &) |
| Uniformly scales a bubble. | |
Static Public Attributes | |
| static const double | epsilon = 1.0e-4 |
| ε for intersection tests. | |
Protected Attributes | |
| Vector | c = Vector::Null |
| Center. | |
| double | re = 1.0 |
| Interior and exterior radii. | |
Friends | |
| std::ostream & | operator<< (std::ostream &s, const Bubble &bubble) |
| Overloaded. | |
Bubbles.
Bubbles are defined by their center and internal and external radii.
|
explicit |
Creates a bubble.
| c | Center. |
| re,ri | Interior an exterior radii. |
|
explicit |
Creates a bubble.
| s | Sphere. |
| t | Thickness. |
| bool Bubble::Inside | ( | const Vector & | p | ) | const |
Check if a point is inside or outside the bubble.
| p | The point. |
Computes the normal vector between a point and the bubble.
| p | Point. |
| double Bubble::R | ( | const Vector & | p | ) | const |
Compute the squared distance between a point and the bubble.
| p | The point. |
| void Bubble::Rotate | ( | const Matrix & | r | ) |
Rotates a bubble.
| r | Rotation matrix. |
| void Bubble::Scale | ( | const double & | s | ) |
Uniformly scales a bubble.
| s | Scaling factor. |
| double Bubble::Signed | ( | const Vector & | p | ) | const |
Compute the signed distance between a point and the bubble.
| p | The point. |
| void Bubble::Translate | ( | const Vector & | t | ) |
Translates a bubble.
| t | Translation vector. |
|
friend |
Overloaded.
| s | Stream. |
| bubble | The bubble. |