File: edgetable.C

package info (click to toggle)
battleball 2.0-13
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,016 kB
  • ctags: 3,097
  • sloc: cpp: 15,310; makefile: 48; csh: 34
file content (33 lines) | stat: -rw-r--r-- 886 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (c) 1997 Philip A. Hardin (pahardin@cs.utexas.edu)
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License v2 or later.


#include "edgetable.h"


/************************************************************************/
//edgeTable::edgeTable(const edgeTable& t)	// copy constructor
//: table<edge>(t)
//{}


void edgeTable::AddPanel(const panel3d& panel) {
  bool	found;
  edge	e;

  forii(panel.ptNums.num -1)
  { found= 0;
    forij(num)
      if (((*this)[j].beginPtNum == panel.ptNums[i] and
           (*this)[j].endPtNum   == panel.ptNums[i+1]) or
          ((*this)[j].endPtNum   == panel.ptNums[i] and
           (*this)[j].beginPtNum == panel.ptNums[i+1])) found= 1;
    if (not found)
    { e.beginPtNum= panel.ptNums[i];
      e.endPtNum  = panel.ptNums[i+1];
      Add(e);
    }
  }
}