Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • ffd0861
  • /
  • readers.h
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:d115be322b2410361c97a47df750a372ec843873
directory badge
swh:1:dir:ffd086171f1b0b5cf0c80beb89acae77e3b32bb5

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
readers.h
#ifndef READERS_H
#define READERS_H


#include<vector>
#include<string>
using namespace std;

bool readOffFile(string filename,vector<double>&vertices,vector<unsigned int>&faces2vertices);


bool writeOffFile(string filename,const vector<double>&vertices,const vector<unsigned int>&faces2vertices);

bool writePLYFile(string filename, const vector<double>&vertices, const vector<unsigned int>&faces2vertices,
                  const vector<double> &vertices_normal, const vector<unsigned char>&vertices_color);

bool writePLYFile_VF(string filename,const vector<double>&vertices,const vector<unsigned int>&faces2vertices);
bool writePLYFile_VN(string filename,const vector<double>&vertices, const vector<double>&vertices_normal);

bool readPLYFile(string filename,  vector<double>&vertices, vector<double> &vertices_normal);

bool readObjFile(string filename, vector<double>&vertices, vector<unsigned int>&faces2vertices, vector<double> &vertices_normal);
bool readObjFile_Line(string filename,vector<double>&vertices,vector<unsigned int>&edges2vertices);

bool writeObjFile(string filename,const vector<double>&vertices,const vector<unsigned int>&faces2vertices);
bool writeObjFile_line(string filename,const vector<double>&vertices,const vector<unsigned int>&edge2vertices);
bool writeObjFile_vn(string filename,const vector<double>&vertices,const vector<double>&vn);


bool readSurfFile(string filename,vector<double>&vertices,vector<unsigned int>&faces2vertices,vector<double>&vertices_field);

bool writeSurfFile(string filename,const vector<double>&vertices,const vector<unsigned int>&faces2vertices,const vector<double>&vertices_field);


bool readCurfFile(string filename, vector<double>&vertices, vector<unsigned int>&edges2vertices, vector<double>&vertices_field, vector<double> &vertices_tangent);


bool writeCurfFile(string filename, const vector<double>&vertices, const vector<unsigned int>&edges2vertices, vector<double>&vertices_field , vector<double> &vertices_tangent);


bool readVolfFile(string filename, vector<double>&vertices, vector<unsigned int>&tets2vertices, vector<double> &vertices_normal, vector<double> &vertices_field);


bool writeVolfFile(string filename, const vector<double>&vertices, const vector<unsigned int>&tets2vertices, vector<double> &vertices_normal, vector<double> &vertices_field);

bool readContourEdgeTxtFile(string filename, vector<int>&edges2vertices);
bool writeContourEdgeTxtFile(string filename, const vector<unsigned int>&edges2vertices);



bool writeVecFile(string filename, const vector<int>&vec);
bool readVecFile(string filename,vector<int>&vec);



bool readVVecFile(string filename, vector<vector<int>> &vvec);
bool writeVVecFile(string filename, const vector<vector<int>> &vvec);

bool writeVecFile(string filename, const vector<float>&vec);
bool readVecFile(string filename,vector<float>&vec);


bool readVecFile(string filename,vector<double>&vec);

bool readVVecFile(string filename, vector<vector<double>> &vvec);
bool writeVVecFile(string filename, const vector<vector<double>> &vvec);

bool writeSufFile(string filename, const vector<double>&vertices, const vector<unsigned int>&faces2vertices, const vector<int>&facesMat, const vector<int> &CtrEdges);
bool writeCtrGraphFile(string filename, const vector<float> &vertices, const vector<vector<int>>&edge2vertices, const vector<vector<int>>&edgeMat, const vector<vector<float>>&planepara);

bool writeCurNetFile(string filename, const vector<double> &vertices, const vector<vector<int>>&edge2vertices, const vector<vector<int>>&edgeMat, const vector<vector<double>>&planepara, const vector<double>&verticesNor);

bool readXYZ(string filename, vector<double>&v);
bool readXYZnormal(string filename, vector<double>&v, vector<double>&vn);
bool writeXYZ(string filename, vector<double>&v);
bool writeXYZnormal(string filename, vector<double>&v, vector<double>&vn);

#endif // READERS_H

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API