|
|
| PolyMesh () |
| default constructor
|
|
| ~PolyMesh () override=default |
|
| PolyMesh (const PolyMesh &rhs) |
| copy constructor: copies rhs to *this . performs a deep copy of all properties.
|
|
PolyMesh & | operator= (const PolyMesh &rhs) |
| assign rhs to *this . performs a deep copy of all properties.
|
|
PolyMesh & | assign (const PolyMesh &rhs) |
| assign rhs to *this . does not copy custom properties.
|
|
|
bool | read (const std::string &filename) |
| Read mesh from a PM file filename . Mainly for quick debug purposes. Client code should use PolyMeshIO. More...
|
|
bool | write (const std::string &filename) const |
| Write mesh to a PM file filename . Mainly for quick debug purposes. Client code should use PolyMeshIO. More...
|
|
|
Vertex | add_vertex (const vec3 &p) |
| add a new vertex with position p
|
|
Cell | add_cell (const std::vector< HalfFace > &faces) |
|
Cell | add_tetra (HalfFace f0, HalfFace f1, HalfFace f2, HalfFace f3) |
|
Cell | add_tetra (Vertex v0, Vertex v1, Vertex v2, Vertex v3) |
|
Cell | add_hexa (Vertex v0, Vertex v1, Vertex v2, Vertex v3, Vertex v4, Vertex v5, Vertex v6, Vertex v7) |
|
HalfFace | add_face (const std::vector< Vertex > &vertices) |
|
HalfFace | add_triangle (Vertex v0, Vertex v1, Vertex v2) |
|
HalfFace | add_quad (Vertex v0, Vertex v1, Vertex v2, Vertex v3) |
|
|
unsigned int | n_vertices () const |
| returns number of vertices in the mesh
|
|
unsigned int | n_edges () const |
| returns number of edges in the mesh
|
|
unsigned int | n_halffaces () const |
| returns number of halffaces in the mesh
|
|
unsigned int | n_faces () const |
| returns number of faces in the mesh
|
|
unsigned int | n_cells () const |
| returns number of cells in the mesh
|
|
void | clear () |
| Removes all vertices, edges, halffaces, faces, cells and properties. More...
|
|
void | resize (unsigned int nv, unsigned int ne, unsigned int nf, unsigned int nc) |
|
bool | is_valid (Vertex v) const |
| return whether vertex v is valid, i.e. the index is stores it within the array bounds.
|
|
bool | is_valid (Edge e) const |
| return whether edge e is valid, i.e. the index is stores it within the array bounds.
|
|
bool | is_valid (HalfFace h) const |
| return whether halfface h is valid, i.e. the index is stores it within the array bounds.
|
|
bool | is_valid (Face f) const |
| return whether face f is valid, i.e. the index is stores it within the array bounds.
|
|
bool | is_valid (Cell c) const |
| return whether cell h is valid, i.e. the index is stores it within the array bounds.
|
|
|
template<class T > |
VertexProperty< T > | add_vertex_property (const std::string &name, const T t=T()) |
|
template<class T > |
EdgeProperty< T > | add_edge_property (const std::string &name, const T t=T()) |
|
template<class T > |
HalfFaceProperty< T > | add_halfface_property (const std::string &name, const T t=T()) |
|
template<class T > |
FaceProperty< T > | add_face_property (const std::string &name, const T t=T()) |
|
template<class T > |
CellProperty< T > | add_cell_property (const std::string &name, const T t=T()) |
|
template<class T > |
ModelProperty< T > | add_model_property (const std::string &name, const T t=T()) |
| Adds a model property of type T with name name and default value t . More...
|
|
template<class T > |
VertexProperty< T > | get_vertex_property (const std::string &name) const |
|
template<class T > |
EdgeProperty< T > | get_edge_property (const std::string &name) const |
|
template<class T > |
HalfFaceProperty< T > | get_halfface_property (const std::string &name) const |
|
template<class T > |
FaceProperty< T > | get_face_property (const std::string &name) const |
|
template<class T > |
CellProperty< T > | get_cell_property (const std::string &name) const |
|
template<class T > |
ModelProperty< T > | get_model_property (const std::string &name) const |
| Gets the model property named name of type T . More...
|
|
template<class T > |
VertexProperty< T > | vertex_property (const std::string &name, const T t=T()) |
|
template<class T > |
EdgeProperty< T > | edge_property (const std::string &name, const T t=T()) |
|
template<class T > |
HalfFaceProperty< T > | halfface_property (const std::string &name, const T t=T()) |
|
template<class T > |
FaceProperty< T > | face_property (const std::string &name, const T t=T()) |
|
template<class T > |
CellProperty< T > | cell_property (const std::string &name, const T t=T()) |
|
template<class T > |
ModelProperty< T > | model_property (const std::string &name, const T t=T()) |
|
template<class T > |
bool | remove_vertex_property (VertexProperty< T > &p) |
| remove the vertex property p
|
|
bool | remove_vertex_property (const std::string &n) |
| remove the vertex property named n
|
|
template<class T > |
bool | remove_edge_property (EdgeProperty< T > &p) |
| remove the edge property p
|
|
bool | remove_edge_property (const std::string &n) |
| remove the edge property named n
|
|
template<class T > |
bool | remove_halfface_property (HalfFaceProperty< T > &p) |
| remove the halfface property p
|
|
bool | remove_halfface_property (const std::string &n) |
| remove the halfface property named n
|
|
template<class T > |
bool | remove_face_property (FaceProperty< T > &p) |
| remove the face property p
|
|
bool | remove_face_property (const std::string &n) |
| remove the face property named n
|
|
template<class T > |
bool | remove_cell_property (CellProperty< T > &p) |
| remove the cell property p
|
|
bool | remove_cell_property (const std::string &n) |
| remove the cell property named n
|
|
template<class T > |
bool | remove_model_property (ModelProperty< T > &p) |
| remove the model property p
|
|
bool | remove_model_property (const std::string &n) |
| remove the model property named n
|
|
bool | rename_vertex_property (const std::string &old_name, const std::string &new_name) |
| rename a vertex property given its name
|
|
bool | rename_halfface_property (const std::string &old_name, const std::string &new_name) |
| rename a halfface property given its name
|
|
bool | rename_face_property (const std::string &old_name, const std::string &new_name) |
| rename a face property given its name
|
|
bool | rename_edge_property (const std::string &old_name, const std::string &new_name) |
| rename an edge property given its name
|
|
bool | rename_cell_property (const std::string &old_name, const std::string &new_name) |
| rename a cell property given its name
|
|
bool | rename_model_property (const std::string &old_name, const std::string &new_name) |
| rename a model property given its name
|
|
const std::type_info & | get_vertex_property_type (const std::string &name) const |
|
const std::type_info & | get_edge_property_type (const std::string &name) const |
|
const std::type_info & | get_halfface_property_type (const std::string &name) const |
|
const std::type_info & | get_face_property_type (const std::string &name) const |
|
const std::type_info & | get_cell_property_type (const std::string &name) const |
|
const std::type_info & | get_model_property_type (const std::string &name) const |
|
std::vector< std::string > | vertex_properties () const |
| returns the names of all vertex properties
|
|
std::vector< std::string > | edge_properties () const |
| returns the names of all edge properties
|
|
std::vector< std::string > | halfface_properties () const |
| returns the names of all halfface properties
|
|
std::vector< std::string > | face_properties () const |
| returns the names of all face properties
|
|
std::vector< std::string > | cell_properties () const |
| returns the names of all cell properties
|
|
std::vector< std::string > | model_properties () const |
| returns the names of all model properties
|
|
void | property_stats (std::ostream &output) const override |
| prints the names of all properties to an output stream (e.g., std::cout). More...
|
|
|
VertexIterator | vertices_begin () const |
| returns start iterator for vertices
|
|
VertexIterator | vertices_end () const |
| returns end iterator for vertices
|
|
VertexContainer | vertices () const |
| returns vertex container for C++11 range-based for-loops
|
|
EdgeIterator | edges_begin () const |
| returns start iterator for edges
|
|
EdgeIterator | edges_end () const |
| returns end iterator for edges
|
|
EdgeContainer | edges () const |
| returns edge container for C++11 range-based for-loops
|
|
HalfFaceIterator | halffaces_begin () const |
| returns start iterator for halffaces
|
|
HalfFaceIterator | halffaces_end () const |
| returns end iterator for halffaces
|
|
HalffaceContainer | halffaces () const |
| returns halfface container for C++11 range-based for-loops
|
|
FaceIterator | faces_begin () const |
| returns start iterator for faces
|
|
FaceIterator | faces_end () const |
| returns end iterator for faces
|
|
FaceContainer | faces () const |
| returns face container for C++11 range-based for-loops
|
|
CellIterator | cells_begin () const |
| returns start iterator for cells
|
|
CellIterator | cells_end () const |
| returns end iterator for cells
|
|
CellContainer | cells () const |
| returns cell container for C++11 range-based for-loops
|
|
|
const std::set< Vertex > & | vertices (Vertex v) const |
| returns the vertices around vertex v
|
|
HalfFace | halfface (Face f, unsigned int i) const |
| returns the i'th halfface of face f . i has to be 0 or 1.
|
|
Face | face (HalfFace h) const |
| returns the face of HalfFace h .
|
|
HalfFace | opposite (HalfFace h) const |
| returns the twin halfface of halfface h .
|
|
Vertex | vertex (Edge e, unsigned int i) const |
| returns the i'th vertex of edge e . i has to be 0 or 1.
|
|
const std::vector< Vertex > & | vertices (HalfFace h) const |
|
const std::vector< Vertex > & | vertices (Face f) const |
| returns the set of vertices around face f
|
|
const std::set< Vertex > & | vertices (Cell c) const |
| returns the set of vertices around cell c
|
|
const std::set< Edge > & | edges (Vertex v) const |
| returns the set of edges around vertex v
|
|
const std::set< Edge > & | edges (HalfFace h) const |
| returns the set of edges around halfface h
|
|
const std::set< Edge > & | edges (Cell c) const |
| returns the set of edges around cell c
|
|
const std::set< HalfFace > & | halffaces (Vertex v) const |
| returns the set of halffaces around vertex v
|
|
const std::set< HalfFace > & | halffaces (Edge e) const |
| returns the set of halffaces around edge e
|
|
const std::vector< HalfFace > & | halffaces (Cell c) const |
| returns the set of halffaces around cell c
|
|
const std::set< Cell > & | cells (Vertex v) const |
| returns the set of cells around vertex v
|
|
const std::set< Cell > & | cells (Edge e) const |
| returns the set of cells around edge e
|
|
Cell | cell (HalfFace h) const |
| returns the cell associated with halfface h
|
|
|
bool | is_tetraheral_mesh () const |
| returns whether the mesh a tetrahedral mesh, i.e., every cell is a tetrahedron.
|
|
bool | is_border (Vertex v) const |
|
bool | is_border (Edge e) const |
|
bool | is_border (HalfFace h) const |
| returns whether f is a boundary face, i.e., it is not associated with a cell.
|
|
bool | is_border (Face f) const |
| returns whether f is a boundary face, i.e., it is incident to only one cell.
|
|
Edge | find_edge (Vertex a, Vertex b) const |
| find the edge (a,b)
|
|
HalfFace | find_half_face (const std::vector< Vertex > &vertices) const |
| find the halfface defined by a sequence of vertices (orientation sensitive)
|
|
bool | is_degenerate (Face f) const |
| returns whether face f is degenerate
|
|
void | extract_boundary (std::vector< std::vector< Vertex > > &faces) const |
| extracts the boundary surface and return its faces
|
|
| Model (const std::string &name="unknown") |
| Default constructor. The parameter name is optional, but it is useful for handling multiple models with the same viewer.
|
|
void | set_name (const std::string &n) |
| Sets/Changes the name of a model. Assigning a name to a model is optional, but it is useful for handling multiple models with the same viewer.
|
|
const std::string & | name () const |
| The name of a model.
|
|
const Box3 & | bounding_box (bool recompute=false) const |
| The bounding box of the model. More...
|
|
void | invalidate_bounding_box () |
| Invalidates the bounding box of the model. So when bounding_box() is called, the bounding box will be re-computed. This function is typically called when the geometry of a model is changed.
|
|
virtual std::vector< vec3 > & | points ()=0 |
| The vertices of the model. More...
|
|
virtual const std::vector< vec3 > & | points () const =0 |
| The vertices of the model. More...
|
|
bool | empty () const |
| Tests if the model is empty.
|
|
virtual void | property_stats (std::ostream &output) const |
| Prints the names of all properties to an output stream (e.g., std::cout). More...
|
|
void | set_renderer (Renderer *r) |
| Sets the renderer of this model. More...
|
|
Renderer * | renderer () |
| Gets the renderer of this model.
|
|
const Renderer * | renderer () const |
| Gets the constant renderer of this model.
|
|
void | set_manipulator (Manipulator *manip) |
| Attaches a manipulator to this model. More...
|
|
Manipulator * | manipulator () |
| Gets the manipulator attached to this model.
|
|
const Manipulator * | manipulator () const |
| Gets the manipulator attached to this model.
|
|