MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / getColour

Method getColour

OgreMain/src/OgreScriptTranslator.cpp:242–275  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

240 }
241 //-------------------------------------------------------------------------
242 bool ScriptTranslator::getColour(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, ColourValue *result, int maxEntries)
243 {
244 int n = 0;
245 while(i != end && n < maxEntries)
246 {
247 float v = 0;
248 if(getFloat(*i, &v))
249 {
250 switch(n)
251 {
252 case 0:
253 result->r = v;
254 break;
255 case 1:
256 result->g = v;
257 break;
258 case 2:
259 result->b = v;
260 break;
261 case 3:
262 result->a = v;
263 break;
264 }
265 }
266 else
267 {
268 return false;
269 }
270 ++n;
271 ++i;
272 }
273 // return error if we found less than rgb before end, unless constrained
274 return (n >= 3 || n == maxEntries);
275 }
276 //-------------------------------------------------------------------------
277 bool ScriptTranslator::getSceneBlendFactor(const Ogre::AbstractNodePtr &node, Ogre::SceneBlendFactor *sbf)
278 {

Callers 4

saveMaterialMethod · 0.80
doGetMethod · 0.80
doGetMethod · 0.80
streamSubmeshMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected