Пример #1
0
void Mesh::read(std::istream& is, const char* fileExtension) {
  bool loaded=false;
  if(!strcmp(fileExtension, "obj")) { readObjFile(is); loaded=true; }
  if(!strcmp(fileExtension, "off")) { readOffFile(is); loaded=true; }
  if(!strcmp(fileExtension, "ply")) { readPlyFile(is); loaded=true; }
  if(!strcmp(fileExtension, "tri")) { readTriFile(is); loaded=true; }
  if(!strcmp(fileExtension, "stl")) { readStlFile(is); loaded=true; }
  if(!loaded) HALT("can't read fileExtension '" <<fileExtension <<"'");
}
Пример #2
0
PlyObject::PlyObject(QString filename)
    :m_filename(filename)
{
    readPlyFile();
}