Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Fiber::CellCluster< CellDims, ClusterDepth > Class Template Reference

A set of cells stored on a Grid. More...

#include <CellCluster.hpp>

Public Types

typedef TypedArray< Eagle::PhysicalSpace::pointCoordsArray_t
typedef MemArray< 1, Eagle::PhysicalSpace::pointCoordsMemArray_t
typedef uint32_t CellIndex_t
 The index type used for line set indices.
typedef std::vector< CellIndex_tCellIndices_t
 A vector of cell indices.
typedef MemArray< 1, CellIndices_tCellClusterArray_t
 An array of line indices.

Public Member Functions

 CellCluster (const WeakPtr< Grid > &G=NullPtr())
 Retrieve a CellCluster from a Grid object.
bool operator= (const WeakPtr< Grid > &G)
 Assign from Grid pointer, will overwrite all members.
CellClusteroperator= (const CellCluster &LS)
 Assigning from existing LineSet - faster than assigning from Grid pointer since it is just copying pointers.
 ~CellCluster ()
 Destructor, cleans up references.
 operator bool () const
 Return true if line indices are defined, thus this is a set of lines.
bool operator! () const
 Inverse operator of the line indices check.

Static Public Member Functions

static SkeletonID ClusterSkeletonID ()
 A Skeleton ID for clusters of cells.
static SkeletonID CellSkeletonID ()
 The Skeleton ID of the objects that are going to be clustered here.
static SkeletonID ID ()
 A Skeleton ID that is supposed to be typical for this Grid Type.

Public Attributes

RefPtr< SkeletonVertices
RefPtr< SkeletonCells
RefPtr< SkeletonClusters
RefPtr< RepresentationCartesianVertices
RefPtr< RepresentationClustersAsCartesianVertices
RefPtr< RepresentationClustersAsCells
RefPtr< FieldCoords
RefPtr< FieldClusterCoordinates
RefPtr< FieldClusterAsVertexIndices
RefPtr< FieldClusterAsCellIndices
 Which cells constitute a cluster.
RefPtr< FieldCellsAsCluster
 Which clusters are at each cell.

Detailed Description

template<int CellDims, int ClusterDepth = 2>
class Fiber::CellCluster< CellDims, ClusterDepth >

A set of cells stored on a Grid.

The (2,2) Skeleton describes the sets of k-cells.

The positions field of this triangle set is a 1D array of vector<index_t> which describes the triangle indices make up a triangle set.

A Grid object can be easily tested whether it is ("conforms to the concept of") a CellCluster:

if (CellCluster<2> C = G)
{
... yes this Grid contains a cluster of 2-cells (e.g., triangles) ...
}
CellCluster(const WeakPtr< Grid > &G=NullPtr())
Retrieve a CellCluster from a Grid object.
Definition CellCluster.hpp:116
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
StrongPtr< Object, ObjectBase > RefPtr

Member Typedef Documentation

◆ CellClusterArray_t

template<int CellDims, int ClusterDepth = 2>
typedef MemArray<1, CellIndices_t> Fiber::CellCluster< CellDims, ClusterDepth >::CellClusterArray_t

An array of line indices.

This will make an vector<vector<>> and thus has to be taken with care since I/O will be slow.

◆ CellIndex_t

template<int CellDims, int ClusterDepth = 2>
typedef uint32_t Fiber::CellCluster< CellDims, ClusterDepth >::CellIndex_t

The index type used for line set indices.

This is a 32 bit unsigned integer because of OpenGL, mostly. OpenGL cannot render 64bit indices, and we want to be able to shuffle the line set indices stored here directly to the graphics card.

Member Function Documentation

◆ ClusterSkeletonID()

template<int CellDims, int ClusterDepth = 2>
SkeletonID Fiber::CellCluster< CellDims, ClusterDepth >::ClusterSkeletonID ( )
inlinestatic

A Skeleton ID for clusters of cells.

This skeleton bundles the vertices and cells per cluster together. See also the ID() function.

Referenced by CellCluster(), and ID().

◆ operator=()

template<int CellDims, int ClusterDepth = 2>
bool Fiber::CellCluster< CellDims, ClusterDepth >::operator= ( const WeakPtr< Grid > & G)

Assign from Grid pointer, will overwrite all members.

Will inspect the new Grid object for comformance to the LineSet properties.