Class: Stagecraft::Renderer::RenderList
- Inherits:
-
Object
- Object
- Stagecraft::Renderer::RenderList
- Defined in:
- lib/stagecraft/renderer/render_list.rb
Defined Under Namespace
Classes: Item
Instance Attribute Summary collapse
-
#ambient ⇒ Object
readonly
Returns the value of attribute ambient.
-
#culled_count ⇒ Object
readonly
Returns the value of attribute culled_count.
-
#lights ⇒ Object
readonly
Returns the value of attribute lights.
-
#opaque ⇒ Object
readonly
Returns the value of attribute opaque.
-
#transparent ⇒ Object
readonly
Returns the value of attribute transparent.
Instance Method Summary collapse
-
#initialize(scene, camera) ⇒ RenderList
constructor
A new instance of RenderList.
- #items ⇒ Object
Constructor Details
#initialize(scene, camera) ⇒ RenderList
Returns a new instance of RenderList.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/stagecraft/renderer/render_list.rb', line 10 def initialize(scene, camera) @opaque = [] @transparent = [] @lights = [] @ambient = Larb::Vec3.new @culled_count = 0 @camera = camera @frustum = Bounding::Frustum.from_matrix(camera.view_projection_matrix) collect(scene, true) sort! end |
Instance Attribute Details
#ambient ⇒ Object (readonly)
Returns the value of attribute ambient.
8 9 10 |
# File 'lib/stagecraft/renderer/render_list.rb', line 8 def ambient @ambient end |
#culled_count ⇒ Object (readonly)
Returns the value of attribute culled_count.
8 9 10 |
# File 'lib/stagecraft/renderer/render_list.rb', line 8 def culled_count @culled_count end |
#lights ⇒ Object (readonly)
Returns the value of attribute lights.
8 9 10 |
# File 'lib/stagecraft/renderer/render_list.rb', line 8 def lights @lights end |
#opaque ⇒ Object (readonly)
Returns the value of attribute opaque.
8 9 10 |
# File 'lib/stagecraft/renderer/render_list.rb', line 8 def opaque @opaque end |
#transparent ⇒ Object (readonly)
Returns the value of attribute transparent.
8 9 10 |
# File 'lib/stagecraft/renderer/render_list.rb', line 8 def transparent @transparent end |
Instance Method Details
#items ⇒ Object
22 23 24 |
# File 'lib/stagecraft/renderer/render_list.rb', line 22 def items [*opaque, *transparent] end |