Class: OpenUSD::Composition
- Inherits:
-
Object
- Object
- OpenUSD::Composition
- Defined in:
- lib/openusd/composition.rb
Overview
Builds the v1 root/sublayer/reference composition index.
Defined Under Namespace
Classes: VariantOpinion
Instance Attribute Summary collapse
-
#layer_cache ⇒ Object
readonly
Returns the value of attribute layer_cache.
-
#layers ⇒ Object
readonly
Returns the value of attribute layers.
-
#resolver ⇒ Object
readonly
Returns the value of attribute resolver.
-
#root_layer ⇒ Object
readonly
Returns the value of attribute root_layer.
Instance Method Summary collapse
-
#build ⇒ Object
Map absolute prim paths to opinions in strongest-to-weakest order.
-
#initialize(root_layer, resolver:, layer_cache: {}) ⇒ Composition
constructor
A new instance of Composition.
Constructor Details
#initialize(root_layer, resolver:, layer_cache: {}) ⇒ Composition
Returns a new instance of Composition.
19 20 21 22 23 24 25 |
# File 'lib/openusd/composition.rb', line 19 def initialize(root_layer, resolver:, layer_cache: {}) @root_layer = root_layer @resolver = resolver @layer_cache = layer_cache @layer_cache[layer_key(root_layer)] = root_layer @layers = [] end |
Instance Attribute Details
#layer_cache ⇒ Object (readonly)
Returns the value of attribute layer_cache.
17 18 19 |
# File 'lib/openusd/composition.rb', line 17 def layer_cache @layer_cache end |
#layers ⇒ Object (readonly)
Returns the value of attribute layers.
17 18 19 |
# File 'lib/openusd/composition.rb', line 17 def layers @layers end |
#resolver ⇒ Object (readonly)
Returns the value of attribute resolver.
17 18 19 |
# File 'lib/openusd/composition.rb', line 17 def resolver @resolver end |
#root_layer ⇒ Object (readonly)
Returns the value of attribute root_layer.
17 18 19 |
# File 'lib/openusd/composition.rb', line 17 def root_layer @root_layer end |
Instance Method Details
#build ⇒ Object
Map absolute prim paths to opinions in strongest-to-weakest order.
28 29 30 31 |
# File 'lib/openusd/composition.rb', line 28 def build @layers = [] compose_layer(root_layer, []) end |