////////////////////////////////////////////////////////////////////////////////
//                            MESH_SceneGraphTypes.inl                        //
////////////////////////////////////////////////////////////////////////////////

namespace X3DTK {
namespace MESH {

template<class MData, class VData, class EData, class FData, bool RW>
EntityMFTemplateVertex<MData, VData, EData, FData, RW>::EntityMFTemplateVertex() 
: Base()
{
}

template<class MData, class VData, class EData, class FData, bool RW>
MeshMFTemplateVertex<MData, VData, EData, FData, RW>::MeshMFTemplateVertex() 
: Base()
{
}

template<class MData, class VData, class EData, class FData, bool RW>
EntityMFTemplateEdge<MData, VData, EData, FData, RW>::EntityMFTemplateEdge() 
: Base()
{
}

template<class MData, class VData, class EData, class FData, bool RW>
EntityMFTemplateEdge<MData, VData, EData, FData, RW>::EntityMFTemplateEdge(const std::vector<SFTemplateEdge<MData, VData, EData, FData, RW> *> &vector, bool ccw)
: Base(vector)
{
  if (!ccw)
  {
    unsigned int last = vector.size() - 1;
    unsigned int mid = (last + 1)/2;
    for (unsigned int i = 0; i < mid; ++i)
    {
      SFTemplateEdge<MData, VData, EData, FData, RW> *temp = (*this)[i];
      (*this)[i] = (*this)[last - i];
      (*this)[last - i] = temp;
    }
  }  
}

template<class MData, class VData, class EData, class FData, bool RW>
MeshMFTemplateEdge<MData, VData, EData, FData, RW>::MeshMFTemplateEdge() 
: Base()
{
}

template<class MData, class VData, class EData, class FData, bool RW>
EntityMFTemplateFace<MData, VData, EData, FData, RW>::EntityMFTemplateFace() 
: Base() 
{
}

template<class MData, class VData, class EData, class FData, bool RW>
MeshMFTemplateFace<MData, VData, EData, FData, RW>::MeshMFTemplateFace() 
: Base() 
{
}

#ifdef TEMPLATE_SPECIALIZATION_SUPPORTED

template<class MData, class VData, class EData, class FData>
EntityMFTemplateVertex<MData, VData, EData, FData, false>::EntityMFTemplateVertex() 
: Base()
{
}

template<class MData, class VData, class EData, class FData>
MeshMFTemplateVertex<MData, VData, EData, FData, false>::MeshMFTemplateVertex() 
: Base()
{
}

template<class MData, class VData, class EData, class FData>
EntityMFTemplateEdge<MData, VData, EData, FData, false>::EntityMFTemplateEdge() 
: Base() 
{
}

template<class MData, class VData, class EData, class FData>
MeshMFTemplateEdge<MData, VData, EData, FData, false>::MeshMFTemplateEdge() 
: Base() 
{
}

template<class MData, class VData, class EData, class FData>
EntityMFTemplateFace<MData, VData, EData, FData, false>::EntityMFTemplateFace() 
: Base() 
{
}

template<class MData, class VData, class EData, class FData>
MeshMFTemplateFace<MData, VData, EData, FData, false>::MeshMFTemplateFace() 
: Base() 
{
}

#endif

}
}

