This file is indexed.

/usr/include/tulip/GlQuadTreeLODCalculator.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
/*
 *
 * 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_QLQUADTREELODCALCULATOR_H
#define Tulip_QLQUADTREELODCALCULATOR_H

#include <map>
#include <vector>

#include <tulip/GlCPULODCalculator.h>
#include <tulip/Observable.h>
#include <tulip/GlGraphRenderingParameters.h>

namespace tlp {

class Camera;
template <class TYPE> class QuadTreeNode;
class GlScene;
class PropertyInterface;
class Graph;
class GlLayer;

/**
 * Class use to compute bounding boxs of a vector of GlEntity
 */
class TLP_GL_SCOPE GlQuadTreeLODCalculator : public GlCPULODCalculator, private Observable {

public:

  GlQuadTreeLODCalculator();
  ~GlQuadTreeLODCalculator();

  /**
   * Set the SlScene used by this calculator
   */
  void setScene(GlScene &scene);

  /**
   * To know if the calculator need to have entities returned by a visitor in GlScene
   */
  bool needEntities();
  /**
   * Set if the calculator need to have entities
   */
  void setNeedEntities(bool);

  /**
   * This function is call by GlLODSceneVisitor when a simple entitie is found
   */
  void addSimpleEntityBoundingBox(GlSimpleEntity * entity,const BoundingBox& bb);
  /**
   * This function is call by GlLODSceneVisitor when a node is found
   */
  void addNodeBoundingBox(unsigned int id,const BoundingBox& bb);
  /**
   * This function is call by GlLODSceneVisitor when an edge is found
   */
  void addEdgeBoundingBox(unsigned int id,const BoundingBox& bb);

  /**
   * This function compute LOD
   * See compute function of GlCPULODCalculator for more details
   * This function do some computation and after call computeFor2DCamera() or computeFor3DCamera()
   */
  void compute(const Vector<int,4>& globalViewport,const Vector<int,4>& currentViewport);

  /**
   * Specific function to compute LOD for 3D cameras
   */
  void computeFor3DCamera(LayerLODUnit *layerLODUnit,const Coord &eye,
                          const Matrix<float, 4> transformMatrix,
                          const Vector<int,4>& globalViewport,
                          const Vector<int,4>& currentViewport);

  /**
   * Change the input data used by this LOD calculator
   */
  void setInputData(const GlGraphInputData *newInputData);

  /**
   * Clone the calculator
   */
  virtual GlLODCalculator *clone() {
    GlQuadTreeLODCalculator *newCalculator=new GlQuadTreeLODCalculator();
    newCalculator->setScene(*glScene);
    newCalculator->setInputData(inputData);
    return newCalculator;
  }

protected :

  void update(PropertyInterface *property);
  void treatEvent(const Event &ev);

  void removeObservers();
  void addObservers();

  void initCamerasObservers();
  void clearCamerasObservers();

  void setHaveToCompute();

  std::vector<QuadTreeNode<unsigned int> *> nodesQuadTree;
  std::vector<QuadTreeNode<unsigned int> *> edgesQuadTree;
  std::vector<QuadTreeNode<GlSimpleEntity *> *> entitiesQuadTree;
  std::vector<std::vector<SimpleEntityLODUnit> > simpleEntities;

  bool haveToCompute;
  bool haveToInitObservers;

  BoundingBox nodesGlobalBoundingBox;
  BoundingBox edgesGlobalBoundingBox;
  BoundingBox entitiesGlobalBoundingBox;

  std::vector<Camera *> cameras;
  std::map<GlLayer*, Camera> layerToCamera;
  Camera *currentCamera;
  Graph *currentGraph;
  PropertyInterface *layoutProperty;
  PropertyInterface *sizeProperty;
  PropertyInterface *selectionProperty;
  GlGraphRenderingParameters oldParameters;

  int quadTreesVectorPosition;
  int simpleEntitiesVectorPosition;
};

}

#endif // Tulip_QTQUADTREELODCALCULATOR_H
///@endcond