/usr/include/libwildmagic/Wm5Polyhedron3.h is in libwildmagic-dev 5.13-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | // Geometric Tools, LLC
// Copyright (c) 1998-2014
// Distributed under the Boost Software License, Version 1.0.
// http://www.boost.org/LICENSE_1_0.txt
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
//
// File Version: 5.0.0 (2010/01/01)
#ifndef WM5POLYHEDRON3_H
#define WM5POLYHEDRON3_H
#include "Wm5MathematicsLIB.h"
#include "Wm5Vector3.h"
#include "Wm5SmartPointer.h"
namespace Wm5
{
template <typename Real>
class Polyhedron3
{
public:
// Construction and destruction. The caller is responsible for ensuring
// that the mesh represents a simple polyhedron (2-manifold with the
// topology of a sphere, non-self-intersecting). The triangular faces
// must be orderd counterclockwise when viewed from outside the mesh.
//
// Polyhedron3 objects typically share data from other sources. The class
// uses smart pointers (Pointer1) to share the input arrays. If you
// do not want the class to delete the arrays, use your own smart pointers
// for the arrays.
Polyhedron3 (int numVertices, Vector3<Real>* vertices, int numTriangles,
int* indices);
Polyhedron3 (const Polyhedron3& polyhedron);
virtual ~Polyhedron3 ();
// Assignment.
Polyhedron3& operator= (const Polyhedron3& polyhedron);
// Read-only member access.
int GetNumVertices () const;
const Vector3<Real>* GetVertices () const;
const Vector3<Real>& GetVertex (int i) const;
int GetNumTriangles () const;
int GetNumIndices () const; // = 3*numTriangles
const int* GetIndices () const;
const int* GetTriangle (int i) const;
// Allow vertex modification. The caller must ensure that the polyhedron
// remains simple.
virtual void SetVertex (int i, const Vector3<Real>& vertex);
// Compute various information about the polyhedron.
Vector3<Real> ComputeVertexAverage () const;
Real ComputeSurfaceArea () const;
Real ComputeVolume () const;
protected:
int mNumVertices;
Pointer1<Vector3<Real> > mVertices;
int mNumTriangles;
int mNumIndices;
Pointer1<int> mIndices;
};
#include "Wm5Polyhedron3.inl"
typedef Polyhedron3<float> Polyhedron3f;
typedef Polyhedron3<double> Polyhedron3d;
}
#endif
|