FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Fiber::TriangularSurfaceWithEdges Class Reference

A triangular surface stored on a Grid, containing vertices, edges, triangles. More...

#include <TriangularSurfaceWithEdges.hpp>

Inheritance diagram for Fiber::TriangularSurfaceWithEdges:
Fiber::TriangularSurface Fiber::Edges MemCore::StrongPtr< class Object, class ObjectBase > MemCore::WeakPtr< class Object, class ObjectBase > MemCore::DynPtr< class Object, class ObjectBase >

Public Types

typedef MemArray< 1, TriangleCellEdgesPerFaceArray_t
 The array type to store edges per face on a triangular surface, which will be three edge indices for each triangle cell.
 
typedef MemArray< 1, TriangleCellEdgesPerTriangleArray_t
 The array type to store edges per face on a triangular surface, which will be three edge indices for each triangle cell.
 
typedef MemArray< 1, EdgeCell_tEdgesArray_t
 The array type to store the faces per edge within a surface, which will be exactly two such faces for each edge.
 
typedef MultiArray< 1, EdgeCell_tEdgesArray_m_t
 
- Public Types inherited from Fiber::TriangularSurface
typedef MemArray< 1, Eagle::PhysicalSpace::pointCoordsArray_t
 
typedef MultiArray< 1, Eagle::PhysicalSpace::pointCoordsArray_m_t
 
typedef MemArray< 1, TriangleCell_tCellArray_t
 
typedef MultiArray< 1, TriangleCellCellArray_m_t
 
typedef CellArray_t ConnectivityArray_t
 
typedef CellArray_t TriangleArray_t
 
typedef MemArray< 1, Eagle::PhysicalSpace::bivectorNormalVectorArray_t
 
typedef MultiArray< 1, Eagle::PhysicalSpace::bivectorNormalVectorArray_m_t
 
- Public Types inherited from MemCore::StrongPtr< class Object, class ObjectBase >
typedef WeakPtr< Object, ObjectBase >::ObjectBase_t ObjectBase_t
 
- Public Types inherited from MemCore::WeakPtr< class Object, class ObjectBase >
typedef Object object_t
 
typedef ObjectBase ObjectBase_t
 
typedef RefPtrTypeTrait< Object, ObjectBase >::ReferencePointerType pointer_t
 
typedef RefPtrTypeTrait< Object, ObjectBase >::ReferenceValueType refvalue_t
 
- Public Types inherited from MemCore::DynPtr< class Object, class ObjectBase >
typedef Object object_t
 
- Public Types inherited from Fiber::Edges
typedef EdgeCell32 EdgeCell_t
 
typedef TriangleCell32 TriangleCell_t
 
typedef TypedArray< Eagle::PhysicalSpace::pointCoordsArray_t
 
typedef MemArray< 1, Eagle::PhysicalSpace::pointCoordsMemArray_t
 
typedef MultiArray< 1, Eagle::PhysicalSpace::pointCoordsMultiArray_m_t
 
typedef MemArray< 1, EdgeCell_tEdgesArray_t
 
typedef MemArray< 1, TriangleCell_tTriArray_t
 
typedef MemArray< 1, std::vector< index_t > > IndexSetArray_t
 
typedef MemArray< 1, Eagle::tvector3 > TangentialVector_t
 
typedef std::vector< index_tEdgesPerVertex_t
 Edges per vertex: variable length!
 
typedef MemArray< 1, EdgesPerVertex_tEdgesPerVertexMemArray_t
 

Public Member Functions

RefPtr< RepresentationgetEdgesPerFace (bool CreateIfNotFound) const
 
RefPtr< EdgesPerFaceArray_tgetEdgesPerFaceArray () const
 
 TriangularSurfaceWithEdges (const RefPtr< Grid > &=NullPtr())
 Construct from given Grid object.
 
 ~TriangularSurfaceWithEdges ()
 Destructor.
 
LineSet OutLines (const RefPtr< Grid > &OutputGrid)
 Compute the outlines of this triangular surface.
 
- Public Member Functions inherited from Fiber::TriangularSurface
 TriangularSurface (const RefPtr< Grid > &=NullPtr())
 Construct a triangular surface from a Grid object, extracting those properties that make a triangular surface.
 
TriangularSurfaceoperator= (const RefPtr< Grid > &)
 
 ~TriangularSurface ()
 Destructor.
 
RefPtr< CreativeArrayBasenewVertexNormalCreator () const
 
RefPtr< FieldgetVertexNormalField (const string &FieldName=NormalVectorFieldName)
 Get normal vectors, possibly computing them if they do not exist yet.
 
RefPtr< NormalVectorArray_tgetVertexNormals (const string &FieldName=NormalVectorFieldName)
 
RefPtr< CoordsArray_tgetCoords () const
 Get the coordinate data array.
 
