17 #ifndef __H__OBJ_PARSER_MTL_GRAMMAR__H__
18 #define __H__OBJ_PARSER_MTL_GRAMMAR__H__
20 #include "MTLGrammarSkipper.hpp"
21 #include "OBJMaterial.hpp"
37 class MTLGrammar :
public qi::grammar<OBJIterator, MTLSkipper>
43 void resetCurrentTexture();
44 void finishCurrentMaterial();
52 void setupGeneralRules();
53 void setupNewMaterialRules();
54 void setupColorIlluminationRules();
55 void setupTextureMapRules();
56 void setupTextureMapFlagRules();
57 void setupReflectionMapRules();
66 qi::rule<OBJIterator, MTLSkipper> ruleStart;
67 qi::rule<OBJIterator, MTLSkipper> ruleNewMaterial;
68 qi::rule<OBJIterator, MTLSkipper> ruleColorIllumination;
69 qi::rule<OBJIterator, MTLSkipper> ruleTextureMap;
70 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMap;
75 qi::rule<OBJIterator, std::string(), MTLSkipper> ruleString;
76 qi::rule<OBJIterator, std::string(), MTLSkipper> ruleStringNoSkip;
77 qi::rule<OBJIterator, OBJVector2(), MTLSkipper> ruleVector2Data;
78 qi::rule<OBJIterator, OBJVector3(), MTLSkipper> ruleVector3Data;
85 qi::rule<OBJIterator, MTLSkipper> ruleColor;
86 qi::rule<OBJIterator, MTLSkipper> ruleIllumination;
87 qi::rule<OBJIterator, OBJMaterialPropertyRFL(), MTLSkipper> ruleRFL;
89 qi::rule<OBJIterator, MTLSkipper> ruleAmbientRGB;
90 qi::rule<OBJIterator, MTLSkipper> ruleAmbientSpectral;
91 qi::rule<OBJIterator, MTLSkipper> ruleAmbientXYZ;
92 qi::rule<OBJIterator, MTLSkipper> ruleAmbient;
94 qi::rule<OBJIterator, MTLSkipper> ruleDiffuseRGB;
95 qi::rule<OBJIterator, MTLSkipper> ruleDiffuseSpectral;
96 qi::rule<OBJIterator, MTLSkipper> ruleDiffuseXYZ;
97 qi::rule<OBJIterator, MTLSkipper> ruleDiffuse;
99 qi::rule<OBJIterator, MTLSkipper> ruleSpecularRGB;
100 qi::rule<OBJIterator, MTLSkipper> ruleSpecularSpectral;
101 qi::rule<OBJIterator, MTLSkipper> ruleSpecularXYZ;
102 qi::rule<OBJIterator, MTLSkipper> ruleSpecular;
104 qi::rule<OBJIterator, MTLSkipper> ruleEmissiveRGB;
105 qi::rule<OBJIterator, MTLSkipper> ruleEmissiveSpectral;
106 qi::rule<OBJIterator, MTLSkipper> ruleEmissiveXYZ;
107 qi::rule<OBJIterator, MTLSkipper> ruleEmissive;
109 qi::rule<OBJIterator, MTLSkipper> ruleTransmissionRGB;
110 qi::rule<OBJIterator, MTLSkipper> ruleTransmissionSpectral;
111 qi::rule<OBJIterator, MTLSkipper> ruleTransmissionXYZ;
112 qi::rule<OBJIterator, MTLSkipper> ruleTransmission;
114 qi::rule<OBJIterator, bool(), MTLSkipper> ruleDissolveHalo;
115 qi::rule<OBJIterator, OBJMaterialDissolve(), MTLSkipper> ruleDissolveData;
116 qi::rule<OBJIterator, MTLSkipper> ruleDissolve;
118 qi::rule<OBJIterator, MTLSkipper> ruleTransparency;
120 qi::rule<OBJIterator, MTLSkipper> ruleSpecularExponent;
121 qi::rule<OBJIterator, MTLSkipper> ruleSharpness;
122 qi::rule<OBJIterator, MTLSkipper> ruleOpticalDensity;
129 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlags;
130 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapBody;
131 qi::rule<OBJIterator, MTLSkipper> ruleTextureAntiAliasing;
135 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapAmbient;
136 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapDiffuse;
137 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapSpecular;
138 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapSpecularExponent;
139 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapEmissive;
140 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapDissolve;
141 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapDecal;
142 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapDisplacement;
143 qi::rule<OBJIterator, MTLSkipper> ruleTextureMapBump;
147 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagBlendU;
148 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagBlendV;
149 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagColorCorrection;
150 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagClamp;
151 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagOffset;
152 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagScale;
153 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagTurbulence;
154 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagRangeMod;
155 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagResolution;
156 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagBumpMultiplier;
157 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagBoost;
158 qi::rule<OBJIterator, MTLSkipper> ruleTextureFlagimfchan;
163 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapSphere;
164 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapCubeTop;
165 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapCubeBottom;
166 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapCubeFront;
167 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapCubeBack;
168 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapCubeLeft;
169 qi::rule<OBJIterator, MTLSkipper> ruleReflectionMapCubeRight;
Definition: MTLGrammar.hpp:37
qi::rule< OBJIterator, bool(), MTLSkipper > ruleBoolOnOffFalse
Parses flag value "on" and "off". If none specified, returns FALSE by default.
Definition: MTLGrammar.hpp:80
qi::rule< OBJIterator, bool(), MTLSkipper > ruleBoolOnOffTrue
Parses flag value "on" and "off". If none specified, returns TRUE by default.
Definition: MTLGrammar.hpp:79
Definition: OBJTextureDescriptor.hpp:46
Definition: OBJMaterial.hpp:122
OBJMaterial m_CurrentMaterial
The current material being built by the parser.
Definition: MTLGrammar.hpp:175
Definition: MTLGrammarSkipper.hpp:30
Definition: OBJState.hpp:37