This file is indexed.

/usr/include/oce/BVH_DistanceField.hxx is in liboce-foundation-dev 0.18.2-2build1.

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
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// Created on: 2014-09-06
// Created by: Denis BOGOLEPOV
// Copyright (c) 2013-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

#ifndef _BVH_DistanceField_Header
#define _BVH_DistanceField_Header

#include <BVH_Geometry.hxx>

template<class T, int N> class BVH_ParallelDistanceFieldBuilder;

//! Tool object for building 3D distance field from the set of BVH triangulations.
//! Distance field is a scalar field that measures the distance from a given point
//! to some object, including optional information about the inside and outside of
//! the structure. Distance fields are used as alternative surface representations
//! (like polygons or NURBS).
template<class T, int N>
class BVH_DistanceField
{
  friend class BVH_ParallelDistanceFieldBuilder<T, N>;

public:

  typedef typename BVH::VectorType<T, N>::Type BVH_VecNt;

public:

  //! Creates empty 3D distance field.
  BVH_DistanceField (const Standard_Integer theMaximumSize,
                     const Standard_Boolean theComputeSign);

  //! Releases resources of 3D distance field.
  virtual ~BVH_DistanceField();

  //! Builds 3D distance field from BVH geometry.
  Standard_Boolean Build (BVH_Geometry<T, N>& theGeometry);

public:

  //! Returns packed voxel data.
  const T* PackedData() const
  {
    return myVoxelData;
  }

  //! Returns distance value for the given voxel.
  T& Voxel (const Standard_Integer theX,
            const Standard_Integer theY,
            const Standard_Integer theZ)
  {
    return myVoxelData[theX + (theY + theZ * myDimensionY) * myDimensionX];
  }

  //! Returns distance value for the given voxel.
  T Voxel (const Standard_Integer theX,
           const Standard_Integer theY,
           const Standard_Integer theZ) const
  {
    return myVoxelData[theX + (theY + theZ * myDimensionY) * myDimensionX];
  }

  //! Returns size of voxel grid in X dimension.
  Standard_Integer DimensionX() const
  {
    return myDimensionX;
  }

  //! Returns size of voxel grid in Y dimension.
  Standard_Integer DimensionY() const
  {
    return myDimensionY;
  }

  //! Returns size of voxel grid in Z dimension.
  Standard_Integer DimensionZ() const
  {
    return myDimensionZ;
  }

  //! Returns size of single voxel.
  const BVH_VecNt& VoxelSize() const
  {
    return myVoxelSize;
  }

  //! Returns minimum corner of voxel grid.
  const BVH_VecNt& CornerMin() const
  {
    return myCornerMin;
  }

  //! Returns maximum corner of voxel grid.
  const BVH_VecNt& CornerMax() const
  {
    return myCornerMax;
  }

protected:

  //! Performs building of distance field for the given Z slices.
  void BuildSlices (BVH_Geometry<T, N>& theGeometry,
    const Standard_Integer theStartZ, const Standard_Integer theFinalZ);

protected:

  //! Array of voxels.
  T* myVoxelData;

  //! Size of single voxel.
  BVH_VecNt myVoxelSize;

  //! Minimum corner of voxel grid.
  BVH_VecNt myCornerMin;

  //! Maximum corner of voxel grid.
  BVH_VecNt myCornerMax;

  //! Size of voxel grid in X dimension.
  Standard_Integer myDimensionX;

  //! Size of voxel grid in Y dimension.
  Standard_Integer myDimensionY;

  //! Size of voxel grid in Z dimension.
  Standard_Integer myDimensionZ;

  //! Size of voxel grid in maximum dimension.
  Standard_Integer myMaximumSize;

  //! Enables/disables signing of distance field.
  Standard_Boolean myComputeSign;

};

#include <BVH_DistanceField.lxx>

#endif // _BVH_DistanceField_Header