|
|
| Graph () |
| default constructor
|
|
| ~Graph () override=default |
| destructor
|
|
| Graph (const Graph &rhs) |
| copy constructor: copies rhs to *this . performs a deep copy of all properties.
|
|
Graph & | operator= (const Graph &rhs) |
| assign rhs to *this . performs a deep copy of all properties.
|
|
Graph & | assign (const Graph &rhs) |
| assign rhs to *this . does not copy custom properties.
|
|
|
Vertex | add_vertex (const vec3 &p) |
| add a new vertex with position p
|
|
Edge | add_edge (const Vertex &v1, const Vertex &v2) |
| add a new edge connecting vertices v1 and v2
|
|
|
unsigned int | vertices_size () const |
| returns number of (deleted and valid) vertices in the graph
|
|
unsigned int | edges_size () const |
| returns number of (deleted and valid)edges in the graph
|
|
unsigned int | n_vertices () const |
| returns number of vertices in the graph
|
|
unsigned int | n_edges () const |
| returns number of edges in the graph
|
|
void | clear () |
| Removes all vertices, edges, and properties (and resets garbage state). More...
|
|
void | reserve (unsigned int nvertices, unsigned int nedges) |
| reserve memory (mainly used in file readers)
|
|
void | resize (unsigned int nv, unsigned int ne) |
|
bool | has_garbage () const |
| are there deleted vertices or edges?
|
|
void | collect_garbage () |
| remove deleted vertices/edges
|
|
bool | is_deleted (Vertex v) const |
|
bool | is_deleted (Edge e) const |
|
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_isolated (Vertex v) const |
| returns whether v is isolated, i.e., not incident to any edge
|
|
Vertex | vertex (Edge e, unsigned int i) const |
| returns the i'th vertex of edge e . i has to be 0 or 1.
|
|
Vertex | source (Edge e) const |
| returns the starting vertex of an edge, which is equal to vertex(e, 0).
|
|
Vertex | target (Edge e) const |
| returns the ending vertex of an edge, which is equal to vertex(e, 1).
|
|
|
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 > |
ModelProperty< T > | add_model_property (const std::string &name, const T t=T()) |
|
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 > |
ModelProperty< T > | get_model_property (const std::string &name) const |
|
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 > |
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_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_edge_property (const std::string &old_name, const std::string &new_name) |
| rename an edge 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_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 > | 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
|
|
VertexAroundVertexCirculator | vertices (Vertex v) const |
| returns circulator for vertices around vertex v
|
|
EdgeAroundVertexCirculator | edges (Vertex v) const |
| returns circulator for edges around vertex v
|
|
|
unsigned int | valence (Vertex v) const |
|
Edge | find_edge (Vertex a, Vertex b) const |
| find the edge (a,b)
|
|
void | delete_vertex (Vertex v) |
| deletes the vertex v from the graph
|
|
void | delete_edge (Edge e) |
| deletes the edge e from the graph
|
|
| 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.
|
|