Class: OpenUSD::PseudoRoot
- Inherits:
-
Object
- Object
- OpenUSD::PseudoRoot
- Defined in:
- lib/openusd/prim.rb
Overview
Synthetic root for a Stage's root prims.
Instance Attribute Summary collapse
-
#stage ⇒ Object
readonly
Returns the value of attribute stage.
Instance Method Summary collapse
-
#children ⇒ Array<Prim>
Active root prims.
-
#initialize(stage) ⇒ PseudoRoot
constructor
A new instance of PseudoRoot.
-
#name ⇒ String
Empty pseudo-root name.
- #parent ⇒ nil
-
#path ⇒ Path
Pseudo-root path.
- #type_name ⇒ nil
Constructor Details
#initialize(stage) ⇒ PseudoRoot
Returns a new instance of PseudoRoot.
122 123 124 |
# File 'lib/openusd/prim.rb', line 122 def initialize(stage) @stage = stage end |
Instance Attribute Details
#stage ⇒ Object (readonly)
Returns the value of attribute stage.
120 121 122 |
# File 'lib/openusd/prim.rb', line 120 def stage @stage end |
Instance Method Details
#children ⇒ Array<Prim>
Returns active root prims.
147 148 149 |
# File 'lib/openusd/prim.rb', line 147 def children stage.root_paths.filter_map { |root_path| stage.prim_at(root_path) } end |
#name ⇒ String
Returns empty pseudo-root name.
132 133 134 |
# File 'lib/openusd/prim.rb', line 132 def name "" end |
#parent ⇒ nil
142 143 144 |
# File 'lib/openusd/prim.rb', line 142 def parent nil end |
#path ⇒ Path
Returns pseudo-root path.
127 128 129 |
# File 'lib/openusd/prim.rb', line 127 def path Path.parse("/") end |
#type_name ⇒ nil
137 138 139 |
# File 'lib/openusd/prim.rb', line 137 def type_name nil end |