|
FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
|
A triangular surface stored on a Grid. More...
#include <TriangularSurface.hpp>
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 MemCore::StrongPtr< class Object, class 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< class Object, class ObjectBase > | |
| pointer_t | getPtrValue () const |
| pointer_t | operator-> () const |
| refvalue_t & | operator* () 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) | |
| WeakPtr & | assignWeak (const WeakPtr &other) |
| WeakPtr & | operator= (const WeakPtr &other) |
Public Member Functions inherited from MemCore::DynPtr< class Object, class 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 |
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< 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 | |
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, MemCore::StrongPtr< class Object, class ObjectBase >::operator=(), and VertexNormalField.
|
static |
Add Vertices& Connectivity to grid.
Add Position to grid.
Set Vertices
Set Connectivity
References ID().
|
inline |
|
inline |
| 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().
A default name for the field that holds the normal vectors of a grid with a surface.
It will just be "Normals";
Referenced by Wizt::TriangleRenderer::computeVertexNormals(), Wizt::TriangleRenderer::getNormals(), and TriangularSurface().