-
Notifications
You must be signed in to change notification settings - Fork 1
/
Mesh.h
35 lines (26 loc) · 873 Bytes
/
Mesh.h
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
// Mesh.h: interface for the CMesh class.
//
//////////////////////////////////////////////////////////////////////
# ifndef _MESH_H
# define _MESH_H
# include "Shape.h"
# include "Triangle.h"
class CMesh : public CShape
{
public:
CMesh (CPoint3D pos, CColor col, CPoint3D *pptVertices, CVector *pvecNormals, unsigned int *ppiFaces[3], int iVertexCount, int iFaceCount);
CMesh (CPoint3D pos, CColor col, CPoint3D *pptVertices, unsigned int ppiFaces[][3], int iVertexCount, int iFaceCount);
CMesh (CMesh &mesh1);
// Object interface
CIntersectionInfo GetIntersection (CRay ray);
CVector GetNormalAt (CPoint3D pt);
CColor ShadePoint (CIntersectionInfo hitInfo);
CTexCoords GetTexCoords (CPoint3D ptOfIntersection);
// Destruction
virtual ~CMesh();
protected:
NORMAL_MODE m_eNormalMode;
CTriangle *m_pTriangles;
int m_iTriangleCount;
};
# endif