46 void ReadMFile(
const string& filename);
47 void ReadFile(
const string& filename);
48 void ReadObjFile(
const string& filename);
49 void ReadOffFile(
const string& filename);
50 void ComputeScaleAndNormals();
52 virtual void LoadModel();
53 int GetVertexID(
const CPoint3D& pt)
const;
54 void SaveMFile(
const string& filename)
const;
55 void SaveOffFile(
const string& filename)
const;
56 void SaveObjFile(
const string& filename)
const;
57 void SaveScalarFieldObjFile(
const vector<double>& vals,
const string& filename)
const;
58 void SaveScalarFieldObjFile(
const vector<double>& vals,
double maxV,
const string& filename)
const;
59 void SaveScalarFieldObjFile(
const vector<double>& vals,
const string& comments,
const string& filename)
const;
60 void SavePamametrizationObjFile(
const vector<pair<double, double>>& uvs,
const string& filename)
const;
61 static vector<double> GetScalarField(
string filename);
62 static string GetComments(
const char* filename);
63 virtual void PrintInfo(ostream& out)
const;
65 inline int GetNumOfVerts()
const;
66 inline int GetNumOfFaces()
const;
67 string GetFileShortName()
const;
68 string GetFileShortNameWithoutExtension()
const;
69 string GetFileFullName()
const;
70 inline const CPoint3D& Vert(
int vertIndex)
const;
71 inline const CPoint3D& Normal(
int vertIndex)
const;
72 inline const CFace& Face(
int faceIndex)
const;
73 CPoint3D GetShiftVertex(
int indexOfVert)
const;
76 void SetFaces(
const vector<CBaseModel::CFace>& faces);
77 const vector<CBaseModel::CFace>& GetFaces()
const;
82 return (
int)m_Verts.size();
87 return (
int)m_Faces.size();
92 return m_Verts[vertIndex];
97 return m_NormalsToVerts[vertIndex];
102 return m_Faces[faceIndex];
vector< CPoint3D > m_Verts
int GetNumOfFaces() const
CFace(int x, int y, int z)
int operator[](int index) const
const CPoint3D & Normal(int vertIndex) const
int GetNumOfVerts() const
const CPoint3D & Vert(int vertIndex) const
vector< CPoint3D > m_NormalsToVerts
const CFace & Face(int faceIndex) const
set< int > m_UselessFaces
int & operator[](int index)