Class: ShatteredOgre
Class Method Summary collapse
- .create_root(plugins = "ogrerb_plugins.cfg", configs = "ogrerb_defaults.save", log = "ogrerb.log") ⇒ Object
-
.translate_to_scene_type(symbol) ⇒ Object
Translates from symbols to scene manager types.
Class Method Details
.create_root(plugins = "ogrerb_plugins.cfg", configs = "ogrerb_defaults.save", log = "ogrerb.log") ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/shattered_ogrerb/base.rb', line 3 def self.create_root(plugins="ogrerb_plugins.cfg", configs="ogrerb_defaults.save", log="ogrerb.log") # Disable the default stdout. All ogre errors redirect to the ogre log. @@log_manager = Ogre::LogManager.new @@log_manager.create_log(log,true,false,false) # Create our core and load platform managers @@root = Ogre::Root.new(plugins, configs, log) return @@root end |
.translate_to_scene_type(symbol) ⇒ Object
Translates from symbols to scene manager types. Valid options are: :general => ST_GENERIC :terrain => ST_EXTERIOR_CLOSE
:nature => ST_EXTERIOR_FAR
:indoor => ST_INTERIOR
:nature_paging => ST_EXTERIOR_REAL_FAR
19 20 21 22 23 24 25 26 |
# File 'lib/shattered_ogrerb/base.rb', line 19 def self.translate_to_scene_type( symbol ) return Ogre::ST_GENERIC if(symbol == :general) return Ogre::ST_EXTERIOR_CLOSE if(symbol == :terrain) return Ogre::ST_EXTERIOR_FAR if(symbol == :nature) return Ogre::ST_EXTERIOR_REAL_FAR if(symbol == :paging) return Ogre::ST_INTERIOR if(symbol == :indoor) raise StandardError, "#{symbol} is not a valid scene manager type" end |