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

Revision 39b13612ebd645a65eda854771b517371f2f858a authored by ennetws on 13 March 2015, 18:17:18 UTC, committed by ennetws on 13 March 2015, 18:17:18 UTC
Create README.md
1 parent c702819
  • Files
  • Changes
  • adfc2e5
  • /
  • Reconstruction
  • /
  • poissonrecon.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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:39b13612ebd645a65eda854771b517371f2f858a
directory badge
swh:1:dir:7edf6bef82919ad81008be6756fa167968416c2f
content badge
swh:1:cnt:f0546df170f51d145025a0e2cb5947da7294a20c

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.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
poissonrecon.h
#pragma once
#include <vector>

#include <QString>
#include <QStringList>

#ifdef WIN32
namespace std{  static inline bool isnan(double x){ return _isnan(x); } }
#else
#include <cmath>
#endif


struct SimpleMesh{
	std::vector< std::vector<float> > vertices;
	std::vector< std::vector<int> > faces;
};

class PoissonRecon
{
public:
    static char** convertArguments(QStringList args);

    //static void makeFromCloudFile(QString filename, QString out_filename, int depth = 7);
	static void makeFileFromCloud( std::vector< std::vector<float> > p, std::vector< std::vector<float> > n, QString out_filename, int depth = 7);
	static void makeFromCloud(std::vector< std::vector<float> > p, std::vector< std::vector<float> > n, SimpleMesh & mesh, int depth = 7);

	static void writeOBJ(QString out_filename, std::vector< std::vector<float> > & mesh_verts, std::vector< std::vector<int> > & mesh_faces);
};

// Helper functions
template<typename Vector3>
static inline std::vector< std::vector<float> > pointCloudf( std::vector<Vector3> points ){
	std::vector< std::vector<float> > cloud(points.size(), std::vector<float>(3,0));
	for(int i = 0; i < (int)points.size(); i++)
	{
        if( std::isnan(cloud[i][0]) || std::isnan(cloud[i][1]) || std::isnan(cloud[i][2]) ) continue;

		cloud[i][0] = points[i][0];
		cloud[i][1] = points[i][1];
		cloud[i][2] = points[i][2];
	}
	return cloud;
}
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

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