This file is indexed.

/usr/include/opencollada/COLLADAStreamWriter/COLLADASWOpenGLConstants.h is in opencollada-dev 0.1.0~20160714.0ec5063+dfsg1-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
/*
    Copyright (c) 2008-2009 NetAllied Systems GmbH

    This file is part of COLLADAStreamWriter.

    Licensed under the MIT Open Source License, 
    for details please see LICENSE file or the website
    http://www.opensource.org/licenses/mit-license.php
*/

#ifndef __COLLADASTREAMWRITER_OPEN_GL_CONSTANTS_H__
#define __COLLADASTREAMWRITER_OPEN_GL_CONSTANTS_H__

#include "COLLADASWPrerequisites.h"
#include "COLLADASWSampler.h"
#include "COLLADASWConstants.h"

namespace COLLADASW
{

    namespace OPEN_GL
    {
        //-------------------------------
        /** 
        Contains the texture wrap modes.
        Wrap modes that affect the interpretation of s, t, and p texture 
        coordinates in <sampler_*> elements. The wrap mode enums map to the 
        following OpenGL symbols.
        */
        static const String WrapModesOpenGL[] =
        {
            "repeat", 
            "clamp",
            "clamptoedge",
            "clamptoborder",
            "mirroredrepeat",
            "mirrorclamp",
            "mirrorclamptoedge",
            "mirrorclamptoborder",
            "wrap",
            "border",
            "mirror",
            "mirroronce",
        };

        //-------------------------------
        static const Sampler::WrapMode getWrapModeFromOpenGL ( const String& wrapModeOpenGL )
        {
            // "Repeat"
            if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[0] ) )
                return Sampler::WRAP_MODE_WRAP;

            // "Clamp"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[1] ) )
                return Sampler::WRAP_MODE_CLAMP;

            // "ClampToEdge"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[2] ) )
                return Sampler::WRAP_MODE_CLAMP;

            // "ClampToBorder"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[3] ) )
                return Sampler::WRAP_MODE_BORDER;

            // "MirroredRepeat"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[4] ) )
                return Sampler::WRAP_MODE_MIRROR;

            // "MirrorClamp"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[5] ) )
                return Sampler::WRAP_MODE_MIRROR;

            // "MirrorClampToEdge"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[6] ) )
                return Sampler::WRAP_MODE_MIRROR;

            // "MirrorClampToBorder"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[7] ) )
                return Sampler::WRAP_MODE_MIRROR;

            // "Wrap"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[8] ) )
                return Sampler::WRAP_MODE_WRAP;
            // "Border"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[9] ) )
                return Sampler::WRAP_MODE_BORDER;
            // "Mirror"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[10] ) )
                return Sampler::WRAP_MODE_MIRROR;
            // "MirrorOnce"
            else if ( COLLADASW::Utils::equalsIgnoreCase ( wrapModeOpenGL, WrapModesOpenGL[11] ) )
                return Sampler::WRAP_MODE_MIRROR;
               
            else return Sampler::WRAP_MODE_UNSPECIFIED;
        }

        //-------------------------------
        static const String FilterOpenGL[] = 
        {
            "none",
            "nearest",
            "linear",
            "nearestmipmapnearest",
            "linearmipmapnearest",
            "nearestmipmaplinear", 
            "linearmipmaplinear"
        };

        //-------------------------------
        static const Sampler::SamplerFilter getSamplerFilterFromOpenGL ( const String& samplerFilter )
        {
            // "none"
            if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[0] ) )
                return Sampler::SAMPLER_FILTER_NONE;

            // "nearest"
            else if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[1] ) )
                return Sampler::SAMPLER_FILTER_NEAREST;

            // "linear"
            else if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[2] ) )
                return Sampler::SAMPLER_FILTER_LINEAR;

            // "nearestmipmapnearest"
            else if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[3] ) )
                return Sampler::SAMPLER_FILTER_NEAREST_MIPMAP_NEAREST;

            // "linearmipmapnearest"
            else if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[4] ) )
                return Sampler::SAMPLER_FILTER_LINEAR_MIPMAP_NEAREST;

            // "nearestmipmaplinear"
            else if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[5] ) )
                return Sampler::SAMPLER_FILTER_NEAREST_MIPMAP_LINEAR;

            // "linearmipmaplinear"
            else if ( COLLADASW::Utils::equals ( samplerFilter, FilterOpenGL[6] ) )
                return Sampler::SAMPLER_FILTER_LINEAR_MIPMAP_LINEAR;

            else return Sampler::SAMPLER_FILTER_UNSPECIFIED;
        }

    }

}

#endif // __COLLADASTREAMWRITER_OPEN_GL_CONSTANTS_H__