FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
TriangularSurfaceWithEdges.hpp
1#ifndef __FIBER_GRID_TYPES_TRIANGULARSURFACEWITHEDGES_HPP
2#define __FIBER_GRID_TYPES_TRIANGULARSURFACEWITHEDGES_HPP
3
4#include "gridtypesDllApi.h"
5#include <grid/Grid.hpp>
6#include <eagle/PhysicalSpace.hpp>
7#include <field/Cell.hpp>
8#include "Edges.hpp"
9
10#include "LineSet.hpp"
11#include "TriangularSurface.hpp"
12
13namespace Fiber
14{
15
21{
22public:
27
32
42static RefPtr<Representation> getEdgesPerFace(const RefPtr<Grid>&, bool CreateIfNotFound);
43
44 RefPtr<Representation> getEdgesPerFace(bool CreateIfNotFound) const
45 {
46 return getEdgesPerFace( *this, CreateIfNotFound);
47 }
48
49 RefPtr<EdgesPerFaceArray_t> getEdgesPerFaceArray() const
50 {
51 if (RefPtr<Representation> R = getEdgesPerFace(false) )
52 {
53 if (RefPtr<Field> Pos = R->Positions())
54 return Pos->getData();
55 }
56 return NullPtr();
57 }
58
59static RefPtr<Representation> getFacesPerEdge(const RefPtr<Grid>&G, bool CreateIfNotFound);
60
61static RefPtr<TriangularSurfaceWithEdges::EdgesArray_t> getTrianglesPerEdgeArray(const RefPtr<Grid>&G, bool CreateIfNotFound) ;
62
63static RefPtr<MemArray<1,Edges::TriangleCell_t> > getTrianglesPerTriangleArray(const RefPtr<Grid>&G, bool CreateIfNotFound);
64
65static RefPtr<Representation> getTrianglesPerEdge(const RefPtr<Grid>&G, bool CreateIfNotFound)
66 {
67 return getFacesPerEdge(G, CreateIfNotFound);
68 }
69
70static RefPtr<Edges::EdgesPerVertexMemArray_t> getTrianglesPerVertexArray(const RefPtr<Grid>&G, bool CreateIfNotFound);
71/*
72 Adding
73*/
74static bool addTrianglesPerEdgeArray(const RefPtr<Grid>&G, const RefPtr<EdgesArray_t>&Data);
75
76static bool addTrianglesPerTriangleArray (const RefPtr<Grid>&G, RefPtr<TriangularSurfaceWithEdges::CellArray_t>&Data);
77
78static bool addEdgesPerFaceArray(const RefPtr<Grid>&G, const RefPtr<EdgesPerFaceArray_t>&Data);
79
80static bool addTrianglesPerVertexArray(const RefPtr<Grid>&G, const RefPtr<Edges::EdgesPerVertexMemArray_t>&Data);
81
86static TriangularSurfaceWithEdges create(const TriangularSurface&T);
87
88/*
89 Create edges per vertex
90 @author doeby
91*/
92static RefPtr<Edges::EdgesPerVertexMemArray_t >
93 createEdgesPerVertex(const TriangularSurfaceWithEdges&T, bool storeThem);
94
95static RefPtr<Edges::EdgesPerVertexMemArray_t >
96 createEdgesPerVertex(const TriangularSurface&T, bool storeThem);
97
98/*
99 Create edges per vertex
100 @author doeby
101*/
102static RefPtr<TriangularSurfaceWithEdges::EdgesArray_t>
103 createTrianglesPerEdge(const TriangularSurfaceWithEdges&T, bool storeThem);
104
105static RefPtr<TriangularSurfaceWithEdges::EdgesArray_t>
106 createTrianglesPerEdge(const TriangularSurface&T, bool storeThem);
107
108
109/*
110 Create triangles per triangle
111 @author doeby
112*/
113
114static RefPtr<MemArray<1,Edges::TriangleCell_t> >
115 createTrianglesPerTriangle(const TriangularSurfaceWithEdges&T,bool storeThem);
116
117
118static RefPtr<MemArray<1,Edges::TriangleCell_t> >
119 createTrianglesPerTriangle(const TriangularSurface&T,bool storeThem);
120
121/*
122 Create triangles per vertex
123 @author doeby
124*/
125static RefPtr<Edges::EdgesPerVertexMemArray_t>
126 createTrianglesPerVertex(const TriangularSurfaceWithEdges&T, bool storeThem);
127
128static RefPtr<Edges::EdgesPerVertexMemArray_t>
129 createTrianglesPerVertex(const TriangularSurface&T,
130 bool storeThem);
131
132
134 TriangularSurfaceWithEdges(const RefPtr<Grid>& = NullPtr() );
135
137 ~TriangularSurfaceWithEdges();
138
142 LineSet OutLines(const RefPtr<Grid>&OutputGrid);
143
144/*
145static RefPtr<LineSet::LinesetArray_t>
146 computeOutLines( const RefPtr<CoordsArray_t>&Pts,
147 const RefPtr<CellArray_t> &Cells,
148 const MemBase::Creator_t&Crec = NullPtr() );
149*/
150};
151
152
153} // namespace Fiber
154
155#endif // __FIBER_GRID_TYPES_TRIANGULARSURFACE_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identify the edges on a skeleton within a Grid.
Definition Edges.hpp:35
A set of lines stored on a Grid.
Definition LineSet.hpp:55
A triangular surface stored on a Grid, containing vertices, edges, triangles.
Definition TriangularSurfaceWithEdges.hpp:21
MemArray< 1, EdgeCell_t > EdgesArray_t
The array type to store the faces per edge within a surface, which will be exactly two such faces for...
Definition TriangularSurfaceWithEdges.hpp:36
LineSet OutLines(const RefPtr< Grid > &OutputGrid)
Compute the outlines of this triangular surface.
MemArray< 1, TriangleCell > EdgesPerTriangleArray_t
The array type to store edges per face on a triangular surface, which will be three edge indices for ...
Definition TriangularSurfaceWithEdges.hpp:31
MemArray< 1, TriangleCell > EdgesPerFaceArray_t
The array type to store edges per face on a triangular surface, which will be three edge indices for ...
Definition TriangularSurfaceWithEdges.hpp:26
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
std::nullptr_t NullPtr
A triangular surface stored on a Grid.
Definition TriangularSurface.hpp:43