/usr/include/libwildmagic/Wm5EllipsoidGeodesic.h is in libwildmagic-dev 5.13-1ubuntu3.
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 | // 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.1 (2010/10/01)
#ifndef WM5ELLIPSOIDGEODESIC_H
#define WM5ELLIPSOIDGEODESIC_H
#include "Wm5MathematicsLIB.h"
#include "Wm5RiemannianGeodesic.h"
#include "Wm5Vector3.h"
namespace Wm5
{
template <typename Real>
class WM5_MATHEMATICS_ITEM EllipsoidGeodesic : public RiemannianGeodesic<Real>
{
public:
// The ellipsoid is (x/a)^2 + (y/b)^2 + (z/c)^2 = 1, where xExtent is
// 'a', yExtent is 'b', and zExtent is 'c'. The surface is represented
// parametrically by angles u and v, say P(u,v) = (x(u,v),y(u,v),z(u,v)),
// P(u,v) =(a*cos(u)*sin(v), b*sin(u)*sin(v), c*cos(v))
// with 0 <= u < 2*pi and 0 <= v <= pi. The first-order derivatives are
// dP/du = (-a*sin(u)*sin(v), b*cos(u)*sin(v), 0)
// dP/dv = (a*cos(u)*cos(v), b*sin(u)*cos(v), -c*sin(v))
// The metric tensor elements are
// g_{00} = Dot(dP/du,dP/du)
// g_{01} = Dot(dP/du,dP/dv)
// g_{10} = g_{01}
// g_{11} = Dot(dP/dv,dP/dv)
EllipsoidGeodesic (Real xExtent, Real yExtent, Real zExtent);
virtual ~EllipsoidGeodesic ();
Vector3<Real> ComputePosition (const GVector<Real>& point);
virtual void ComputeMetric (const GVector<Real>& point);
virtual void ComputeChristoffel1 (const GVector<Real>& point);
// To compute the geodesic path connecting two parameter points (u0,v0)
// and (u1,v1):
//
// float a, b, c; // the extents of the ellipsoid
// EllipsoidGeodesic<float> EG(a,b,c);
// GVectorf Param0(2), Param1(2);
// Param0[0] = u0;
// Param0[1] = v0;
// Param1[0] = u1;
// Param1[1] = v1;
//
// int quantity;
// GVectorf* path;
// EG.ComputeGeodesic(Param0, Param1, quantity, path);
private:
using RiemannianGeodesic<Real>::mMetric;
using RiemannianGeodesic<Real>::mChristoffel1;
Real mXExtent, mYExtent, mZExtent;
};
typedef EllipsoidGeodesic<float> EllipsoidGeodesicf;
typedef EllipsoidGeodesic<double> EllipsoidGeodesicd;
}
#endif
|