root/OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/AttrData.h
@
13041
| Revision 13041, 16.3 kB (checked in by robert, 14 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield |
| 2 | * |
| 3 | * This library is open source and may be redistributed and/or modified under |
| 4 | * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or |
| 5 | * (at your option) any later version. The full license is in LICENSE file |
| 6 | * included with this distribution, and on the openscenegraph.org website. |
| 7 | * |
| 8 | * This library is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * OpenSceneGraph Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | // |
| 15 | // OpenFlight® loader for OpenSceneGraph |
| 16 | // |
| 17 | // Copyright (C) 2005-2007 Brede Johansen |
| 18 | // |
| 19 | |
| 20 | #ifndef FLT_ATTRDATA_H |
| 21 | #define FLT_ATTRDATA_H |
| 22 | |
| 23 | #include <string> |
| 24 | #include <osg/Object> |
| 25 | #include "Types.h" |
| 26 | |
| 27 | namespace flt { |
| 28 | |
| 29 | |
| 30 | class AttrData : public osg::Object |
| 31 | { |
| 32 | public : |
| 33 | |
| 34 | AttrData(); |
| 35 | |
| 36 | AttrData(const AttrData& attr, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); |
| 37 | |
| 38 | META_Object(flt,AttrData); |
| 39 | |
| 40 | |
| 41 | enum MinFilterMode { |
| 42 | MIN_FILTER_POINT = 0, |
| 43 | MIN_FILTER_BILINEAR = 1, |
| 44 | MIN_FILTER_MIPMAP = 2, // (Obsolete) |
| 45 | MIN_FILTER_MIPMAP_POINT = 3, |
| 46 | MIN_FILTER_MIPMAP_LINEAR = 4, |
| 47 | MIN_FILTER_MIPMAP_BILINEAR = 5, |
| 48 | MIN_FILTER_MIPMAP_TRILINEAR = 6, |
| 49 | MIN_FILTER_NONE = 7, |
| 50 | MIN_FILTER_BICUBIC = 8, |
| 51 | MIN_FILTER_BILINEAR_GEQUAL = 9, |
| 52 | MIN_FILTER_BILINEAR_LEQUAL = 10, |
| 53 | MIN_FILTER_BICUBIC_GEQUAL = 11, |
| 54 | MIN_FILTER_BICUBIC_LEQUAL = 12 |
| 55 | }; |
| 56 | |
| 57 | enum MagFilterMode { |
| 58 | MAG_FILTER_POINT = 0, |
| 59 | MAG_FILTER_BILINEAR = 1, |
| 60 | MAG_FILTER_NONE = 2, |
| 61 | MAG_FILTER_BICUBIC = 3, |
| 62 | MAG_FILTER_SHARPEN = 4, |
| 63 | MAG_FILTER_ADD_DETAIL = 5, |
| 64 | MAG_FILTER_MODULATE_DETAIL = 6, |
| 65 | MAG_FILTER_BILINEAR_GEQUAL = 7, |
| 66 | MAG_FILTER_BILINEAR_LEQUAL = 8, |
| 67 | MAG_FILTER_BICUBIC_GEQUAL = 9, |
| 68 | MAG_FILTER_BICUBIC_LEQUAL = 10 |
| 69 | }; |
| 70 | |
| 71 | enum WrapMode { |
| 72 | WRAP_REPEAT = 0, |
| 73 | WRAP_CLAMP = 1, |
| 74 | WRAP_NONE = 3, |
| 75 | WRAP_MIRRORED_REPEAT = 4 |
| 76 | }; |
| 77 | |
| 78 | enum TexEnvMode { |
| 79 | TEXENV_MODULATE = 0, |
| 80 | TEXENV_BLEND = 1, |
| 81 | TEXENV_DECAL = 2, |
| 82 | TEXENV_COLOR = 3, |
| 83 | TEXENV_ADD = 4 |
| 84 | }; |
| 85 | |
| 86 | enum Projection { |
| 87 | PROJECTION_FLAT = 0, |
| 88 | PROJECTION_LAMBERT_CONIC = 3, |
| 89 | PROJECTION_UTM = 4, |
| 90 | PROJECTION_UNDEFINED = 7 |
| 91 | }; |
| 92 | |
| 93 | enum Datum { |
| 94 | DATUM_WGS84 = 0, |
| 95 | DATUM_WGS72 = 1, |
| 96 | DATUM_BESSEL = 2, |
| 97 | DATUM_CLARK_1866 = 3, |
| 98 | DATUM_NAD27 = 4 |
| 99 | }; |
| 100 | |
| 101 | enum InternalFormat { |
| 102 | INTERNAL_FORMAT_DEFAULT = 0, |
| 103 | INTERNAL_FORMAT_TX_I_12A_4 = 1, |
| 104 | INTERNAL_FORMAT_TX_IA_8 = 2, |
| 105 | INTERNAL_FORMAT_TX_RGB_5 = 3, |
| 106 | INTERNAL_FORMAT_TX_RGBA_4 = 4, |
| 107 | INTERNAL_FORMAT_TX_IA_12 = 5, |
| 108 | INTERNAL_FORMAT_TX_RGBA_8 = 6, |
| 109 | INTERNAL_FORMAT_TX_RGBA_12 = 7, |
| 110 | INTERNAL_FORMAT_TX_I_16 = 8, |
| 111 | INTERNAL_FORMAT_TX_RGB_12 = 9 |
| 112 | }; |
| 113 | |
| 114 | int32 texels_u; // Number of texels in u direction |
| 115 | int32 texels_v; // Number of texels in v direction |
| 116 | int32 direction_u; // Real world size u direction |
| 117 | int32 direction_v; // Real world size v direction |
| 118 | int32 x_up; // x component of up vector |
| 119 | int32 y_up; // y component of up vector |
| 120 | int32 fileFormat; // File format type |
| 121 | // -1 Not used |
| 122 | // 0 AT&T image 8 pattern |
| 123 | // 1 AT&T image 8 template |
| 124 | // 2 SGI intensity modulation |
| 125 | // 3 SGI intensity w/ alpha |
| 126 | // 4 SGI RGB |
| 127 | // 5 SGI RGB w/ alpha |
| 128 | int32 minFilterMode; // Minification filter type |
| 129 | // 0 - TX_POINT |
| 130 | // 1 - TX_BILINEAR |
| 131 | // 2 - TX_MIPMAP (Obsolete) |
| 132 | // 3 - TX_MIPMAP_POINT |
| 133 | // 4 - TX_MIPMAP_LINEAR |
| 134 | // 5 - TX_MIPMAP_BILINEAR |
| 135 | // 6 - TX_MIPMAP_TRILINEAR |
| 136 | // 7 - None |
| 137 | // 8 - TX_BICUBIC |
| 138 | // 9 - TX_BILINEAR_GEQUAL |
| 139 | // 10 - TX_BILINEAR_LEQUAL |
| 140 | // 11 - TX_BICUBIC_GEQUAL |
| 141 | // 12 - TX_BICUBIC_LEQUAL |
| 142 | int32 magFilterMode; // Magnification filter type |
| 143 | // 0 - TX_POINT |
| 144 | // 1 - TX_BILINEAR |
| 145 | // 2 - None |
| 146 | // 3 - TX_BICUBIC |
| 147 | // 4 - TX_SHARPEN |
| 148 | // 5 - TX_ADD_DETAIL |
| 149 | // 6 - TX_MODULATE_DETAIL |
| 150 | // 7 - TX_BILINEAR_GEQUAL |
| 151 | // 8 - TX_BILINEAR_LEQUAL |
| 152 | // 9 - TX_BICUBIC_GEQUAL |
| 153 | // 10 - TX_BICUBIC_LEQUAL |
| 154 | int32 wrapMode; // Repetition type |
| 155 | // 0 - TX_REPEAT |
| 156 | // 1 - TX_CLAMP |
| 157 | // 2 - (Obsolete) |
| 158 | int32 wrapMode_u; // Repetition type in u direction (see above) |
| 159 | int32 wrapMode_v; // Repetition type in v direction (see above) |
| 160 | int32 modifyFlag; // Modify flag (for internal use) |
| 161 | int32 pivot_x; // x pivot point for rotating textures |
| 162 | int32 pivot_y; // y pivot point for rotating textures |
| 163 | |
| 164 | // -------------- |
| 165 | // v11 ends here |
| 166 | // -------------- |
| 167 | |
| 168 | int32 texEnvMode; // Environment type |
| 169 | // 0 - TV_MODULATE |
| 170 | // 1 - TV_BLEND |
| 171 | // 2 - TV_DECAL |
| 172 | // 3 - TV_COLOR |
| 173 | // 4 - TV_ADD |
| 174 | int32 intensityAsAlpha; // TRUE if intensity pattern to be loaded in alpha with white in color |
| 175 | // int32 spare1[8]; // 8 words of spare |
| 176 | float64 size_u; // Real world size u for floating point databases |
| 177 | float64 size_v; // Real world size v for floating point databases |
| 178 | int32 originCode; // Code for origin of imported texture |
| 179 | int32 kernelVersion; // Kernel version number |
| 180 | int32 intFormat; // Internal format type |
| 181 | // 0 - Default |
| 182 | // 1 - TX_I_12A_4 |
| 183 | // 2 - TX_IA_8 |
| 184 | // 3 - TX_RGB_5 |
| 185 | // 4 - TX_RGBA_4 |
| 186 | // 5 - TX_IA_12 |
| 187 | // 6 - TX_RGBA_8 |
| 188 | // 7 - TX_RGBA_12 |
| 189 | // 8 - TX_I_16 (shadow mode only) |
| 190 | // 9 - TX_RGB_12 |
| 191 | int32 extFormat; // External format type |
| 192 | // 0 - Default |
| 193 | // 1 - TX_PACK_8 |
| 194 | // 2 - TX_PACK_16 |
| 195 | int32 useMips; // TRUE if using following 8 floats for MIPMAP kernel |
| 196 | float32 of_mips[8]; // 8 floats for kernel of separable symmetric filter |
| 197 | int32 useLodScale; // Boolean if TRUE send: |
| 198 | float32 lod0; // LOD0 for TX_CONTROL_POINT |
| 199 | float32 scale0; // SCALE0 for TX_CONTROL_POINT |
| 200 | float32 lod1; // LOD1 for TX_CONTROL_POINT |
| 201 | float32 scale1; // SCALE1 for TX_CONTROL_POINT |
| 202 | float32 lod2; // LOD2 for TX_CONTROL_POINT |
| 203 | float32 scale2; // SCALE2 for TX_CONTROL_POINT |
| 204 | float32 lod3; // LOD3 for TX_CONTROL_POINT |
| 205 | float32 scale3; // SCALE3 for TX_CONTROL_POINT |
| 206 | float32 lod4; // LOD4 for TX_CONTROL_POINT |
| 207 | float32 scale4; // SCALE4 for TX_CONTROL_POINT |
| 208 | float32 lod5; // LOD5 for TX_CONTROL_POINT |
| 209 | float32 scale5; // SCALE5 for TX_CONTROL_POINT |
| 210 | float32 lod6; // LOD6 for TX_CONTROL_POINT |
| 211 | float32 scale6; // SCALE6 for TX_CONTROL_POINT |
| 212 | float32 lod7; // LOD7 for TX_CONTROL_POINT |
| 213 | float32 scale7; // SCALE7 for TX_CONTROL_POINT |
| 214 | |
| 215 | float32 clamp; // Clamp |
| 216 | int32 magFilterAlpha; // magfilteralpha: |
| 217 | // 0 = TX_POINT |
| 218 | // 1 = TX_BILINEAR |
| 219 | // 2 = None |
| 220 | // 3 = TX_BICUBIC |
| 221 | // 4 = TX_SHARPEN |
| 222 | // 5 = TX_ADD_DETAIL |
| 223 | // 6 = TX_MODULATE_DETAIL |
| 224 | // 7 = TX_BILINEAR_GEQUAL |
| 225 | // 8 = TX_BILINEAR_LEQUAL |
| 226 | // 9 = TX_BICUBIC_GEQUAL |
| 227 | // 10 = TX_BIBICUBIC_LEQUAL |
| 228 | int32 magFilterColor; // magfiltercolor: |
| 229 | // 0 = TX_POINT |
| 230 | // 1 = TX_BILINEAR |
| 231 | // 2 = None |
| 232 | // 3 = TX_BICUBIC |
| 233 | // 4 = TX_SHARPEN |
| 234 | // 5 = TX_ADD_DETAIL |
| 235 | // 6 = TX_MODULATE_DETAIL |
| 236 | // 7 = TX_BILINEAR_GEQUAL |
| 237 | // 8 = TX_BILINEAR_LEQUAL |
| 238 | // 9 = TX_BICUBIC_GEQUAL |
| 239 | // 10 = TX_BIBICUBIC_LEQUAL |
| 240 | // float32 reserved1; // Reserved |
| 241 | // float32 reserved2[8]; // Reserved |
| 242 | float64 lambertMeridian; // Lambert conic projection central meridian |
| 243 | float64 lambertUpperLat; // Lambert conic projection upper latitude |
| 244 | float64 lambertlowerLat; // Lambert conic projection lower latitude |
| 245 | // float64 reserved3; // Reserved |
| 246 | // float32 spare2[5]; // Spare |
| 247 | int32 useDetail; // TRUE if using next 5 integers for detail texture |
| 248 | int32 txDetail_j; // J argument for TX_DETAIL |
| 249 | int32 txDetail_k; // K argument for TX_DETAIL |
| 250 | int32 txDetail_m; // M argument for TX_DETAIL |
| 251 | int32 txDetail_n; // N argument for TX_DETAIL |
| 252 | int32 txDetail_s; // Scramble argument for TX_DETAIL |
| 253 | int32 useTile; // TRUE if using next for floats for TX_TILE |
| 254 | float32 txTile_ll_u; // Lower-left u value for TX_TILE |
| 255 | float32 txTile_ll_v; // Lower-left v value for TX_TILE |
| 256 | float32 txTile_ur_u; // Upper-right u value for TX_TILE |
| 257 | float32 txTile_ur_v; // Upper-right v value for TX_TILE |
| 258 | int32 projection; // Projection |
| 259 | // 0 = Flat earth |
| 260 | // 3 = Lambert conic |
| 261 | // 4 = UTM |
| 262 | // 7 = Undefined projection |
| 263 | int32 earthModel; // Earth model |
| 264 | // 0 = WGS84 |
| 265 | // 1 = WGS72 |
| 266 | // 2 = Bessel |
| 267 | // 3 = Clark 1866 |
| 268 | // 4 = NAD27 |
| 269 | // int32 reserved4; // Reserved |
| 270 | int32 utmZone; // UTM zone |
| 271 | int32 imageOrigin; // Image origin |
| 272 | // 0 = Lower-left |
| 273 | // 1 = Upper-left |
| 274 | int32 geoUnits; // Geospecific points units |
| 275 | // 0 = Degrees |
| 276 | // 1 = Meters |
| 277 | // 2 = Pixels |
| 278 | // int32 reserved5; // Reserved |
| 279 | // int32 reserved6; // Reserved |
| 280 | int32 hemisphere; // Hemisphere for geospecific points units |
| 281 | // 0 = Southern |
| 282 | // 1 = Northern |
| 283 | // int32 reserved7; // Reserved |
| 284 | // int32 reserved8; // Reserved |
| 285 | // int32 spare3[149]; // Spare |
| 286 | // char comments[512]; // Comments |
| 287 | std::string comments; |
| 288 | // -------------- |
| 289 | // v12 ends here |
| 290 | // -------------- |
| 291 | |
| 292 | // int32 reserved9[13]; // Reserved |
| 293 | int32 attrVersion; // Attribute file version number |
| 294 | |
| 295 | int32 controlPoints; // Number of geospecific control points |
| 296 | // If the number of geospecific control points is > 0, |
| 297 | // the following fields are also in the attribute file: |
| 298 | int32 reserved10; // Reserved |
| 299 | #if 0 |
| 300 | // For each geospecific control point: |
| 301 | { |
| 302 | float64 texel_u; // Texel u of geospecific control point |
| 303 | float64 texel_v; // Texel v of geospecific control point |
| 304 | float64 geoPoint[2]; // Real earth coordinate of geospecific control point |
| 305 | // (this value depends on the projection, earth model, |
| 306 | // and geospecific points units) |
| 307 | } |
| 308 | |
| 309 | // ---------------- |
| 310 | // v15.6 ends here |
| 311 | // ---------------- |
| 312 | |
| 313 | // After all geospecific control points are listed, the following subtexture |
| 314 | // information appears: |
| 315 | int32 subtextures; // Number of subtexture definitions contained in the |
| 316 | // texture attribute file |
| 317 | // If the number of subtexture definitions is >0, |
| 318 | // the following fields are repeated for each subtexture definition: |
| 319 | { |
| 320 | char name[32]; // name of subtexture definition |
| 321 | int32 left; // Coordinate of left edge of subtexture |
| 322 | // definition measured in texels. |
| 323 | int32 bottom; // Coordinate of bottom edge of subtexture |
| 324 | // definition measured in texels. |
| 325 | int32 right; // Coordinate of right edge of subtexture |
| 326 | // definition measured in texels. |
| 327 | int32 top; // Coordinate of top edge of subtexture |
| 328 | // definition measured in texels. |
| 329 | } |
| 330 | #endif |
| 331 | int32 numSubtextures; // # of subtextures |
| 332 | |
| 333 | }; |
| 334 | |
| 335 | |
| 336 | } // end namespace |
| 337 | |
| 338 | #endif |
| 339 |
Note: See TracBrowser
for help on using the browser.
