|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
A collection of functions to compute topological properties. More...
Functions | |
| template<Dims_t Dims> | |
| index_t | NumberOfEdges (const MultiIndex< Dims > &NumberOfVertices) throw () |
| Compute the number of edges on a regular grid that consists of the given number of vertices. | |
| template<Dims_t Dims> | |
| int | EdgeOrientation (index_t EdgeIndex, const MultiIndex< Dims > &NumberOfVertices) |
| Compute the orientation of a given edge index in a regular grid, given the number of vertices in the grid. | |
| template<Dims_t Dims> | |
| void | ComputeFirstEdgeVertex (MultiIndex< Dims > &FirstVertex, int &Orientation, index_t EdgeIndex, const MultiIndex< Dims > &NumberOfVertices) |
| Given a linear index of an edge (the edge ID) and the multidimensional number of vertices, compute the multidimensional indices of the corresponding vertice of the edge, and the orientation of this edge. | |
| template<Dims_t Dims> | |
| MultiIndex< Dims > | ComputeSecondEdgeVertex (const MultiIndex< Dims > &Vertex, int Orientation) throw () |
| Given the vertex of an edge and an orientation (0,1,2), return the second vertex of the given edge. | |
| template<Dims_t Dims> | |
| std::pair< MultiIndex< Dims >, MultiIndex< Dims > > | ComputeEdgeVertices (index_t EdgeIndex, const MultiIndex< Dims > &NumberOfVertices) |
| Compute the both vertices that correspond to a certain edge, where the edge is linearly numbered over all edges of a multidimensional regular grid. | |
| template<Dims_t Dims> | |
| index_t | ComputeEdgeIDfromVertexAndOrientation (const MultiIndex< Dims > &Vertex, int Orientation, const MultiIndex< Dims > &NumberOfVertices) |
| Given a vertex and an orientation (i.e. | |
A collection of functions to compute topological properties.
|
inline |
Given a vertex and an orientation (i.e.
the axis in which an edge points, compute the linear ID of the corresponding edge.
Second vertex of edge is given by
where 0 < Orientation < 3
| NumberOfVertices | The multidimensional number of vertices. |
| Throws | an integer if the vertex does not fit into the given number of vertices, or the orientation does not match, or similar. |
References Fiber::MultiIndex< Dims >::Axis().
Referenced by Fiber::ComputeInterpolationEdgeAndWeight().
|
inline |
Compute the both vertices that correspond to a certain edge, where the edge is linearly numbered over all edges of a multidimensional regular grid.
| EdgeIndex | The linear index of the edge, must be smaller than NumberOfEdges( NumberOfVertices ) |
| An | integer is thrown if the EdgeIndex is too large. |
References ComputeFirstEdgeVertex(), and ComputeSecondEdgeVertex().
Referenced by Fiber::EvalVertexFieldOnEdges().
| void Fiber::RegularTopology::ComputeFirstEdgeVertex | ( | MultiIndex< Dims > & | FirstVertex, |
| int & | Orientation, | ||
| index_t | EdgeIndex, | ||
| const MultiIndex< Dims > & | NumberOfVertices | ||
| ) |
Given a linear index of an edge (the edge ID) and the multidimensional number of vertices, compute the multidimensional indices of the corresponding vertice of the edge, and the orientation of this edge.
| EdgeIndex | The linear number of the edge, must be smaller than NumberOfEdges( NumberOfVertices ) |
| NumberOfVertices | How many vertices are there? |
| FirstVertex | Output parameter, on return will contain the first vertex |
| Orientation | The number of the axis along which this edge is oriented. |
| An | integer of value -1 is thrown if the edge index is beyond the possible range of edges. |
References Fiber::MultiIndex< Dims >::Axis().
Referenced by ComputeEdgeVertices().
|
inline | ||||||||||||||||||||
Given the vertex of an edge and an orientation (0,1,2), return the second vertex of the given edge.
This the second edge is computed by adding the BitIndex along the given orientation to the vertex.
| Vertex | The vertex where the edge starts. |
| Orientation | The number of the given dimension, must be positive or null. The result will be undefined if the Orientation equals the dimension or is larger. 0 <= Orientation < Dims |
References Fiber::MultiIndex< Dims >::BitIndex().
Referenced by ComputeEdgeVertices().
|
inline |
Compute the orientation of a given edge index in a regular grid, given the number of vertices in the grid.
Edges are ordered by orientation, first come all those oriented in the lowest dimension, then second, last those in the highest dimension. In a cube, all four edges in the x-direction are the first four, the second four are those aligned in y-direction, and the last four are those in z-direction.
| Throws | an integer of value -1 if the edge index is beyond the possible vertices. |
References Fiber::MultiIndex< Dims >::Axis(), and size().
Referenced by Fiber::ComputeInterpolationEdgeAndWeight().