diff --git a/lib/linguist/heuristics.rb b/lib/linguist/heuristics.rb index a6a7f56e..97c1015a 100644 --- a/lib/linguist/heuristics.rb +++ b/lib/linguist/heuristics.rb @@ -70,7 +70,7 @@ module Linguist end disambiguate "Objective-C", "C++", "C" do |data| - if (/@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data)) + if (/^[ \t]*@(interface|class|protocol|property|end|synchronised|selector|implementation)\b/.match(data)) Language["Objective-C"] elsif (/^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>/.match(data) || /^\s*template\s*_n`, + * scale it to match dimensions and translate the node to pos + * @param sceneMgr the scene manager to use + */ + virtual void setup(Ogre::SceneManager* sceneMgr); + + /** + * @brief the update method + * @details this method should be called on each world update. + * Even though the method is necessary declared, the main impl of + * a static entity should be empty since it is not updated by physics + * However, a Dynamic entity should implement this function in order to: + * 1) Get from the physics engine the actor position in the physic world + * 2) Update the OgreEntity position and rotation from the previous actor + * @return whether it was successful or not, if falsey engine should stop + */ + virtual bool update(void); + + protected: + std::string mMesh = "cube.mesh"; + std::string mId; + std::string mMaterial; + Ogre::Vector3 mDimensions; + Ogre::Vector3 mPosition; + Ogre::Entity* mEntity; + Ogre::SceneNode* mNode; + + }; +} + + +#endif \ No newline at end of file