This file is indexed.

/usr/include/gmsh/SOrientedBoundingBox.h is in libgmsh-dev 2.8.5+dfsg-1.1+b1.

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
// Gmsh - Copyright (C) 1997-2014 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
//
// Contributor(s):
//   Bastien Gorissen
//

#ifndef _ORIENTED_BOUNDING_BOX_H_
#define _ORIENTED_BOUNDING_BOX_H_

#include <vector>
#include <list>
#include "SVector3.h"
#include "SPoint2.h"
#include "Pair.h"

class SOrientedBoundingRectangle {
 public:
  std::vector<double> *center;
  std::vector<double> *size;
  std::vector<double> *axisX;
  std::vector<double> *axisY;
  SOrientedBoundingRectangle();
  ~SOrientedBoundingRectangle();
  double area();
};

class SOrientedBoundingBox {
 private:
  SVector3 center;
  SVector3 size;
  SVector3 axisX;
  SVector3 axisY;
  SVector3 axisZ;

 public:
  double p1x, p1y, p1z;
  double p2x, p2y, p2z;
  double p3x, p3y, p3z;
  double p4x, p4y, p4z;
  double p5x, p5y, p5z;
  double p6x, p6y, p6z;
  double p7x, p7y, p7z;
  double p8x, p8y, p8z;
  SOrientedBoundingBox();

  // x, y, z are the box center, whereas the sizes are in the local
  // axis system of the box. The axis form the local coordinates
  // system of the box. All these data are given in the local
  // coordinates system of the object.
  SOrientedBoundingBox(SVector3& center, double sizeX, double sizeY, 
                       double sizeZ, const SVector3 &axisX, 
                       const SVector3 &axisY, const SVector3 &axisZ);

  SOrientedBoundingBox(SOrientedBoundingBox* other);
  ~SOrientedBoundingBox(){}

  SVector3 getCenter(){ return center; }
  const SVector3 &getCenter() const{ return center; }
  double getCenterX(){ return center[0]; }
  double getCenterY(){ return center[1]; }
  double getCenterZ(){ return center[2]; }
  SVector3 getSize(){ return size; }
  double getMaxSize();
  double getMinSize();

  // valid values for axis are 0 (X-axis), 1 (Y-axis) or 2 (Z-axis)
  SVector3 getAxis(int axis);
  
  static SOrientedBoundingBox* buildOBB(std::vector<SPoint3> vertices);
  
  bool intersects(SOrientedBoundingBox &obb);
  
  static double compare(SOrientedBoundingBox &obb1, SOrientedBoundingBox &obb2);
};

#endif