Skip to content
Snippets Groups Projects
map_iso_spec.hh 540.93 KiB
//------------------------------------------------------------------------------
// This file is part of the OpenStructure project <www.openstructure.org>
//
// Copyright (C) 2008-2011 by the OpenStructure authors
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License as published by the Free
// Software Foundation; either version 3.0 of the License, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
// details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this library; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
//------------------------------------------------------------------------------

// automatically generated by generate_map_iso_spec.py
// do not edit directly

#include "map_iso_gen.hh"

namespace ost { namespace gfx { namespace map_iso {

template<int N>
void AddLinesAndFaces(IndexedVertexArray& va, // vertex array
		      unsigned int vertex_id[12] // this list of vertex ids
		      );

template<> 
void AddLinesAndFaces<0>(IndexedVertexArray& va,unsigned int vertex_id[12] )
{
}

template<> 
void AddLinesAndFaces<1>(IndexedVertexArray& va,unsigned int vertex_id[12] )
{
  va.AddLine(vertex_id[3],vertex_id[0]);
  va.AddLine(vertex_id[4],vertex_id[0]);
  va.AddLine(vertex_id[4],vertex_id[3]);
  va.AddTriN(vertex_id[3],vertex_id[4],vertex_id[0]);

#ifdef MAP_ISO_DEBUG
  if(vertex_id[3]==0) std::cerr << "ISO_DEBUG: " << 3 << " " << 1 << std::endl;
  if(vertex_id[4]==0) std::cerr << "ISO_DEBUG: " << 4 << " " << 1 << std::endl;
  if(vertex_id[0]==0) std::cerr << "ISO_DEBUG: " << 0 << " " << 1 << std::endl;
#endif
}

template<> 
void AddLinesAndFaces<2>(IndexedVertexArray& va,unsigned int vertex_id[12] )
{
  va.AddLine(vertex_id[1],vertex_id[0]);
  va.AddLine(vertex_id[5],vertex_id[0]);
  va.AddLine(vertex_id[5],vertex_id[1]);
  va.AddTriN(vertex_id[5],vertex_id[1],vertex_id[0]);

#ifdef MAP_ISO_DEBUG
  if(vertex_id[5]==0) std::cerr << "ISO_DEBUG: " << 5 << " " << 2 << std::endl;
  if(vertex_id[1]==0) std::cerr << "ISO_DEBUG: " << 1 << " " << 2 << std::endl;
  if(vertex_id[0]==0) std::cerr << "ISO_DEBUG: " << 0 << " " << 2 << std::endl;
#endif
}

template<> 
void AddLinesAndFaces<3>(IndexedVertexArray& va,unsigned int vertex_id[12] )
{
  va.AddLine(vertex_id[3],vertex_id[1]);