Edges.hpp

00001 #ifndef __FIBER_GRID_TYPES_EDGES_HPP
00002 #define __FIBER_GRID_TYPES_EDGES_HPP
00003 
00004 #include "gridtypesDllApi.h"
00005 #include <grid/Grid.hpp>
00006 #include <eagle/PhysicalSpace.hpp>
00007 #include <field/Cell.hpp>
00008 
00009 namespace Fiber
00010 {
00011 
00022 class   gridtypes_API   Edges
00023 {
00024 public:
00025         typedef EdgeCell32      EdgeCell_t;
00026         typedef TriangleCell32  TriangleCell_t;
00027 
00028         typedef TypedArray<Eagle::PhysicalSpace::point>  CoordsArray_t;
00029         typedef MemArray<1, Eagle::PhysicalSpace::point> CoordsMemArray_t;
00030 
00031         typedef MemArray<1, EdgeCell_t>                  EdgesArray_t;
00032         typedef MemArray<1, TriangleCell_t>              TriArray_t;
00033         typedef MemArray<1, std::vector<index_t> >       IndexSetArray_t;
00034 
00035         typedef MemArray<1, Eagle::tvector3>            TangentialVector_t;
00036 
00044 static  SkeletonID EdgeSkeletonID()
00045         {
00046                 return SkeletonID(1,1);
00047         } 
00048 
00056 static  SkeletonID ID()
00057         {
00058                 return EdgeSkeletonID();
00059         }
00060 
00065 static  RefPtr<Skeleton>        getEdgeSkeleton(const RefPtr<Grid>&G, bool CreateIfNotFound); 
00066 
00075 static  RefPtr<Representation>  getVerticesPerEdge(const RefPtr<Grid>&G, bool CreateIfNotFound); 
00076 
00080 static  RefPtr<Field>           getVerticesPerEdgeField(const RefPtr<Grid>&G); 
00081 
00086 static  RefPtr<EdgesArray_t>    getVerticesPerEdgeArray(const RefPtr<Grid>&G); 
00087 
00094 static  bool addVerticesPerEdgeField(const RefPtr<Grid>&G, const RefPtr<Field>&theField); 
00095 
00105 static  bool addVerticesPerEdgeArray(const RefPtr<Grid>&G, const RefPtr<EdgesArray_t>&Data);
00106 
00107 
00108 
00124 static  RefPtr<Representation>  getEdgesPerVertex(const RefPtr<Grid>&G, bool CreateIfNotFound); 
00125 
00126 
00127         RefPtr<Skeleton>        EdgeSkeleton;
00128         RefPtr<Representation>  VerticesPerEdge;
00129         RefPtr<Field>           VerticesPerEdgeField;
00130         RefPtr<EdgesArray_t>    VerticesPerEdgeArray;
00131 
00135         Edges(const RefPtr<Grid>&G);
00136 
00138         ~Edges(); 
00139 };
00140 
00141 
00142 } // namespace Fiber
00143 
00144 #endif // __FIBER_GRID_TYPES_EDGES_HPP
00145