MCPcopy Create free account
hub / github.com/OGRECave/ogre / getCompareFunction

Method getCompareFunction

OgreMain/src/OgreScriptTranslator.cpp:676–711  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

674 }
675 //-------------------------------------------------------------------------
676 bool ScriptTranslator::getCompareFunction(const AbstractNodePtr &node, CompareFunction *func)
677 {
678 if(node->type != ANT_ATOM)
679 return false;
680 AtomAbstractNode *atom = (AtomAbstractNode*)node.get();
681 switch(atom->id)
682 {
683 case ID_ALWAYS_FAIL:
684 *func = CMPF_ALWAYS_FAIL;
685 break;
686 case ID_ALWAYS_PASS:
687 *func = CMPF_ALWAYS_PASS;
688 break;
689 case ID_LESS:
690 *func = CMPF_LESS;
691 break;
692 case ID_LESS_EQUAL:
693 *func = CMPF_LESS_EQUAL;
694 break;
695 case ID_EQUAL:
696 *func = CMPF_EQUAL;
697 break;
698 case ID_NOT_EQUAL:
699 *func = CMPF_NOT_EQUAL;
700 break;
701 case ID_GREATER_EQUAL:
702 *func = CMPF_GREATER_EQUAL;
703 break;
704 case ID_GREATER:
705 *func = CMPF_GREATER;
706 break;
707 default:
708 return false;
709 }
710 return true;
711 }
712 //-------------------------------------------------------------------------
713 bool ScriptTranslator::getMatrix4(AbstractNodeList::const_iterator i, AbstractNodeList::const_iterator end, Matrix4 *m)
714 {

Callers 3

_setSamplerMethod · 0.80
_setSamplerMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected