-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathstlFile.h
executable file
·61 lines (45 loc) · 1.12 KB
/
stlFile.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright(c) 2005-2006. All Rights Reserved
// By Jean-René Bédard (https://github.com/jrbedard/3d-converter)
#ifndef __STLFILE_H__
#define __STLFILE_H__
#include "file.h"
namespace ZBPlugin
{
// CStlFile: STL file format
class CStlFile : public CFile
{
public:
CStlFile(){};
~CStlFile(){};
// STL object
class CSolid
{
public:
CSolid(const std::string& solidName);
~CSolid();
// STL object face
class CFacet
{
public:
CFacet();
~CFacet();
Vector3D m_normal;
Vector3DVector m_vertices;
};
typedef std::vector< CFacet > FacetVector;
public:
inline const std::string GetSolidName() {return m_solidName;}
inline FacetVector& GetFacetVector() {return m_facets;}
inline CFacet& GetCurrentFacet() {return m_facets.back();}
private:
std::string m_solidName;
FacetVector m_facets;
};
typedef std::vector< CSolid > SolidVector;
inline SolidVector& GetSolidVector() {return m_solids;}
inline CSolid& GetCurrentSolid() {return m_solids.back();}
private:
SolidVector m_solids;
};
} // End ZBPlugin namespace
#endif // __STLFILE_H__