This file is indexed.

/usr/include/libwildmagic/Wm5Distance.h is in libwildmagic-dev 5.13-1+b2.

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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// 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 WM5DISTANCE_H
#define WM5DISTANCE_H

#include "Wm5MathematicsLIB.h"
#include "Wm5Vector2.h"
#include "Wm5Vector3.h"

namespace Wm5
{

template <typename Real, typename TVector>
class WM5_MATHEMATICS_ITEM Distance
{
public:
    // Abstract base class.
    virtual ~Distance ();

    // Static distance queries.
    virtual Real Get () = 0;     // distance
    virtual Real GetSquared () = 0;  // squared distance

    // Function calculations for dynamic distance queries.
    virtual Real Get (Real t, const TVector& velocity0,
        const TVector& velocity1) = 0;
    virtual Real GetSquared (Real fT, const TVector& velocity0,
        const TVector& velocity1) = 0;

    // Derivative calculations for dynamic distance queries.  The defaults
    // use finite difference estimates
    //   f'(t) = (f(t+h)-f(t-h))/(2*h)
    // where h = DifferenceStep.  A derived class may override these and
    // provide implementations of exact formulas that do not require h.
    virtual Real GetDerivative (Real t, const TVector& velocity0,
        const TVector& velocity1);
    virtual Real GetDerivativeSquared (Real t, const TVector& velocity0,
        const TVector& velocity1);

    // Dynamic distance queries.  The function computes the smallest distance
    // between the two objects over the time interval [tmin,tmax].
    virtual Real Get (Real tmin, Real tmax, const TVector& velocity0,
        const TVector& relocity1);
    virtual Real GetSquared (Real fTMin, Real fTMax,
        const TVector& velocity0, const TVector& velocity1);

    // For Newton's method and inverse parabolic interpolation.
    int MaximumIterations;  // default = 8
    Real ZeroThreshold;     // default = Math<Real>::ZERO_TOLERANCE

    // For derivative approximations.
    void SetDifferenceStep (Real differenceStep);  // default = 1e-03
    Real GetDifferenceStep () const;

    // The time at which minimum distance occurs for the dynamic queries.
    Real GetContactTime () const;

    // Closest points on the two objects.  These are valid for static or
    // dynamic queries.  The set of closest points on a single object need
    // not be a single point.  In this case, the Boolean member functions
    // return 'true'.  A derived class may support querying for the full
    // contact set.
    const TVector& GetClosestPoint0 () const;
    const TVector& GetClosestPoint1 () const;
    bool HasMultipleClosestPoints0 () const;
    bool HasMultipleClosestPoints1 () const;

protected:
    Distance ();

    Real mContactTime;
    TVector mClosestPoint0;
    TVector mClosestPoint1;
    bool mHasMultipleClosestPoints0;
    bool mHasMultipleClosestPoints1;
    Real mDifferenceStep, mInvTwoDifferenceStep;
};

typedef Distance<float,Vector2f> Distance2f;
typedef Distance<float,Vector3f> Distance3f;
typedef Distance<double,Vector2d> Distance2d;
typedef Distance<double,Vector3d> Distance3d;

}

#endif