This file is indexed.

/usr/include/oce/OpenGl_Structure.hxx is in liboce-visualization-dev 0.15-5.

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
// Created on: 2011-08-01
// Created by: Sergey ZERCHANINOV
// Copyright (c) 2011-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 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 OpenGl_Structure_Header
#define OpenGl_Structure_Header

#include <NCollection_List.hxx>
#include <InterfaceGraphic_Graphic3d.hxx>

#include <OpenGl_AspectLine.hxx>
#include <OpenGl_AspectFace.hxx>
#include <OpenGl_AspectMarker.hxx>
#include <OpenGl_AspectText.hxx>

#include <OpenGl_Group.hxx>
#include <OpenGl_Matrix.hxx>
#include <OpenGl_NamedStatus.hxx>

#include <Graphic3d_SequenceOfHClipPlane.hxx>

class OpenGl_Structure;

typedef NCollection_List<const OpenGl_Structure* > OpenGl_ListOfStructure;

class OpenGl_Structure : public OpenGl_Element
{
  friend class OpenGl_Group;

public:

  OpenGl_Structure();

  void SetTransformation (const float *AMatrix);

  void SetTransformPersistence (const CALL_DEF_TRANSFORM_PERSISTENCE &ATransPers);

  void SetAspectLine   (const CALL_DEF_CONTEXTLINE &theAspect);
  void SetAspectFace   (const CALL_DEF_CONTEXTFILLAREA& theAspect);
  void SetAspectMarker (const CALL_DEF_CONTEXTMARKER& theAspect);
  void SetAspectText   (const CALL_DEF_CONTEXTTEXT &theAspect);

  void SetHighlightBox (const Handle(OpenGl_Context)& theGlCtx,
                        const CALL_DEF_BOUNDBOX& theBoundBox);

  void ClearHighlightBox (const Handle(OpenGl_Context)& theGlCtx);

  void SetHighlightColor (const Handle(OpenGl_Context)& theGlCtx,
                          const Standard_ShortReal R,
                          const Standard_ShortReal G,
                          const Standard_ShortReal B);

  void ClearHighlightColor (const Handle(OpenGl_Context)& theGlCtx);

  void SetNamedStatus (const Standard_Integer aStatus);

  Standard_Boolean IsVisible() const { return !(myNamedStatus & OPENGL_NS_HIDE); }

  void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes) { myClipPlanes = thePlanes; }

  void Connect (const OpenGl_Structure *astructure);
  void Disconnect (const OpenGl_Structure *astructure);

  OpenGl_Group* AddGroup();
  void RemoveGroup (const Handle(OpenGl_Context)& theGlCtx,
                    const OpenGl_Group*           theGroup);
  void Clear (const Handle(OpenGl_Context)& theGlCtx);

  //! Set z layer ID to display the structure in specified layer
  void SetZLayer (const Standard_Integer theLayerIndex);

  //! Get z layer ID
  Standard_Integer GetZLayer () const;

  virtual void Render  (const Handle(OpenGl_Workspace)& theWorkspace) const;
  virtual void Release (const Handle(OpenGl_Context)&   theGlCtx);

  //! This method releases GL resources without actual elements destruction.
  //! As result structure could be correctly destroyed layer without GL context
  //! (after last window was closed for example).
  //!
  //! Notice however that reusage of this structure after calling this method is incorrect
  //! and will lead to broken visualization due to loosed data.
  void ReleaseGlResources (const Handle(OpenGl_Context)& theGlCtx);

  //! Returns list of OpenGL groups.
  const OpenGl_ListOfGroup& Groups() const { return myGroups; }

  //! Returns list of connected OpenGL structures.
  const OpenGl_ListOfStructure& ConnectedStructures() const { return myConnected; }

  //! Returns OpenGL face aspect.
  const OpenGl_AspectFace* AspectFace() const { return myAspectFace; }

  //! Returns OpenGL transformation matrix.
  const OpenGl_Matrix* Transformation() const { return myTransformation; }
  
  //! Returns OpenGL persistent translation.
  const TEL_TRANSFORM_PERSISTENCE* PersistentTranslation() const { return myTransPers; }

#ifdef HAVE_OPENCL

  //! Returns structure modification state (for ray-tracing).
  Standard_Size ModificationState() const { return myModificationState; }

  //! Resets structure modification state (for ray-tracing)
  void ResetModificationState() const { myModificationState = 0; }

  //! Is the structure ray-tracable (contains ray-tracable elements)?
  Standard_Boolean IsRaytracable() const { return myIsRaytracable; }

#endif

protected:

  virtual ~OpenGl_Structure();

#ifdef HAVE_OPENCL

  //! Registers ancestor connected structure (for updating ray-tracing state).
  void RegisterAncestorStructure (const OpenGl_Structure* theStructure) const;

  //! Unregisters ancestor connected structure (for updating ray-tracing state).
  void UnregisterAncestorStructure (const OpenGl_Structure* theStructure) const;

  //! Unregisters structure from ancestor structure (for updating ray-tracing state).
  void UnregisterFromAncestorStructure() const;

  //! Updates modification state for structure and its parents.
  void UpdateStateWithAncestorStructures() const;

  //! Updates ray-tracable status for structure and its parents.
  void UpdateRaytracableWithAncestorStructures() const;

  //! Sets ray-tracable status for structure and its parents.
  void SetRaytracableWithAncestorStructures() const;

#endif

protected:

  //Structure_LABBegin
  OpenGl_Matrix*             myTransformation;
  TEL_TRANSFORM_PERSISTENCE* myTransPers;
  OpenGl_AspectLine*         myAspectLine;
  OpenGl_AspectFace*         myAspectFace;
  OpenGl_AspectMarker*       myAspectMarker;
  OpenGl_AspectText*         myAspectText;
  //Structure_LABHighlight
  OpenGl_Group*              myHighlightBox;
  TEL_COLOUR*                myHighlightColor;
  //Structure_LABVisibility
  //Structure_LABPick
  int                        myNamedStatus; //Structure_LABNameSet
  int                        myZLayer;

  OpenGl_ListOfStructure           myConnected;
  OpenGl_ListOfGroup               myGroups;
  Graphic3d_SequenceOfHClipPlane   myClipPlanes;

#ifdef HAVE_OPENCL
  mutable OpenGl_ListOfStructure   myAncestorStructures;
  mutable Standard_Boolean         myIsRaytracable;
  mutable Standard_Size            myModificationState;
#endif

public:

  DEFINE_STANDARD_ALLOC

};

#endif //OpenGl_Structure_Header