Core 1.0
Bubble Class Reference

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
 \(\varepsilon\) 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.

Detailed Description

Bubbles.

Bubbles are defined by their center and internal and external radii.

Constructor & Destructor Documentation

◆ Bubble() [1/2]

Bubble::Bubble ( const Vector & c,
const double & ri = 0.0,
const double & re = 0.0 )
explicit

Creates a bubble.

Parameters
cCenter.
re,riInterior an exterior radii.

◆ Bubble() [2/2]

Bubble::Bubble ( const Sphere & s,
const double & t = 0.0 )
explicit

Creates a bubble.

Parameters
sSphere.
tThickness.

Member Function Documentation

◆ Inside()

bool Bubble::Inside ( const Vector & p) const

Check if a point is inside or outside the bubble.

Parameters
pThe point.

◆ Normal()

Vector Bubble::Normal ( const Vector & p) const

Computes the normal vector between a point and the bubble.

Parameters
pPoint.

◆ R()

double Bubble::R ( const Vector & p) const

Compute the squared distance between a point and the bubble.

Parameters
pThe point.

◆ Rotate()

void Bubble::Rotate ( const Matrix & r)

Rotates a bubble.

Parameters
rRotation matrix.

◆ Scale()

void Bubble::Scale ( const double & s)

Uniformly scales a bubble.

Parameters
sScaling factor.

◆ Signed()

double Bubble::Signed ( const Vector & p) const

Compute the signed distance between a point and the bubble.

Parameters
pThe point.

◆ Translate()

void Bubble::Translate ( const Vector & t)

Translates a bubble.

Parameters
tTranslation vector.

◆ operator<<

std::ostream & operator<< ( std::ostream & s,
const Bubble & bubble )
friend

Overloaded.

Parameters
sStream.
bubbleThe bubble.