This file is indexed.

/usr/include/tulip/GlLODCalculator.h is in libtulip-dev 4.4.0dfsg2-2.

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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/*
 *
 * This file is part of Tulip (www.tulip-software.org)
 *
 * Authors: David Auber and the Tulip development Team
 * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
 *
 * Tulip is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * Tulip is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 */
///@cond DOXYGEN_HIDDEN

#ifndef Tulip_GLLODCALCULATOR_H
#define Tulip_GLLODCALCULATOR_H
#ifndef DOXYGEN_NOTFOR_DEVEL

#include <tulip/BoundingBox.h>

#include <vector>

namespace tlp {

class Camera;
class GlEntity;
class GlSimpleEntity;
class GlScene;
class GlGraphInputData;

enum RenderingEntitiesFlag {
  RenderingSimpleEntities =1,
  RenderingNodes = 2,
  RenderingEdges = 4,
  RenderingAll = 7,
  RenderingWithoutRemove = 8
};

struct EntityLODUnit {
  EntityLODUnit(const BoundingBox &boundingBox):boundingBox(boundingBox),lod(-1) {}
  BoundingBox boundingBox;
  float lod;
};

// struct to store simple entity lod
struct SimpleEntityLODUnit : public EntityLODUnit {
  SimpleEntityLODUnit(GlSimpleEntity *entity, const BoundingBox &boundingBox):
    EntityLODUnit(boundingBox),
    entity(entity) {
  }
  GlSimpleEntity *entity;
};

// struct to store complex entity (nodes/edges) lod
struct ComplexEntityLODUnit : public EntityLODUnit {
  ComplexEntityLODUnit(unsigned int id,const BoundingBox &boundingBox):EntityLODUnit(boundingBox),id(id) {}
  unsigned int id;
};

struct LayerLODUnit {
  std::vector<SimpleEntityLODUnit>  simpleEntitiesLODVector;
  std::vector<ComplexEntityLODUnit> nodesLODVector;
  std::vector<ComplexEntityLODUnit> edgesLODVector;
  Camera * camera;
};

typedef std::vector<LayerLODUnit> LayersLODVector;

/**
 * Class use to calculate lod of scene entities
 */
class TLP_GL_SCOPE GlLODCalculator {

public:

  GlLODCalculator():glScene(NULL),inputData(NULL),attachedLODCalculator(NULL) {}
  virtual ~GlLODCalculator() {}
  virtual GlLODCalculator *clone()=0;

  /**
   * Set scene use by this LOD calculator
   */
  virtual void setScene(GlScene &scene) {
    glScene=&scene;
  }

  /**
   * Set input data use to render
   */
  virtual void setInputData(const GlGraphInputData *inputData) {
    this->inputData=inputData;
  }

  /**
   * Set RenderingEntitiesFlag to : RenderingSimpleEntities,RenderingNodes,RenderingEdges,RenderingAll,RenderingWithoutRemove
   */
  virtual void setRenderingEntitiesFlag(RenderingEntitiesFlag flag) {
    renderingEntitiesFlag=flag;
  }

  /**
   * Return if the LODCalculator need to have entities to compute
   */
  virtual bool needEntities() {
    return true;
  }
  /**
   * Set if the LODCalculator need to have entities to compute
   */
  virtual void setNeedEntities(bool) {}
  /**
   * Begin a new camera
   */
  virtual void beginNewCamera(Camera* camera)=0;
  /**
   * Record a new simple entity in current camera context
   */
  virtual void addSimpleEntityBoundingBox(GlSimpleEntity *entity,const BoundingBox& bb)=0;
  /**
   * Record a new node in current camera context
   */
  virtual void addNodeBoundingBox(unsigned int id,const BoundingBox& bb)=0;
  /**
   * Record a new edge in current camera context
   */
  virtual void addEdgeBoundingBox(unsigned int id,const BoundingBox& bb)=0;

  /**
   * Reserve memory to store nodes LOD
   */
  virtual void reserveMemoryForNodes(unsigned int) {}

  /**
   * Reserve memory to store edges LOD
   */
  virtual void reserveMemoryForEdges(unsigned int) {}

  /**
   * Compute all lod
   */
  virtual void compute(const Vector<int,4>& globalViewport, const Vector<int,4>& currentViewport)=0;

  /**
   * Return a pointer on LOD result
   */
  LayersLODVector &getResult() {
    return layersLODVector;
  }

  /**
   * Clear class data
   */
  virtual void clear() {
    layersLODVector.clear();
  }

  virtual BoundingBox getSceneBoundingBox()=0;

  void setAttachedLODCalculator(GlLODCalculator *calculator) {
    attachedLODCalculator=calculator;
  }

protected :

  GlScene *glScene;
  const GlGraphInputData *inputData;

  RenderingEntitiesFlag renderingEntitiesFlag;

  LayersLODVector layersLODVector;

  GlLODCalculator *attachedLODCalculator;
};

}

#endif // DOXYGEN_NOTFOR_DEVEL

#endif // Tulip_GLLODCALCULATOR_H
///@endcond