The Vertex class defines the vertexs. More...
Classes | |
struct | Less |
Public Types | |
enum | Coordinate { COORD_X =0 , COORD_Y , COORD_Z } |
Public Member Functions | |
Vertex () | |
Vertex (long id, bool interior=true) | |
Vertex (long id, const std::array< double, 3 > &coords, bool interior=true) | |
void | display (std::ostream &out, unsigned short int indent) const |
unsigned int | getBinarySize () const |
std::array< double, 3 > & | getCoords () |
const std::array< double, 3 > & | getCoords () const |
long | getId () const |
void | initialize (long id, const std::array< double, 3 > &coords, bool interior) |
bool | isInterior () const |
bool | operator== (const Vertex &other) const |
double & | operator[] (int coord_id) |
const double & | operator[] (int coord_id) const |
void | rotate (const std::array< double, 3 > &n0, const std::array< double, 3 > &n1, double angle) |
void | rotate (double n0x, double n0y, double n0z, double n1x, double n1y, double n1z, double angle) |
void | scale (const std::array< double, 3 > &scaling, const std::array< double, 3 > ¢er) |
void | scale (double sx, double sy, double sz, double cx, double cy, double cz) |
void | setCoords (const std::array< double, 3 > &coords) |
void | setId (long id) |
void | swap (Vertex &other) noexcept |
void | translate (const std::array< double, 3 > &translation) |
void | translate (double sx, double sy, double sz) |
Static Public Attributes | |
static BITPIT_PUBLIC_API const long | NULL_ID = std::numeric_limits<long>::min() |
Protected Member Functions | |
void | setInterior (bool interior) |
Friends | |
OBinaryStream & | operator<<) (OBinaryStream &, const Vertex &) |
IBinaryStream & | operator>>) (IBinaryStream &, Vertex &) |
class | PatchKernel |
Detailed Description
The Vertex class defines the vertexs.
Vertex is class that defines the vertexs.
Definition at line 42 of file vertex.hpp.
Member Enumeration Documentation
◆ Coordinate
enum bitpit::Vertex::Coordinate |
Definition at line 50 of file vertex.hpp.
Constructor & Destructor Documentation
◆ Vertex() [1/3]
bitpit::Vertex::Vertex | ( | ) |
Default constructor.
Definition at line 82 of file vertex.cpp.
◆ Vertex() [2/3]
bitpit::Vertex::Vertex | ( | long | id, |
bool | interior = true ) |
Creates a new element.
- Parameters
-
[in] id is the id of the vertex [in] interior if true the vertex is flagged as interior
Definition at line 93 of file vertex.cpp.
◆ Vertex() [3/3]
bitpit::Vertex::Vertex | ( | long | id, |
const std::array< double, 3 > & | coords, | ||
bool | interior = true ) |
Create vertex from input coordinates
- Parameters
-
[in] id is the id of the vertex [in] coords are the vertex coordinates [in] interior if true the vertex is flagged as interior
Definition at line 105 of file vertex.cpp.
Member Function Documentation
◆ display()
void bitpit::Vertex::display | ( | std::ostream & | out, |
unsigned short int | indent ) const |
Displays vertex information to an output stream
- Parameters
-
[in] out is the output stream [in] indent is the number of trailing spaces to prepend when writing the information
Definition at line 351 of file vertex.cpp.
◆ getBinarySize()
unsigned int bitpit::Vertex::getBinarySize | ( | ) | const |
Returns the buffer size required to communicate vertex data
- Returns
- buffer size (in bytes)
Definition at line 370 of file vertex.cpp.
◆ getCoords() [1/2]
std::array< double, 3 > & bitpit::Vertex::getCoords | ( | ) |
Gets the coordinates of the vertex.
- Returns
- A pointer to the coordinates of the vertex
Definition at line 246 of file vertex.cpp.
◆ getCoords() [2/2]
const std::array< double, 3 > & bitpit::Vertex::getCoords | ( | ) | const |
Gets the coordinates of the vertex.
- Returns
- A pointer to the coordinates of the vertex
Definition at line 256 of file vertex.cpp.
◆ getId()
long bitpit::Vertex::getId | ( | ) | const |
◆ initialize()
void bitpit::Vertex::initialize | ( | long | id, |
const std::array< double, 3 > & | coords, | ||
bool | interior ) |
Initializes the data structures of the vertex.
- Parameters
-
[in] id is the id of the vertex [in] coords are the vertex coordinates [in] interior if true the vertex is flagged as interior
Definition at line 131 of file vertex.cpp.
◆ isInterior()
bool bitpit::Vertex::isInterior | ( | ) | const |
Gets if the vertex belongs to the the interior domain.
- Returns
- Returns true if the vertex belongs to the the interior domain, otherwise it returns false.
Definition at line 166 of file vertex.cpp.
◆ operator==()
bool bitpit::Vertex::operator== | ( | const Vertex & | other | ) | const |
Comparison operator
- Parameters
-
[in] other is the object to be compared with
- Returns
- Returns the boolean result of comparison of the values of the arguments, which are not modified.
Definition at line 178 of file vertex.cpp.
◆ operator[]() [1/2]
double & bitpit::Vertex::operator[] | ( | int | coord_id | ) |
Get a reference to the specified coordinate
- Parameters
-
coord_id is the index of the requested coordinate
- Returns
- Returns a reference to requested coordinate
Definition at line 195 of file vertex.cpp.
◆ operator[]() [2/2]
const double & bitpit::Vertex::operator[] | ( | int | coord_id | ) | const |
Get a constants reference to the specified coordinate
- Parameters
-
coord_id is the index of the requested coordinate
- Returns
- Returns a constant reference to requested coordinate
Definition at line 206 of file vertex.cpp.
◆ rotate() [1/2]
void bitpit::Vertex::rotate | ( | const std::array< double, 3 > & | n0, |
const std::array< double, 3 > & | n1, | ||
double | angle ) |
Rotates the vertex.
- Parameters
-
[in] n0 is a first point on the rotation axis [in] n1 is a second point on the rotation axis [in] angle is the rotation angle, expressed in radiants and positive for counterclockwise rotations
Definition at line 293 of file vertex.cpp.
◆ rotate() [2/2]
void bitpit::Vertex::rotate | ( | double | n0x, |
double | n0y, | ||
double | n0z, | ||
double | n1x, | ||
double | n1y, | ||
double | n1z, | ||
double | angle ) |
Rotates the vertex.
- Parameters
-
[in] n0x is the x-component of a first point on the rotation axis [in] n0y is the y-component of a first point on the rotation axis [in] n0z is the z-component of a first point on the rotation axis [in] n1x is the x-component of a second point on the rotation axis [in] n1y is the y-component of a second point on the rotation axis [in] n1z is the z-component of a second point on the rotation axis [in] angle is the rotation angle, expressed in radiants and positive for counterclockwise rotations
Definition at line 310 of file vertex.cpp.
◆ scale() [1/2]
void bitpit::Vertex::scale | ( | const std::array< double, 3 > & | scaling, |
const std::array< double, 3 > & | center ) |
Scales the vertex.
- Parameters
-
[in] scaling is the scaling vector [in] center is the center of the scaling
Definition at line 321 of file vertex.cpp.
◆ scale() [2/2]
void bitpit::Vertex::scale | ( | double | sx, |
double | sy, | ||
double | sz, | ||
double | cx, | ||
double | cy, | ||
double | cz ) |
Scales the vertex.
- Parameters
-
[in] sx scaling factor along x direction [in] sy scaling factor along y direction [in] sz scaling factor along z direction [in] cx is the x coordinate scaling center [in] cy is the y coordinate scaling center [in] cz is the z coordinate scaling center
Definition at line 338 of file vertex.cpp.
◆ setCoords()
void bitpit::Vertex::setCoords | ( | const std::array< double, 3 > & | coords | ) |
Sets the coordinates of the vertex.
- Parameters
-
coords are the coordinates of the vertex
Definition at line 236 of file vertex.cpp.
◆ setId()
void bitpit::Vertex::setId | ( | long | id | ) |
Sets the ID of the vertex.
- Parameters
-
id the ID of the vertex
Definition at line 216 of file vertex.cpp.
◆ setInterior()
|
protected |
Sets if the vertex belongs to the the interior domain.
- Parameters
-
interior defines if the vertex belongs to the the interior domain
Definition at line 155 of file vertex.cpp.
◆ swap()
|
noexcept |
Exchanges the content of the vertex by the content the specified other vertex.
- Parameters
-
other is another vertex whose content is swapped with that of this vertex.
Definition at line 117 of file vertex.cpp.
◆ translate() [1/2]
void bitpit::Vertex::translate | ( | const std::array< double, 3 > & | translation | ) |
Translates the vertex.
- Parameters
-
[in] translation is the translation vector
Definition at line 266 of file vertex.cpp.
◆ translate() [2/2]
void bitpit::Vertex::translate | ( | double | sx, |
double | sy, | ||
double | sz ) |
Translates the vertex.
- Parameters
-
[in] sx translation along x direction [in] sy translation along y direction [in] sz translation along z direction
Definition at line 280 of file vertex.cpp.
Friends And Related Symbol Documentation
◆ PatchKernel
|
friend |
Definition at line 44 of file vertex.hpp.
Member Data Documentation
◆ NULL_ID
|
static |
Definition at line 123 of file vertex.hpp.
The documentation for this class was generated from the following files:
- src/patchkernel/vertex.hpp
- src/patchkernel/vertex.cpp
