Class: Assimp::RawScene
- Inherits:
-
Object
- Object
- Assimp::RawScene
- Defined in:
- lib/assimp/raw_scene.rb
Defined Under Namespace
Classes: View
Instance Method Summary collapse
-
#initialize(pointer) ⇒ RawScene
constructor
A new instance of RawScene.
- #invalidate! ⇒ Object
- #materials ⇒ Object
- #meshes ⇒ Object
- #native ⇒ Object
- #pointer ⇒ Object
- #root ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(pointer) ⇒ RawScene
Returns a new instance of RawScene.
42 43 44 45 |
# File 'lib/assimp/raw_scene.rb', line 42 def initialize(pointer) @pointer = pointer @valid = true end |
Instance Method Details
#invalidate! ⇒ Object
80 81 82 83 84 |
# File 'lib/assimp/raw_scene.rb', line 80 def invalidate! @valid = false @pointer = nil self end |
#materials ⇒ Object
68 69 70 71 72 73 |
# File 'lib/assimp/raw_scene.rb', line 68 def materials source = native_struct NativeReader.pointers(source[:materials], source[:num_materials]).map do |item| View.new(self, Native::Material, item) end end |
#meshes ⇒ Object
61 62 63 64 65 66 |
# File 'lib/assimp/raw_scene.rb', line 61 def meshes source = native_struct NativeReader.pointers(source[:meshes], source[:num_meshes]).map do |item| View.new(self, Native::Mesh, item) end end |
#native ⇒ Object
51 52 53 54 |
# File 'lib/assimp/raw_scene.rb', line 51 def native ensure_valid! View.new(self, Native::Scene, @pointer) end |
#pointer ⇒ Object
56 57 58 59 |
# File 'lib/assimp/raw_scene.rb', line 56 def pointer ensure_valid! @pointer end |
#root ⇒ Object
75 76 77 78 |
# File 'lib/assimp/raw_scene.rb', line 75 def root node_pointer = native_struct[:root_node] node_pointer.null? ? nil : View.new(self, Native::Node, node_pointer) end |
#valid? ⇒ Boolean
47 48 49 |
# File 'lib/assimp/raw_scene.rb', line 47 def valid? @valid end |