|
Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
A triangular surface stored on a Grid. More...
#include <TriangularSurface.hpp>
Public Types | |
| typedef MemArray< 1, Eagle::PhysicalSpace::point > | CoordsArray_t |
| typedef MultiArray< 1, Eagle::PhysicalSpace::point > | CoordsArray_m_t |
| typedef MemArray< 1, TriangleCell_t > | CellArray_t |
| typedef MultiArray< 1, TriangleCell > | CellArray_m_t |
| typedef CellArray_t | ConnectivityArray_t |
| typedef CellArray_t | TriangleArray_t |
| typedef MemArray< 1, Eagle::PhysicalSpace::bivector > | NormalVectorArray_t |
| typedef MultiArray< 1, Eagle::PhysicalSpace::bivector > | NormalVectorArray_m_t |
| Public Types inherited from Eagle::StrongPtr< Object, ObjectBase > | |
| typedef WeakPtr< Object, ObjectBase >::ObjectBase_t | ObjectBase_t |
| Public Types inherited from MemCore::WeakPtr< Object, 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< Object, ObjectBase > | |
| typedef Object | object_t |
Public Member Functions | |
| TriangularSurface (const RefPtr< Grid > &=NullPtr()) | |
| Construct a triangular surface from a Grid object, extracting those properties that make a triangular surface. | |
| TriangularSurface & | operator= (const RefPtr< Grid > &) |
| ~TriangularSurface () | |
| Destructor. | |
| RefPtr< CreativeArrayBase > | newVertexNormalCreator () const |
| RefPtr< Field > | getVertexNormalField (const string &FieldName=NormalVectorFieldName) |
| Get normal vectors, possibly computing them if they do not exist yet. | |
| RefPtr< NormalVectorArray_t > | getVertexNormals (const string &FieldName=NormalVectorFieldName) |
| RefPtr< CoordsArray_t > | getCoords () const |
| Get the coordinate data array. | |
| RefPtr< CellArray_t > | getCells () const |
| Get the triangle data array. | |
| template<int N, class T> | |
| RefPtr< Fiber::MemBase > | getTriangularFieldData (const std::string &fieldname, RefPtr< FragmentID > fragID=NullPtr()) |
| RefPtr< CoordsArray_t > | getNormals (const string &FieldName=NormalVectorFieldName) |
| RefPtr< Field > | getTriangleBaryCenters () |
| LineSet | OutLines (const RefPtr< Grid > &OutputGrid) |
| Compute the outlines of this triangular surface. | |
| Public Member Functions inherited from Eagle::StrongPtr< Object, ObjectBase > | |
| StrongPtr & | assignStrong (const DynPtr_t &other) |
| StrongPtr & | assignStrong (const ReferenceBase< ObjectBase_t > *Obj) |
| StrongPtr & | assignStrong (const std::nullptr_t &) |
| auto | operator() (Arguments...parameters) const -> decltype((*this->getPtrValue())(parameters...)) |
| refvalue_t & | operator* () const |
| pointer_t | operator-> () const |
| StrongPtr & | operator= (const DynPtr_t &other) |
| StrongPtr & | operator= (const ReferenceBase< ObjectBase_t > *Obj) |
| StrongPtr & | operator= (const std::initializer_list< StrongPtr > &other) |
| StrongPtr & | operator= (const std::nullptr_t &) |
| StrongPtr & | operator= (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< Object, ObjectBase > | |
| 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) | |
| pointer_t | getPtrValue () const |
| pointer_t | operator-> () const |
| refvalue_t & | operator* () const |
| size_t | operator~ () const |
| WeakPtr & | assignWeak (const WeakPtr &other) |
| WeakPtr & | operator= (const WeakPtr &other) |
| Public Member Functions inherited from MemCore::DynPtr< Object, ObjectBase > | |
| const DynPtr & | getDynPtr () 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 |
Static Public Member Functions | |
| 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_t > | computeVertexNormals (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< Skeleton > | getFaceSkeleton (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_t > | computeBaryCenters (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr()) |
| static RefPtr< CoordsArray_t > | computeCircumCircleCenter (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr()) |
| static RefPtr< CoordsArray_t > | computeInCircleCenter (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_t > | computeOutLinesViaTriangles (const RefPtr< CoordsArray_t > &Pts, const RefPtr< CellArray_t > &Cells, const MemBase::Creator_t &Crec=NullPtr()) |
| Static Public Member Functions inherited from MemCore::DynPtr< Object, ObjectBase > | |
| static const DynPtr & | getNullPtr () noexcept |
Public Attributes | |
| RefPtr< Field > | CoordField |
| Field for the vertex coordinates. | |
| RefPtr< Field > | VertexNormalField |
| internal storage of the vertex normal field if existent Use getVertexNormalField() to compute the normals, if required | |
| RefPtr< Field > | CellField |
| Field for the triangle indices. | |
| RefPtr< Representation > | CartesianVertices |
| Collection of all fields given on vertices relative to cartesian coordinates. | |
| RefPtr< Representation > | CellsAsVertices |
| Collection of all fields given on triangles. | |
Static Public Attributes | |
| static const char | NormalVectorFieldName [] = "Normals" |
| A default name for the field that holds the normal vectors of a grid with a surface. | |
Additional Inherited Members | |
| Protected Member Functions inherited from MemCore::WeakPtr< Object, ObjectBase > | |
| WeakPtr (Object *that, const SelfInitialize &) | |
| Protected Member Functions inherited from MemCore::DynPtr< Object, ObjectBase > | |
| DynPtr (const DynPtr< AnyObject, ObjectBase > &Other) noexcept | |
| DynPtr (const std::nullptr_t &) noexcept | |
A triangular surface stored on a Grid.
The information required in a Grid object are vertices given in cartesian coordinates, and triangles given as indices of three vertices per triangle index. This information defines two arrays, of type CoordsArray_t and of type CellArray_t.
The Grid must carry Vertices in Cartesian coordinates and a (2,1) Skeleton with positions in the Vertices as triangle cells.
A Grid object can be easily tested whether it is ("conforms to the concept of") a TriangularSurface:
If the reason for not being a TriangularSurface need to be inspected further, then the members of the TriangularSurface can be investigated.
Construct a triangular surface from a Grid object, extracting those properties that make a triangular surface.
Note that the Grid pointer (the base class) will not be assigned if the given Grid does not conform to the properties of a Triangular Surface, thus the evaluation will return false. A valid code to check if a Grid is a triangular surface looks like this:
This is a mere cmeta-data check for the existence of appropriate Fields. The triangular surface will still be invalid if there are no data associated in those Fields. This meta-data check does not load or create any data.
References CartesianVertices, CellField, CellsAsVertices, CoordField, NormalVectorFieldName, Eagle::StrongPtr< Object, ObjectBase >::operator=(), and VertexNormalField.
Referenced by Fiber::TriangularSurfaceWithEdges::TriangularSurfaceWithEdges(), Fiber::TriangularSurfaceWithEdges::create(), Fiber::TriangularSurfaceWithEdges::createEdgesPerVertex(), Fiber::TriangularSurfaceWithEdges::createTrianglesPerEdge(), Fiber::TriangularSurfaceWithEdges::createTrianglesPerTriangle(), and Fiber::TriangularSurfaceWithEdges::createTrianglesPerVertex().
|
static |
Add Vertices& Connectivity to grid.
Add Position to grid.
Set Vertices
Set Connectivity
References Fiber::SkeletonMap::findVertices(), ID(), Fiber::Grid::makeCartesianRepresentation(), and Fiber::Representation::setPositions().
|
inline |
Get the triangle data array.
The surface must be unfragmented.
References CellField.
Referenced by OutLines(), and Fiber::SplitMeshEdges().
|
inline |
Get the coordinate data array.
The surface must be unfragmented.
References CoordField.
Referenced by OutLines().
| RefPtr< Field > Fiber::TriangularSurface::getVertexNormalField | ( | const string & | FieldName = NormalVectorFieldName | ) |
Get normal vectors, possibly computing them if they do not exist yet.
Access VertexNormalField to see if this field already has been defined.
References CartesianVertices, and VertexNormalField.
|
inlinestatic |
2D objects of index depth 1 .
Return a skeleton ID that is characteristic for this type of Grids. In this case, for a set of triangles, it will be the (2,1) skeleton, with 2D cells referring to vertices.
Referenced by addVerticesAndConnectivity(), and getFaceSkeleton().
|
static |
A default name for the field that holds the normal vectors of a grid with a surface.
It will just be "Normals";
Referenced by TriangularSurface(), Wizt::TriangleRenderer::computeVertexNormals(), and Wizt::TriangleRenderer::getNormals().