-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFace.h
More file actions
executable file
·43 lines (34 loc) · 890 Bytes
/
Face.h
File metadata and controls
executable file
·43 lines (34 loc) · 890 Bytes
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
34
35
36
37
38
39
40
41
42
43
/*
* Face.h
*
*
* Created by Donald House on 2/18/11.
* Copyright 2011 Clemson University. All rights reserved.
*
*/
#ifndef __FACE__
#define __FACE__
#include "Vector.h"
#include "Group.h"
#include "Material.h"
struct Face{
int nverts, maxverts;
int (*verts)[3];
Vector3d normal;
int group;
int material;
Face(int g = -1, int m = -1);
~Face(){;} // note, verts not destroyed
void setGroup(int g);
void setMaterial(int m);
void addVert(int v, int n = -1, int u = -1);
// added getters for face information
int getFaceVertCnt() { return nverts; }
int getVertNdx(int ndx) { return verts[ndx][0]; }
int getNormNdx(int ndx) { return verts[ndx][1]; }
int getUVNdx(int ndx) { return verts[ndx][2]; }
int getMatNdx() { return material; }
int getGroupId() { return group; }
friend ostream& operator<< (ostream& os, const Face& f);
};
#endif