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 8c90648f07f68d37b9b0ad0581e44fa069aa758a authored by unlin on 24 October 2019, 15:04:51 UTC, committed by GitHub on 24 October 2019, 15:04:51 UTC
Update Readme.md.
1 parent 401a216
  • Files
  • Changes
  • e393547
  • /
  • src
  • /
  • mymesh.hpp
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:8c90648f07f68d37b9b0ad0581e44fa069aa758a
directory badge
swh:1:dir:4f40dcfc7f5fda95b2685f0a61d5b2bfc3a401b6
content badge
swh:1:cnt:66fb3b7d7132cf4e05b9348ec9bace83ee2d3e5c

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 ...
mymesh.hpp
#ifndef MYMESH_H
#define MYMESH_H

#ifdef _MSC_VER
#define _USE_MATH_DEFINES
#endif

#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>

namespace bwabstraction
{

/**
 * @brief The MyTraits struct defines attributes used by OpenMesh.
 * For OpenMesh 6.
 * Please read http://www.openmesh.org/Documentation/OpenMesh-Doc-Latest/a00020.html
 */
struct MyTraits
{

    // Basic type and percision used by OpenMesh.
    typedef OpenMesh::Vec3d     Point;
    typedef OpenMesh::Vec3d     Normal;
    typedef double              TexCoord1D;
    typedef OpenMesh::Vec2d     TexCoord2D;
    typedef OpenMesh::Vec3d     TexCoord3D;
    typedef short               TextureIndex;
    typedef OpenMesh::Vec3uc    Color;

    // These are macros.
    // Define user-defined data here.
    VertexTraits    {};
    HalfedgeTraits  {};
    EdgeTraits      {};
    FaceTraits      {};

    // These are macros too.
    // Request standard OpenMesh data here.
    VertexAttributes    ( OpenMesh::Attributes::Normal );
    HalfedgeAttributes  ( OpenMesh::Attributes::PrevHalfedge );
    EdgeAttributes      ( 0 );
    FaceAttributes      ( OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status );

};

// Define basic mesh type.
typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits> MyTriMesh;
typedef OpenMesh::PolyMesh_ArrayKernelT<MyTraits> MyPolyMesh;

} // namespace bwabstraction

#endif // MYMESH_H

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