RefPtr< CellArray_tgetCells () const
 Get the triangle data array.
 
template<int N, class T >
RefPtr< Fiber::MemBasegetTriangularFieldData (const std::string &fieldname, RefPtr< FragmentID > fragID=NullPtr())
 
RefPtr< CoordsArray_tgetNormals (const string &FieldName=NormalVectorFieldName)
 
RefPtr< FieldgetTriangleBaryCenters ()
 
LineSet OutLines (const RefPtr< Grid > &OutputGrid)
 Compute the outlines of this triangular surface.
 
- Public Member Functions inherited from MemCore::StrongPtr< class Object, class ObjectBase >
StrongPtrassignStrong (const DynPtr_t &other)
 
StrongPtrassignStrong (const ReferenceBase< ObjectBase_t > *Obj)
 
StrongPtrassignStrong (const std::nullptr_t &)
 
auto operator() (Arguments...parameters) const -> decltype((*this->getPtrValue())(parameters...))
 
refvalue_toperator* () const
 
pointer_t operator-> () const
 
StrongPtroperator= (const DynPtr_t &other)
 
StrongPtroperator= (const ReferenceBase< ObjectBase_t > *Obj)
 
StrongPtroperator= (const std::initializer_list< StrongPtr > &other)
 
StrongPtroperator= (const std::nullptr_t &)
 
StrongPtroperator= (const StrongPtr &other)
 
auto operator[] (const IndexType &I) const -> decltype((*this->getPtrValue())[I])
 
 StrongPtr (const ReferenceBase< ObjectBase_t > *Obj)
 
 StrongPtr (const ReferenceBase< ObjectBase_t > *Obj, const NotNullPtr &)
 
 StrongPtr (const std::nullptr_t &)
 
 StrongPtr (const StrongPtr< ChildObject, ObjectBase > &Other)
 
 StrongPtr (const StrongPtr< Object, ObjectBase > &Other)
 
 StrongPtr (const WeakPtr< ChildObject, ObjectBase_t > &Other)
 
- Public Member Functions inherited from MemCore::WeakPtr< class Object, class ObjectBase >
pointer_t getPtrValue () const
 
pointer_t operator-> () const
 
refvalue_toperator* () const
 
size_t operator~ () const
 
 WeakPtr (const std::nullptr_t &)
 
 WeakPtr (const ReferenceBase< ObjectBase > *Obj)
 
 WeakPtr (const ReferenceBase< ObjectBase > *Obj, const NotNullPtr &)
 
 WeakPtr (const WeakPtr< AnyObject, ObjectBase > &Other)
 
 WeakPtr (const WeakPtr &Other)
 
WeakPtrassignWeak (const WeakPtr &other)
 
WeakPtroperator= (const WeakPtr &other)
 
- Public Member Functions inherited from MemCore::DynPtr< class Object, class ObjectBase >
const DynPtrgetDynPtr () const noexcept
 
const type_info & getType () const noexcept
 
bool isAssignable (const DynPtr< ObjectBase, ObjectBase > &Other) const noexcept
 
 operator void * () const noexcept
 
bool operator! () const noexcept
 
void speak (const char *s, const char *prefix="") const noexcept
 
void Speak (const char *s, const char *prefix="") const
 
- Public Member Functions inherited from Fiber::Edges
 Edges (const RefPtr< Grid > &G)
 Retrieve a Edge information from a Grid object.
 
 ~Edges ()
 Destructor, cleans up references.
 

Static Public Member Functions

static RefPtr< RepresentationgetEdgesPerFace (const RefPtr< Grid > &, bool CreateIfNotFound)
 There will be three edges per triangle.
 
static RefPtr< RepresentationgetFacesPerEdge (const RefPtr< Grid > &G, bool CreateIfNotFound)
 
static RefPtr< TriangularSurfaceWithEdges::EdgesArray_tgetTrianglesPerEdgeArray (const RefPtr< Grid > &G, bool CreateIfNotFound)
 
static RefPtr< MemArray< 1, Edges::TriangleCell_t > > getTrianglesPerTriangleArray (const RefPtr< Grid > &G, bool CreateIfNotFound)
 
static RefPtr< RepresentationgetTrianglesPerEdge (const RefPtr< Grid > &G, bool CreateIfNotFound)
 
static RefPtr< Edges::EdgesPerVertexMemArray_tgetTrianglesPerVertexArray (const RefPtr< Grid > &G, bool CreateIfNotFound)
 
static bool addTrianglesPerEdgeArray (const RefPtr< Grid > &G, const RefPtr< EdgesArray_t > &Data)
 
static bool addTrianglesPerTriangleArray (const RefPtr< Grid > &G, RefPtr< TriangularSurfaceWithEdges::CellArray_t > &Data)
 
