(9)

To store and treat a brick (parallelepiped) figure. More...

Inheritance diagram for Brick:
Figure

Public Member Functions

 Brick ()
 Default constructor.
 
 Brick (const Point< real_t > &bbm, const Point< real_t > &bbM, int code=1)
 Constructor. More...
 
void setBoundingBox (const Point< real_t > &bbm, const Point< real_t > &bbM)
 Assign bounding box of the brick. More...
 
Point< real_tgetBoundingBox1 () const
 Return first point of bounding box (xmin,ymin,zmin)
 
Point< real_tgetBoundingBox2 () const
 Return second point of bounding box (xmax,ymax,zmax)
 
real_t getSignedDistance (const Point< real_t > &p) const
 Return signed distance of a given point from the current brick. More...
 
Brickoperator+= (Point< real_t > a)
 Operator +=. More...
 
Brickoperator+= (real_t a)
 Operator *=. More...
 
- Public Member Functions inherited from Figure
 Figure ()
 Default constructor.
 
 Figure (const Figure &f)
 Copy constructor.
 
virtual ~Figure ()
 Destructor.
 
void setCode (int code)
 Choose a code for the domain defined by the figure.
 
Figureoperator= (const Figure &f)
 Operator =.
 
void getSignedDistance (const Grid &g, Vect< real_t > &d) const
 Calculate signed distance to current figure with respect to grid points. More...
 
real_t dLine (const Point< real_t > &p, const Point< real_t > &a, const Point< real_t > &b) const
 Compute signed distance from a line. More...
 

Detailed Description

To store and treat a brick (parallelepiped) figure.

Constructor & Destructor Documentation

◆ Brick()

Brick ( const Point< real_t > &  bbm,
const Point< real_t > &  bbM,
int  code = 1 
)

Constructor.

Parameters
[in]bbmfirst point (xmin,ymin,zmin)
[in]bbMsecond point (xmax,ymax,zmax)
[in]codeCode to assign to rectangle

Member Function Documentation

◆ getSignedDistance()

real_t getSignedDistance ( const Point< real_t > &  p) const
virtual

Return signed distance of a given point from the current brick.

The computed distance is negative if p lies in the brick, negative if it is outside, and 0 on its boundary

Parameters
[in]pPoint<double> instance

Reimplemented from Figure.

◆ operator+=() [1/2]

Brick& operator+= ( Point< real_t a)

Operator +=.

Translate brick by a vector a

◆ operator+=() [2/2]

Brick& operator+= ( real_t  a)

Operator *=.

Scale brick by a factor a

◆ setBoundingBox()

void setBoundingBox ( const Point< real_t > &  bbm,
const Point< real_t > &  bbM 
)

Assign bounding box of the brick.

Parameters
[in]bbmfirst point (xmin,ymin,zmin)
[in]bbMsecond point (xmax,ymax,zmax)