This file is indexed.

/usr/include/OGRE/OgreCompositionPass.h is in libogre-dev 1.7.4+dfsg1-7.

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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
    (Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/

Copyright (c) 2000-2011 Torus Knot Software Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __CompositionPass_H__
#define __CompositionPass_H__

#include "OgrePrerequisites.h"
#include "OgreMaterial.h"
#include "OgreRenderSystem.h"
#include "OgreRenderQueue.h"

namespace Ogre {
	/** \addtogroup Core
	*  @{
	*/
	/** \addtogroup Effects
	*  @{
	*/
	/** Object representing one pass or operation in a composition sequence. This provides a 
		method to conveniently interleave RenderSystem commands between Render Queues.
	 */
	class _OgreExport CompositionPass : public CompositorInstAlloc
    {
    public:
        CompositionPass(CompositionTargetPass *parent);
        ~CompositionPass();
        
        /** Enumeration that enumerates the various composition pass types.
        */
        enum PassType
        {
            PT_CLEAR,           // Clear target to one colour
			PT_STENCIL,			// Set stencil operation
            PT_RENDERSCENE,     // Render the scene or part of it
            PT_RENDERQUAD,      // Render a full screen quad
			PT_RENDERCUSTOM		// Render a custom sequence
        };
        
        /** Set the type of composition pass */
        void setType(PassType type);
        /** Get the type of composition pass */
        PassType getType() const;
        
		/** Set an identifier for this pass. This identifier can be used to
			"listen in" on this pass with an CompositorInstance::Listener. 
		*/
		void setIdentifier(uint32 id);
		/** Get the identifier for this pass */
		uint32 getIdentifier() const;

        /** Set the material used by this pass
			@note applies when PassType is RENDERQUAD 
		*/
        void setMaterial(const MaterialPtr& mat);
        /** Set the material used by this pass 
			@note applies when PassType is RENDERQUAD 
		*/
        void setMaterialName(const String &name);
        /** Get the material used by this pass 
			@note applies when PassType is RENDERQUAD 
		*/
        const MaterialPtr& getMaterial() const;
		/** Set the first render queue to be rendered in this pass (inclusive) 
			@note applies when PassType is RENDERSCENE
		*/
        void setFirstRenderQueue(uint8 id);
		/** Get the first render queue to be rendered in this pass (inclusive) 
			@note applies when PassType is RENDERSCENE
		*/
		uint8 getFirstRenderQueue() const;
		/** Set the last render queue to be rendered in this pass (inclusive) 
			@note applies when PassType is RENDERSCENE
		*/
        void setLastRenderQueue(uint8 id);
		/** Get the last render queue to be rendered in this pass (inclusive) 
			@note applies when PassType is RENDERSCENE
		*/
		uint8 getLastRenderQueue() const;

		/** Set the material scheme used by this pass.
		@remarks
			Only applicable to passes that render the scene.
			@see Technique::setScheme.
		*/
		void setMaterialScheme(const String& schemeName);
		/** Get the material scheme used by this pass.
		@remarks
			Only applicable to passes that render the scene.
			@see Technique::setScheme.
		*/
		const String& getMaterialScheme(void) const;

		/** Would be nice to have for RENDERSCENE:
			flags to:
				exclude transparents
				override material (at least -- color)
		*/

        /** Set the viewport clear buffers  (defaults to FBT_COLOUR|FBT_DEPTH)
            @param val is a combination of FBT_COLOUR, FBT_DEPTH, FBT_STENCIL.
			@note applies when PassType is CLEAR
        */
        void setClearBuffers(uint32 val);
        /** Get the viewport clear buffers.
			@note applies when PassType is CLEAR
        */
        uint32 getClearBuffers() const;
        /** Set the viewport clear colour (defaults to 0,0,0,0) 
			@note applies when PassType is CLEAR
		 */
        void setClearColour(ColourValue val);
        /** Get the viewport clear colour (defaults to 0,0,0,0)	
			@note applies when PassType is CLEAR
		 */
        const ColourValue &getClearColour() const;
        /** Set the viewport clear depth (defaults to 1.0) 
			@note applies when PassType is CLEAR
		*/
        void setClearDepth(Real depth);
        /** Get the viewport clear depth (defaults to 1.0) 
			@note applies when PassType is CLEAR
		*/
        Real getClearDepth() const;
		/** Set the viewport clear stencil value (defaults to 0) 
			@note applies when PassType is CLEAR
		*/
        void setClearStencil(uint32 value);
        /** Get the viewport clear stencil value (defaults to 0) 
			@note applies when PassType is CLEAR
		*/
        uint32 getClearStencil() const;

		/** Set stencil check on or off.
			@note applies when PassType is STENCIL
		*/
		void setStencilCheck(bool value);
		/** Get stencil check enable.
			@note applies when PassType is STENCIL
		*/
		bool getStencilCheck() const;
		/** Set stencil compare function.
			@note applies when PassType is STENCIL
		*/
		void setStencilFunc(CompareFunction value); 
		/** Get stencil compare function.
			@note applies when PassType is STENCIL
		*/
		CompareFunction getStencilFunc() const; 
		/** Set stencil reference value.
			@note applies when PassType is STENCIL
		*/
		void setStencilRefValue(uint32 value);
		/** Get stencil reference value.
			@note applies when PassType is STENCIL
		*/
		uint32 getStencilRefValue() const;
		/** Set stencil mask.
			@note applies when PassType is STENCIL
		*/
		void setStencilMask(uint32 value);
		/** Get stencil mask.
			@note applies when PassType is STENCIL
		*/
		uint32 getStencilMask() const;
		/** Set stencil fail operation.
			@note applies when PassType is STENCIL
		*/
		void setStencilFailOp(StencilOperation value);
		/** Get stencil fail operation.
			@note applies when PassType is STENCIL
		*/
		StencilOperation getStencilFailOp() const;
		/** Set stencil depth fail operation.
			@note applies when PassType is STENCIL
		*/
		void setStencilDepthFailOp(StencilOperation value);
		/** Get stencil depth fail operation.
			@note applies when PassType is STENCIL
		*/
		StencilOperation getStencilDepthFailOp() const;
		/** Set stencil pass operation.
			@note applies when PassType is STENCIL
		*/
		void setStencilPassOp(StencilOperation value);
		/** Get stencil pass operation.
			@note applies when PassType is STENCIL
		*/
		StencilOperation getStencilPassOp() const;
		/** Set two sided stencil operation.
			@note applies when PassType is STENCIL
		*/
		void setStencilTwoSidedOperation(bool value);
		/** Get two sided stencil operation.
			@note applies when PassType is STENCIL
		*/
		bool getStencilTwoSidedOperation() const;

		/// Inputs (for material used for rendering the quad)
		struct InputTex
		{
			/// Name (local) of the input texture (empty == no input)
			String name;
			/// MRT surface index if applicable
			size_t mrtIndex;
			InputTex() : name(StringUtil::BLANK), mrtIndex(0) {}
			InputTex(const String& _name, size_t _mrtIndex = 0)
				: name(_name), mrtIndex(_mrtIndex) {}
		};

        /** Set an input local texture. An empty string clears the input.
            @param id    Input to set. Must be in 0..OGRE_MAX_TEXTURE_LAYERS-1
            @param input Which texture to bind to this input. An empty string clears the input.
			@param mrtIndex Which surface of an MRT to retrieve
			@note applies when PassType is RENDERQUAD 
        */
        void setInput(size_t id, const String &input=StringUtil::BLANK, size_t mrtIndex=0);
        
        /** Get the value of an input.
            @param id    Input to get. Must be in 0..OGRE_MAX_TEXTURE_LAYERS-1.
			@note applies when PassType is RENDERQUAD 
        */
        const InputTex &getInput(size_t id) const;
        
        /** Get the number of inputs used.
			@note applies when PassType is RENDERQUAD 
        */
        size_t getNumInputs() const;
        
        /** Clear all inputs.
			@note applies when PassType is RENDERQUAD 
        */
        void clearAllInputs();
        
        /** Get parent object 
			@note applies when PassType is RENDERQUAD 
		*/
        CompositionTargetPass *getParent();

        /** Determine if this target pass is supported on the current rendering device. 
         */
        bool _isSupported(void);

        /** Set quad normalised positions [-1;1]x[-1;1]
            @note applies when PassType is RENDERQUAD
         */
        void setQuadCorners(Real left,Real top,Real right,Real bottom);

        /** Get quad normalised positions [-1;1]x[-1;1]
            @note applies when PassType is RENDERQUAD 
         */
        bool getQuadCorners(Real & left,Real & top,Real & right,Real & bottom) const;
            
		/** Sets the use of camera frustum far corners provided in the quad's normals
			@note applies when PassType is RENDERQUAD 
		*/
		void setQuadFarCorners(bool farCorners, bool farCornersViewSpace);

		/** Returns true if camera frustum far corners are provided in the quad.
			@note applies when PassType is RENDERQUAD 
		*/
		bool getQuadFarCorners() const;

		/** Returns true if the far corners provided in the quad are in view space
			@note applies when PassType is RENDERQUAD 
		*/
		bool getQuadFarCornersViewSpace() const;

		/** Set the type name of this custom composition pass.
			@note applies when PassType is RENDERCUSTOM
			@see CompositorManager::registerCustomCompositionPass
		*/
		void setCustomType(const String& customType);

		/** Get the type name of this custom composition pass.
			@note applies when PassType is RENDERCUSTOM
			@see CompositorManager::registerCustomCompositionPass
		*/
		const String& getCustomType() const;

    private:
        /// Parent technique
        CompositionTargetPass *mParent;
        /// Type of composition pass
        PassType mType;
		/// Identifier for this pass
		uint32 mIdentifier;
        /// Material used for rendering
        MaterialPtr mMaterial;
        /// [first,last] render queue to render this pass (in case of PT_RENDERSCENE)
		uint8 mFirstRenderQueue;
		uint8 mLastRenderQueue;
		/// Material scheme name
		String mMaterialScheme;
        /// Clear buffers (in case of PT_CLEAR)
        uint32 mClearBuffers;
        /// Clear colour (in case of PT_CLEAR)
        ColourValue mClearColour;
		/// Clear depth (in case of PT_CLEAR)
		Real mClearDepth;
		/// Clear stencil value (in case of PT_CLEAR)
		uint32 mClearStencil;
        /// Inputs (for material used for rendering the quad)
        /// An empty string signifies that no input is used
        InputTex mInputs[OGRE_MAX_TEXTURE_LAYERS];
		/// Stencil operation parameters
		bool mStencilCheck;
		CompareFunction mStencilFunc; 
		uint32 mStencilRefValue;
		uint32 mStencilMask;
		StencilOperation mStencilFailOp;
		StencilOperation mStencilDepthFailOp;
		StencilOperation mStencilPassOp;
		bool mStencilTwoSidedOperation;

        /// true if quad should not cover whole screen
        bool mQuadCornerModified;
        /// quad positions in normalised coordinates [-1;1]x[-1;1] (in case of PT_RENDERQUAD)
        Real mQuadLeft;
        Real mQuadTop;
        Real mQuadRight;
        Real mQuadBottom;

		bool mQuadFarCorners, mQuadFarCornersViewSpace;
		//The type name of the custom composition pass.
		String mCustomType;
    };
	/** @} */
	/** @} */

}

#endif