static bool addEdgesPerFaceArray (const RefPtr< Grid > &G, const RefPtr< EdgesPerFaceArray_t > &Data)
 
static bool addTrianglesPerVertexArray (const RefPtr< Grid > &G, const RefPtr< Edges::EdgesPerVertexMemArray_t > &Data)
 
static TriangularSurfaceWithEdges create (const TriangularSurface &T)
 Create vertices per edge and edges per triangle.
 
static RefPtr< Edges::EdgesPerVertexMemArray_tcreateEdgesPerVertex (const TriangularSurfaceWithEdges &T, bool storeThem)
 Create Edges Per Vertex.
 
static RefPtr< Edges::EdgesPerVertexMemArray_tcreateEdgesPerVertex (const TriangularSurface &T, bool storeThem)
 Create Triangles Per Edge and Create Function.
 
static RefPtr< TriangularSurfaceWithEdges::EdgesArray_tcreateTrianglesPerEdge (const TriangularSurfaceWithEdges &T, bool storeThem)
 Create Triangles Per Edge.
 
static RefPtr< TriangularSurfaceWithEdges::EdgesArray_tcreateTrianglesPerEdge (const TriangularSurface &T, bool storeThem)
 Create Triangles Per Edge and Create Function.
 
static RefPtr< MemArray< 1, Edges::TriangleCell_t > > createTrianglesPerTriangle (const TriangularSurfaceWithEdges &T, bool storeThem)
 autor::Doeby Create Triangles Per Triangle todo: store in grid
 
static RefPtr< MemArray< 1, Edges::TriangleCell_t > > createTrianglesPerTriangle (const TriangularSurface &T, bool storeThem)
 Create Triangles Per Triangle and Create Function.
 
static RefPtr< Edges::EdgesPerVertexMemArray_tcreateTrianglesPerVertex (const TriangularSurfaceWithEdges &T, bool storeThem)
 autor::Doeby Create Triangles Per Vertices todo: store in grid
 
static RefPtr< Edges::EdgesPerVertexMemArray_tcreateTrianglesPerVertex (const TriangularSurface &T, bool storeThem)
 Create Triangles Per Vertices and Create Function.
 
- Static Public Member Functions inherited from Fiber::TriangularSurface
static bool addVerticesAndConnectivity (Grid &G, const RefPtr< CoordsArray_t > &Vertices, const RefPtr< CellArray_t > &Connectivity)
 Add Vertices& Connectivity to grid.
 
static Eagle::PhysicalSpace::bivector NormalVector (const TriangleCell &T, const MultiArray< 1, Eagle::PhysicalSpace::point > &Vertices)
 Compute the normal vector of a triangle.
 
static RefPtr< NormalVectorArray_tcomputeVertexNormals (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr())
 
static SkeletonID ID ()
 2D objects of index depth 1 .
 
static RefPtr< SkeletongetFaceSkeleton (const RefPtr< Grid > &G, bool CreateIfNotFound)
 Get the Skeleton holding the Faces (two-dimensional k-cells) of the given Grid object.
 
static TriangularSurface create (Grid &theGrid, const RefPtr< MemBase > &Vertices, const RefPtr< MemBase > &Triangles, bool DiscardableVertices, bool DiscardableTriangles)
 
static TriangularSurface create (Grid &theGrid, const RefPtr< MemBase > &Vertices, const RefPtr< MemBase > &Triangles, bool Discardable=false)
 
static RefPtr< CoordsArray_tcomputeBaryCenters (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr())
 
static RefPtr< CoordsArray_tcomputeCircumCircleCenter (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr())
 
static RefPtr< CoordsArray_tcomputeInCircleCenter (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr())
 
static bool containtedEdgeInArray (uint32_t A, uint32_t B, const std::vector< Edges::EdgeCell_t > &edges)
 
static void addIfEdgeOfNotContained (const Edges::EdgeCell_t &edge, std::vector< Edges::EdgeCell_t > &edges)
 
static RefPtr< LineSet::LinesetArray_tcomputeOutLinesViaTriangles (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr())
 
- Static Public Member Functions inherited from MemCore::DynPtr< class Object, class ObjectBase >
static const DynPtrgetNullPtr () noexcept
 
- Static Public Member Functions inherited from Fiber::Edges
static SkeletonID EdgeSkeletonID ()
 Return the skeleton ID that refers to the Edges property of a cw-complex.
 
static SkeletonID ID ()
 Return a skeleton ID that is characteristic for Grid objects that carry Edge information.
 
static RefPtr< SkeletongetEdgeSkeleton (const RefPtr< Grid > &G, bool CreateIfNotFound)
 Return the Skeleton that holds all the information that is given on Edges of a Grid object.
 
