Newer
Older
/***************************************************************************
tnlMeshEntitySeed.h - description
-------------------
begin : Aug 18, 2015
copyright : (C) 2015 by Tomas Oberhuber et al.
email : tomas.oberhuber@fjfi.cvut.cz
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef TNLMESHENTITYSEED_H
#define TNLMESHENTITYSEED_H
#include <mesh/traits/tnlMeshConfigTraits.h>
template< typename MeshConfig >
class tnlMeshConfigTraits;
template< typename MeshConfig,
typename EntityTopology >
class tnlMeshEntitySeed
{
typedef tnlMeshConfigTraits< MeshConfig > MeshConfigTraits;
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
typedef typename tnlMeshConfigTraits< MeshConfig >::template SubentityTraits< EntityTopology, tnlDimensionsTag< 0 > > SubvertexTraits;
public:
typedef typename tnlMeshConfigTraits< MeshConfig >::GlobalIndexType GlobalIndexType;
typedef typename tnlMeshConfigTraits< MeshConfig >::LocalIndexType LocalIndexType;
//typedef typename tnlMeshConfigTraits< MeshConfig >::IdArrayAccessorType IdArrayAccessorType;
typedef typename SubvertexTraits::IdArrayType IdArrayType;
static constexpr LocalIndexType getCornersCount()
{
return SubvertexTraits::Count;
}
void setCornerId( LocalIndexType cornerIndex, GlobalIndexType pointIndex )
{
tnlAssert( 0 <= cornerIndex && cornerIndex < getCornersCount(), cerr << "cornerIndex = " << cornerIndex );
tnlAssert( 0 <= pointIndex, cerr << "pointIndex = " << pointIndex );
this->cornerIds[ cornerIndex ] = pointIndex;
}
IdArrayType& getCornerIds()
{
return this->cornerIds;
}
const IdArrayType& getCornerIds() const
{
return this->cornerIds;
}
private:
IdArrayType cornerIds;
};
#endif /* TNLMESHENTITYSEED_H */