namespace X3DTK {
namespace MESH {

template<class MData, class VData, class EData, class FData, bool RW>
TemplateMeshInfo<MData, VData, EData, FData, RW>::TemplateMeshInfo()
: _nFaces(0), _nEdges(0), _nInstances(0)
{
}

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

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateMeshInfo<MData, VData, EData, FData, RW>::init()
{
  _nFaces = 0;
  _nEdges = 0;
  _nInstances = 0;
}

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateMeshInfo<MData, VData, EData, FData, RW>::addFaces(unsigned int faces)
{
  _nFaces += faces;
}

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateMeshInfo<MData, VData, EData, FData, RW>::addEdges(unsigned int edges)
{
  _nEdges += edges;
}

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateMeshInfo<MData, VData, EData, FData, RW>::setInstances(unsigned int instances)
{
  _nInstances = instances;
}

template<class MData, class VData, class EData, class FData, bool RW>
unsigned int TemplateMeshInfo<MData, VData, EData, FData, RW>::getFaces() const
{
  return _nFaces;
}

template<class MData, class VData, class EData, class FData, bool RW>
unsigned int TemplateMeshInfo<MData, VData, EData, FData, RW>::getEdges() const
{
  return _nEdges;
}

template<class MData, class VData, class EData, class FData, bool RW>
unsigned int TemplateMeshInfo<MData, VData, EData, FData, RW>::getInstances() const
{
  return _nInstances;
}

template<class MData, class VData, class EData, class FData, bool RW>
TemplateVertexInfo<MData, VData, EData, FData, RW>::TemplateVertexInfo()
: _nVertices(0), _nInstances(0)
{
}

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

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateVertexInfo<MData, VData, EData, FData, RW>::init()
{
  _nVertices = 0;
  _nInstances = 0;
}

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateVertexInfo<MData, VData, EData, FData, RW>::addVertices(unsigned int vertices)
{
  _nVertices += vertices;
}

template<class MData, class VData, class EData, class FData, bool RW>
void TemplateVertexInfo<MData, VData, EData, FData, RW>::setInstances(unsigned int instances)
{
  _nInstances = instances;
}

template<class MData, class VData, class EData, class FData, bool RW>
unsigned int TemplateVertexInfo<MData, VData, EData, FData, RW>::getVertices() const
{
  return _nVertices;
}

template<class MData, class VData, class EData, class FData, bool RW>
unsigned int TemplateVertexInfo<MData, VData, EData, FData, RW>::getInstances() const
{
  return _nInstances;
}


}
}
