Sha256: b26312c2d6c8a385afd0f60e5fbc8c9c28895d3b198349a51d603661829287ea

Contents?: true

Size: 645 Bytes

Versions: 7

Compression:

Stored size: 645 Bytes

Contents

#!/usr/bin/ruby -w

$: << File.dirname(__FILE__) + "/.."
require 'ogre'
require 'application'

include Ogre

class SkyPlaneApplication < Application
  def create_scene
    scene_manager.set_ambient_light ColourValue.new(0.5, 0.5, 0.5)
  
    plane = Plane.new
    plane.d = 5000
    plane.normal = -Vector3.UNIT_Y
    scene_manager.set_sky_plane(true, plane, "SpaceSkyPlane", 10000, 3)

    light = scene_manager.create_light("MainLight")
    light.set_position(20, 80, 50)

    dragon = scene_manager.create_entity("dragon", "dragon.mesh")
    scene_manager.root_scene_node.attach_object(dragon)
  end
end

app = SkyPlaneApplication.new
app.go

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
ogre.rb-0.2-i686-linux samples/sky_plane.rb
ogre.rb-0.2-i386-mswin32 samples/sky_plane.rb
ogre.rb-0.1-i686-linux samples/sky_plane.rb
ogre.rb-0.1-i386-mswin32 samples/sky_plane.rb
ogre.rb-0.2-x86_64-linux samples/sky_plane.rb
shattered_ogrerb-0.5.0.2 vendor/ogrerb/samples/sky_plane.rb
shattered_ogrerb-0.5.1 vendor/ogrerb/samples/sky_plane.rb