source: golgotha/src/maxtool/sdk_inc/vedge.h @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 12 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
  • Property svn:keywords set to Id
File size: 650 bytes
Line 
1#ifndef VEDGE_H_DEFINED
2#define  VEDGE_H_DEFINED
3
4class VEdge {
5        DWORD f[2];
6        public:
7                void SetFace(int i, DWORD n) { f[i] =(f[i]&0xc0000000)|n;}
8                void SetWhichSide(int i, int s) { f[i] =(f[i]&0x3FFFFFFF)|((s&3)<<30); }
9                DWORD GetFace(int i){ return f[i]&0x3fffffff; }
10                int GetWhichSide(int i) { return (f[i]>>30)&3; }
11        };
12
13typedef struct {
14        unsigned short flags;
15        DWORD v[2];  /* indices of two vertices defining edge */
16        DWORD f[2];  /* indices of two neighboring faces  */
17        } Edge;
18
19
20// Moved from VEDGE.CPP -TH
21#define UNDEF 0xFFFFFFFF
22#define UNDEF_FACE 0x3FFFFFFF
23
24#endif //  VEDGE_H_DEFINED
Note: See TracBrowser for help on using the repository browser.