static RefPtr< RepresentationgetVerticesPerEdge (const RefPtr< Grid > &G, bool CreateIfNotFound)
 Find the information how edges are represented as Vertices, which is two vertices are given per Edge ID.
 
static RefPtr< FieldgetVerticesPerEdgeField (const RefPtr< Grid > &G)
 Return the Positions field of the edges given as vertices.
 
static RefPtr< EdgesArray_tgetVerticesPerEdgeArray (const RefPtr< Grid > &G)
 Return the data array that holds the edges as vertices.
 
static bool addVerticesPerEdgeField (const RefPtr< Grid > &G, const RefPtr< Field > &theField)
 Add a new Field describing the Edge information to a certain Grid object.
 
static bool addVerticesPerEdgeArray (const RefPtr< Grid > &G, const RefPtr< EdgesArray_t > &Data)
 Add a new array of edges to the Edge information of a certain Grid object.
 
static bool addVerticesPerEdgeArray (const RefPtr< Grid > &G, const RefPtr< MemCore::TypedChunk< EdgeCell_t > > &EdgeData)
 
static RefPtr< RepresentationgetEdgesPerVertex (const RefPtr< Grid > &G, bool CreateIfNotFound)
 Find the information how vertices are related to edges, which can be varying, the element type of the Positions field is thus dependent on the type of mesh.
 
static RefPtr< FieldgetEdgesPerVertexField (const RefPtr< Grid > &G, bool CreateIfNotFound)
 
static RefPtr< EdgesArray_tgetEdgesPerVertexArray (const RefPtr< Grid > &G)
 
static bool addEdgesPerVertex (const RefPtr< Grid > &G, const RefPtr< Field > &theField)
 
static RefPtr< EdgesPerVertexMemArray_tcreateEdgesPerVertex (const RefPtr< Grid > &G, bool storeThem)
 Get all edges of each vertex;.
 

Additional Inherited Members

- Public Attributes inherited from Fiber::TriangularSurface
RefPtr< FieldCoordField
 Field for the vertex coordinates.
 
RefPtr< FieldVertexNormalField
 internal storage of the vertex normal field if existent Use getVertexNormalField() to compute the normals, if required
 
RefPtr< FieldCellField
 Field for the triangle indices.
 
RefPtr< RepresentationCartesianVertices
 Collection of all fields given on vertices relative to cartesian coordinates.
 
RefPtr< RepresentationCellsAsVertices
 Collection of all fields given on triangles.
 
- Public Attributes inherited from Fiber::Edges
RefPtr< SkeletonEdgeSkeleton
 
RefPtr< RepresentationVerticesPerEdge
 
RefPtr< FieldVerticesPerEdgeField
 
RefPtr< EdgesArray_tVerticesPerEdgeArray
 
- Static Public Attributes inherited from Fiber::TriangularSurface
static const char NormalVectorFieldName [] = "Normals"
 A default name for the field that holds the normal vectors of a grid with a surface.
 
- Protected Member Functions inherited from MemCore::WeakPtr< class Object, class ObjectBase >
 WeakPtr (Object *that, const SelfInitialize &)
 
- Protected Member Functions inherited from MemCore::DynPtr< class Object, class ObjectBase >
 DynPtr (const DynPtr< AnyObject, ObjectBase > &Other) noexcept
 
 DynPtr (const std::nullptr_t &) noexcept
 

Detailed Description

A triangular surface stored on a Grid, containing vertices, edges, triangles.

Constructor & Destructor Documentation

◆ TriangularSurfaceWithEdges()

Fiber::TriangularSurfaceWithEdges::TriangularSurfaceWithEdges ( const RefPtr< Grid > &  G = NullPtr())

Construct from given Grid object.

TriangularSurfaceWithEdge.

Member Function Documentation

◆ create()

TriangularSurfaceWithEdges Fiber::TriangularSurfaceWithEdges::create ( const TriangularSurface T)
static

Create vertices per edge and edges per triangle.

DOEBY: TriangularSurfaceWithEdge 2 Create Edges Per Triangle and vertices per edge.

Store them to Grid.

Author
doeby

Get the vector of the point-index of each triangle

Adding to Grid

References Fiber::Edges::addVerticesPerEdgeArray(), Fiber::Edges::getVerticesPerEdgeArray(), and std::to_string().

Referenced by createEdgesPerVertex(), createTrianglesPerEdge(), createTrianglesPerTriangle(), and createTrianglesPerVertex().

◆ getEdgesPerFace()

RefPtr< Representation > Fiber::TriangularSurfaceWithEdges::getEdgesPerFace ( const RefPtr< Grid > &  G,
bool  CreateIfNotFound 
)
static

There will be three edges per triangle.

The Positions field of this Representation object will thus be of type EdgesPerFaceArray_t.

References Fiber::Edges::getEdgeSkeleton(), and Fiber::TriangularSurface::getFaceSkeleton().