- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FUtils/FUDaeEnum.h

    00001 /*
    00002     Copyright (C) 2005-2007 Feeling Software Inc.
    00003     Portions of the code are:
    00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
    00005
    00006     MIT License: http://www.opensource.org/licenses/mit-license.php
    00007 */
    00008 /*
    00009     Based on the FS Import classes:
    00010     Copyright (C) 2005-2006 Feeling Software Inc
    00011     Copyright (C) 2005-2006 Autodesk Media Entertainment
    00012     MIT License: http://www.opensource.org/licenses/mit-license.php
    00013 */
    00014
    00015 #ifndef _FU_DAE_ENUM_H_
    00016 #define _FU_DAE_ENUM_H_
    00017
    00018 #undef NEVER // 3dsMax defines NEVER in the global namespace.
    00019 #undef TRANSPARENT // Win32: GDI defines TRANSPARENT in the global namespace
    00020 #undef RELATIVE // Win32: GDI defines RELATIVE in the global namespace
    00021 #undef IN
    00022 #undef OUT
    00023 #undef DIFFERENCE
    00024
    00026 namespace FUDaeInterpolation
    00027 {
    00029     enum Interpolation
    00030     {
    00031         STEP = 0,
    00033         LINEAR,
    00034         BEZIER,
    00035         TCB,
    00038         UNKNOWN,
    00039         DEFAULT = STEP,
    00040     };
    00041
    00045     FCOLLADA_EXPORT Interpolation FromString(const fm::string& value);
    00046
    00050     FCOLLADA_EXPORT const char* ToString(const Interpolation& value);
    00051 };
    00052
    00054 typedef fm::vector<FUDaeInterpolation::Interpolation> FUDaeInterpolationList;
    00055
    00057 namespace FUDaeSplineType
    00058 {
    00060     enum Type
    00061     {
    00062         LINEAR = 0,
    00063         BEZIER,
    00064         NURBS,
    00066         UNKNOWN,
    00067         DEFAULT = NURBS,
    00068     };
    00069
    00073     FCOLLADA_EXPORT Type FromString(const fm::string& value);
    00074
    00078     FCOLLADA_EXPORT const char* ToString(const Type& value);
    00079 };
    00080
    00082 namespace FUDaeSplineForm
    00083 {
    00085     enum Form
    00086     {
    00087         OPEN = 0,
    00089         CLOSED,
    00091         UNKNOWN,
    00092         DEFAULT = OPEN,
    00093     };
    00094
    00098     FCOLLADA_EXPORT Form FromString(const fm::string& value);
    00099
    00103     FCOLLADA_EXPORT const char* ToString(const Form& value);
    00104 };
    00105
    00106
    00108 namespace FUDaeTextureChannel
    00109 {
    00114     enum Channel
    00115     {
    00116         AMBIENT = 0,
    00117         BUMP,
    00118         DIFFUSE,
    00119         DISPLACEMENT,
    00120         EMISSION,
    00121         FILTER,
    00122         REFLECTION,
    00123         REFRACTION,
    00124         SHININESS,
    00125         SPECULAR,
    00126         SPECULAR_LEVEL,
    00127         TRANSPARENT,
    00129         COUNT,
    00130         UNKNOWN,
    00131         DEFAULT = DIFFUSE,
    00132     };
    00133
    00137     FCOLLADA_EXPORT Channel FromString(const fm::string& value);
    00138 };
    00139
    00141 namespace FUDaeTextureWrapMode
    00142 {
    00143     enum WrapMode
    00144     {
    00145         NONE = 0,
    00146         WRAP,
    00147         MIRROR,
    00148         CLAMP,
    00149         BORDER,
    00150
    00151         UNKNOWN,
    00152         DEFAULT = WRAP,
    00153     };
    00154
    00158     FCOLLADA_EXPORT WrapMode FromString(const char* value);
    00159     inline WrapMode FromString(const fm::string& value) { return FromString(value.c_str()); }
    00164     FCOLLADA_EXPORT const char* ToString(WrapMode wrap);
    00165 };
    00166
    00168 namespace FUDaeTextureFilterFunction
    00169 {
    00170     enum FilterFunction
    00171     {
    00172         NONE = 0,
    00173         NEAREST,
    00174         LINEAR,
    00175         NEAREST_MIPMAP_NEAREST,
    00176         LINEAR_MIPMAP_NEAREST,
    00177         NEAREST_MIPMAP_LINEAR,
    00178         LINEAR_MIPMAP_LINEAR,
    00179
    00180         UNKNOWN,
    00181         DEFAULT = NONE,
    00182     };
    00183
    00187     FCOLLADA_EXPORT FilterFunction FromString(const char* value);
    00188     inline FilterFunction FromString(const fm::string& value) { return FromString(value.c_str()); }
    00193     FCOLLADA_EXPORT const char* ToString(FilterFunction function);
    00194 };
    00195
    00197 namespace FUDaeMorphMethod
    00198 {
    00205     enum Method
    00206     {
    00207         NORMALIZED = 0,
    00208         RELATIVE,
    00210         UNKNOWN,
    00211         DEFAULT = NORMALIZED,
    00212     };
    00213
    00217     FCOLLADA_EXPORT Method FromString(const char* value);
    00218
    00222     FCOLLADA_EXPORT const char* ToString(Method method);
    00223     inline Method FromString(const fm::string& value) { return FromString(value.c_str()); }
    00224 };
    00225
    00227 namespace FUDaeInfinity
    00228 {
    00231     enum Infinity
    00232     {
    00233         CONSTANT = 0,
    00234         LINEAR,
    00237         CYCLE,
    00239         CYCLE_RELATIVE,
    00243         OSCILLATE,
    00247         UNKNOWN,
    00248         DEFAULT = CONSTANT
    00249     };
    00250
    00254     FCOLLADA_EXPORT Infinity FromString(const char* value);
    00255
    00259     FCOLLADA_EXPORT const char* ToString(Infinity infinity);
    00260     inline Infinity FromString(const fm::string& value) { return FromString(value.c_str()); }
    00261 };
    00262
    00264 namespace FUDaeBlendMode
    00265 {
    00267     enum Mode
    00268     {
    00269         NONE,
    00270         OVER,
    00271         IN,
    00272         OUT,
    00273         ADD,
    00274         SUBTRACT,
    00275         MULTIPLY,
    00276         DIFFERENCE,
    00277         LIGHTEN,
    00278         DARKEN,
    00279         SATURATE,
    00280         DESATURATE,
    00281         ILLUMINATE,
    00283         UNKNOWN,
    00284         DEFAULT = NONE,
    00285     };
    00286
    00290     FCOLLADA_EXPORT Mode FromString(const char* value);
    00291
    00295     FCOLLADA_EXPORT const char* ToString(Mode mode);
    00296     inline Mode FromString(const fm::string& value) { return FromString(value.c_str()); }
    00297 }
    00298
    00300 namespace FUDaeGeometryInput
    00301 {
    00303     enum Semantic
    00304     {
    00305         POSITION = 0,
    00306         VERTEX,
    00307         NORMAL,
    00308         GEOTANGENT,
    00309         GEOBINORMAL,
    00310         TEXCOORD,
    00311         TEXTANGENT,
    00312         TEXBINORMAL,
    00313         UV,
    00314         COLOR,
    00315         EXTRA,
    00317         POINT_SIZE,
    00319         POINT_ROTATION,
    00321         UNKNOWN = -1,
    00322     };
    00323     typedef fm::vector<Semantic> SemanticList;
    00328     FCOLLADA_EXPORT Semantic FromString(const char* value);
    00329
    00333     FCOLLADA_EXPORT const char* ToString(Semantic semantic);
    00334     inline Semantic FromString(const fm::string& value) { return FromString(value.c_str()); }
    00335 }
    00336
    00338 namespace FUDaeProfileType
    00339 {
    00341     enum Type
    00342     {
    00343         CG,
    00344         HLSL,
    00345         GLSL,
    00346         GLES,
    00347         COMMON,
    00349         UNKNOWN
    00350     };
    00351
    00356     FCOLLADA_EXPORT Type FromString(const char* value);
    00357     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00363     FCOLLADA_EXPORT const char* ToString(Type type);
    00364 }
    00365
    00367 namespace FUDaePassStateFunction
    00368 {
    00374     enum Function
    00375     {
    00376         NEVER = 0x0200,
    00377         LESS = 0x0201,
    00378         EQUAL = 0x0202,
    00379         LESS_EQUAL = 0x0203,
    00380         GREATER = 0x0204,
    00381         NOT_EQUAL = 0x0205,
    00382         GREATER_EQUAL = 0x0206,
    00383         ALWAYS = 0x0207,
    00385         INVALID
    00386     };
    00387
    00391     FCOLLADA_EXPORT Function FromString(const char* value);
    00392     inline Function FromString(const fm::string& value) { return FromString(value.c_str()); }
    00397     FCOLLADA_EXPORT const char* ToString(Function fn);
    00398 };
    00399
    00401 namespace FUDaePassStateStencilOperation
    00402 {
    00404     enum Operation
    00405     {
    00406         KEEP = 0x1E00,
    00407         ZERO = 0x0000,
    00408         REPLACE = 0x1E01,
    00409         INCREMENT = 0x1E02,
    00410         DECREMENT = 0x1E03,
    00411         INVERT = 0x1E0A,
    00413         INCREMENT_WRAP = 0x8507,
    00414         DECREMENT_WRAP = 0x8508,
    00416         INVALID
    00417     };
    00418
    00422     FCOLLADA_EXPORT Operation FromString(const char* value);
    00423     inline Operation FromString(const fm::string& value) { return FromString(value.c_str()); }
    00428     FCOLLADA_EXPORT const char* ToString(Operation op);
    00429 };
    00430
    00432 namespace FUDaePassStateBlendType
    00433 {
    00441     enum Type
    00442     {
    00443         ZERO = 0x0000,
    00444         ONE = 0x0001,
    00445         SOURCE_COLOR = 0x0300,
    00446         ONE_MINUS_SOURCE_COLOR = 0x0301,
    00447         DESTINATION_COLOR = 0x0306,
    00448         ONE_MINUS_DESTINATION_COLOR = 0x0307,
    00449         SOURCE_ALPHA = 0x0302,
    00450         ONE_MINUS_SOURCE_ALPHA = 0x0303,
    00451         DESTINATION_ALPHA = 0x0304,
    00452         ONE_MINUS_DESTINATION_ALPHA = 0x0305,
    00453         CONSTANT_COLOR = 0x8001,
    00454         ONE_MINUS_CONSTANT_COLOR = 0x8002,
    00455         CONSTANT_ALPHA = 0x8003,
    00456         ONE_MINUS_CONSTANT_ALPHA = 0x8004,
    00457         SOURCE_ALPHA_SATURATE = 0x0308,
    00459         INVALID
    00460     };
    00461
    00465     FCOLLADA_EXPORT Type FromString(const char* value);
    00466     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00471     FCOLLADA_EXPORT const char* ToString(Type type);
    00472 };
    00473
    00475 namespace FUDaePassStateFaceType
    00476 {
    00480     enum Type
    00481     {
    00482         FRONT = 0x0404,
    00483         BACK = 0x0405,
    00484         FRONT_AND_BACK = 0x0408,
    00486         INVALID
    00487     };
    00488
    00492     FCOLLADA_EXPORT Type FromString(const char* value);
    00493     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00498     FCOLLADA_EXPORT const char* ToString(Type type);
    00499 };
    00500
    00502 namespace FUDaePassStateBlendEquation
    00503 {
    00505     enum Equation
    00506     {
    00507         ADD = 0x8006,
    00508         SUBTRACT = 0x800A,
    00509         REVERSE_SUBTRACT = 0x800B,
    00510         MIN = 0x8007,
    00511         MAX = 0x8008,
    00513         INVALID
    00514     };
    00515
    00519     FCOLLADA_EXPORT Equation FromString(const char* value);
    00520     inline Equation FromString(const fm::string& value) { return FromString(value.c_str()); }
    00525     FCOLLADA_EXPORT const char* ToString(Equation equation);
    00526 };
    00527
    00529 namespace FUDaePassStateMaterialType
    00530 {
    00532     enum Type
    00533     {
    00534         EMISSION = 0x1600,
    00535         AMBIENT = 0x1200,
    00536         DIFFUSE = 0x1201,
    00537         SPECULAR = 0x1202,
    00538         AMBIENT_AND_DIFFUSE = 0x1602,
    00540         INVALID
    00541     };
    00542
    00546     FCOLLADA_EXPORT Type FromString(const char* value);
    00547     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00552     FCOLLADA_EXPORT const char* ToString(Type type);
    00553 };
    00554
    00556 namespace FUDaePassStateFogType
    00557 {
    00559     enum Type
    00560     {
    00561         LINEAR = 0x2601,
    00562         EXP = 0x0800,
    00563         EXP2 = 0x0801,
    00565         INVALID
    00566     };
    00567
    00571     FCOLLADA_EXPORT Type FromString(const char* value);
    00572     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00577     FCOLLADA_EXPORT const char* ToString(Type type);
    00578 }
    00579
    00581 namespace FUDaePassStateFogCoordinateType
    00582 {
    00584     enum Type
    00585     {
    00586         FOG_COORDINATE = 0x8451,
    00587         FRAGMENT_DEPTH = 0x8452,
    00589         INVALID
    00590     };
    00591
    00595     FCOLLADA_EXPORT Type FromString(const char* value);
    00596     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00601     FCOLLADA_EXPORT const char* ToString(Type type);
    00602 };
    00603
    00605 namespace FUDaePassStateFrontFaceType
    00606 {
    00608     enum Type
    00609     {
    00610         CLOCKWISE = 0x0900,
    00611         COUNTER_CLOCKWISE = 0x0901,
    00613         INVALID
    00614     };
    00615
    00619     FCOLLADA_EXPORT Type FromString(const char* value);
    00620     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00625     FCOLLADA_EXPORT const char* ToString(Type type);
    00626 };
    00627
    00629 namespace FUDaePassStateLogicOperation
    00630 {
    00633     enum Operation
    00634     {
    00635         CLEAR = 0x1500,
    00636         AND = 0x1501,
    00637         AND_REVERSE = 0x1502,
    00638         COPY = 0x1503,
    00639         AND_INVERTED = 0x1504,
    00640         NOOP = 0x1505,
    00641         XOR = 0x1506,
    00642         OR = 0x1507,
    00643         NOR = 0x1508,
    00644         EQUIV = 0x1509,
    00645         INVERT = 0x150A,
    00646         OR_REVERSE = 0x150B,
    00647         COPY_INVERTED = 0x150C,
    00648         NAND = 0x150E,
    00649         SET = 0x150F,
    00651         INVALID
    00652     };
    00653
    00657     FCOLLADA_EXPORT Operation FromString(const char* value);
    00658     inline Operation FromString(const fm::string& value) { return FromString(value.c_str()); }
    00663     FCOLLADA_EXPORT const char* ToString(Operation op);
    00664 };
    00665
    00667 namespace FUDaePassStatePolygonMode
    00668 {
    00670     enum Mode
    00671     {
    00672         POINT = 0x1B00,
    00673         LINE = 0x1B01,
    00674         FILL = 0x1B02,
    00676         INVALID
    00677     };
    00678
    00682     FCOLLADA_EXPORT Mode FromString(const char* value);
    00683     inline Mode FromString(const fm::string& value) { return FromString(value.c_str()); }
    00688     FCOLLADA_EXPORT const char* ToString(Mode mode);
    00689 };
    00690
    00692 namespace FUDaePassStateShadeModel
    00693 {
    00695     enum Model
    00696     {
    00697         FLAT = 0x1D00,
    00698         SMOOTH = 0x1D01,
    00700         INVALID
    00701     };
    00702
    00706     FCOLLADA_EXPORT Model FromString(const char* value);
    00707     inline Model FromString(const fm::string& value) { return FromString(value.c_str()); }
    00712     FCOLLADA_EXPORT const char* ToString(Model model);
    00713 };
    00714
    00716 namespace FUDaePassStateLightModelColorControlType
    00717 {
    00719     enum Type
    00720     {
    00721         SINGLE_COLOR = 0x81F9,
    00722         SEPARATE_SPECULAR_COLOR = 0x81FA,
    00724         INVALID
    00725     };
    00726
    00730     FCOLLADA_EXPORT Type FromString(const char* value);
    00731     inline Type FromString(const fm::string& value) { return FromString(value.c_str()); }
    00736     FCOLLADA_EXPORT const char* ToString(Type type);
    00737 };
    00738
    00740 namespace FUDaePassState
    00741 {
    00749     enum State
    00750     {
    00751         ALPHA_FUNC = 0,
    00752         BLEND_FUNC,
    00753         BLEND_FUNC_SEPARATE,
    00754         BLEND_EQUATION,
    00755         BLEND_EQUATION_SEPARATE,
    00756         COLOR_MATERIAL,
    00757         CULL_FACE,
    00758         DEPTH_FUNC,
    00759         FOG_MODE,
    00760         FOG_COORD_SRC,
    00762         FRONT_FACE = 10,
    00763         LIGHT_MODEL_COLOR_CONTROL,
    00764         LOGIC_OP,
    00765         POLYGON_MODE,
    00766         SHADE_MODEL,
    00767         STENCIL_FUNC,
    00768         STENCIL_OP,
    00769         STENCIL_FUNC_SEPARATE,
    00770         STENCIL_OP_SEPARATE,
    00771         STENCIL_MASK_SEPARATE,
    00773         LIGHT_ENABLE = 20,
    00774         LIGHT_AMBIENT,
    00775         LIGHT_DIFFUSE,
    00776         LIGHT_SPECULAR,
    00777         LIGHT_POSITION,
    00778         LIGHT_CONSTANT_ATTENUATION,
    00779         LIGHT_LINEAR_ATTENUATION,
    00780         LIGHT_QUADRATIC_ATTENUATION,
    00781         LIGHT_SPOT_CUTOFF,
    00782         LIGHT_SPOT_DIRECTION,
    00783         LIGHT_SPOT_EXPONENT = 30,
    00785         TEXTURE1D = 31,
    00786         TEXTURE2D,
    00787         TEXTURE3D,
    00788         TEXTURECUBE,
    00789         TEXTURERECT,
    00790         TEXTUREDEPTH,
    00791         TEXTURE1D_ENABLE,
    00792         TEXTURE2D_ENABLE,
    00793         TEXTURE3D_ENABLE,
    00794         TEXTURECUBE_ENABLE,
    00795         TEXTURERECT_ENABLE,
    00796         TEXTUREDEPTH_ENABLE,
    00797         TEXTURE_ENV_COLOR,
    00798         TEXTURE_ENV_MODE,
    00800         CLIP_PLANE = 45,
    00801         CLIP_PLANE_ENABLE,
    00802         BLEND_COLOR,
    00803         CLEAR_COLOR,
    00804         CLEAR_STENCIL,
    00805         CLEAR_DEPTH,
    00806         COLOR_MASK,
    00807         DEPTH_BOUNDS,
    00808         DEPTH_MASK,
    00809         DEPTH_RANGE,
    00811         FOG_DENSITY = 55,
    00812         FOG_START,
    00813         FOG_END,
    00814         FOG_COLOR,
    00815         LIGHT_MODEL_AMBIENT,
    00816         LIGHTING_ENABLE,
    00817         LINE_STIPPLE,
    00818         LINE_WIDTH,
    00820         MATERIAL_AMBIENT = 63,
    00821         MATERIAL_DIFFUSE,
    00822         MATERIAL_EMISSION,
    00823         MATERIAL_SHININESS,
    00824         MATERIAL_SPECULAR,
    00825         MODEL_VIEW_MATRIX,
    00826         POINT_DISTANCE_ATTENUATION,
    00827         POINT_FADE_THRESHOLD_SIZE,
    00828         POINT_SIZE,
    00829         POINT_SIZE_MIN,
    00830         POINT_SIZE_MAX,
    00832         POLYGON_OFFSET = 74,
    00833         PROJECTION_MATRIX,
    00834         SCISSOR,
    00835         STENCIL_MASK,
    00836         ALPHA_TEST_ENABLE,
    00837         AUTO_NORMAL_ENABLE,
    00838         BLEND_ENABLE,
    00839         COLOR_LOGIC_OP_ENABLE,
    00840         COLOR_MATERIAL_ENABLE,
    00841         CULL_FACE_ENABLE,
    00843         DEPTH_BOUNDS_ENABLE = 84,
    00844         DEPTH_CLAMP_ENABLE,
    00845         DEPTH_TEST_ENABLE,
    00846         DITHER_ENABLE,
    00847         FOG_ENABLE,
    00848         LIGHT_MODEL_LOCAL_VIEWER_ENABLE,
    00849         LIGHT_MODEL_TWO_SIDE_ENABLE,
    00850         LINE_SMOOTH_ENABLE,
    00851         LINE_STIPPLE_ENABLE,
    00852         LOGIC_OP_ENABLE,
    00853         MULTISAMPLE_ENABLE,
    00855         NORMALIZE_ENABLE = 95,
    00856         POINT_SMOOTH_ENABLE,
    00857         POLYGON_OFFSET_FILL_ENABLE,
    00858         POLYGON_OFFSET_LINE_ENABLE,
    00859         POLYGON_OFFSET_POINT_ENABLE,
    00860         POLYGON_SMOOTH_ENABLE,
    00861         POLYGON_STIPPLE_ENABLE,
    00862         RESCALE_NORMAL_ENABLE,
    00864         SAMPLE_ALPHA_TO_COVERAGE_ENABLE = 103,
    00865         SAMPLE_ALPHA_TO_ONE_ENABLE,
    00866         SAMPLE_COVERAGE_ENABLE,
    00867         SCISSOR_TEST_ENABLE,
    00868         STENCIL_TEST_ENABLE,
    00870         COUNT = 108,
    00871         INVALID
    00872     };
    00873
    00877     FCOLLADA_EXPORT State FromString(const char* value);
    00878     inline State FromString(const fm::string& value) { return FromString(value.c_str()); }
    00883     FCOLLADA_EXPORT const char* ToString(State state);
    00884 };
    00885
    00887 namespace FUDaeAccessor
    00888 {
    00891     extern const char* XY[3];
    00892     extern const char* XYZW[5];
    00893     extern const char* RGBA[5];
    00894     extern const char* STPQ[5];
    00895 }
    00896
    00897 #endif // _FU_DAE_ENUM_H_
    00898