This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
layerTree.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_SDF_LAYER_TREE_H
8#define PXR_USD_SDF_LAYER_TREE_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/sdf/api.h"
16
17#include <vector>
18
19PXR_NAMESPACE_OPEN_SCOPE
20
21// Layer tree forward declarations.
22class SdfLayerTree;
24typedef std::vector<SdfLayerTreeHandle> SdfLayerTreeHandleVector;
25
26SDF_DECLARE_HANDLES(SdfLayer);
27
40class SdfLayerTree : public TfRefBase, public TfWeakBase {
41 SdfLayerTree(const SdfLayerTree&) = delete;
42 SdfLayerTree& operator=(const SdfLayerTree&) = delete;
43public:
45 SDF_API
47 New( const SdfLayerHandle & layer,
48 const SdfLayerTreeHandleVector & childTrees,
49 const SdfLayerOffset & cumulativeOffset = SdfLayerOffset() );
50
52 SDF_API const SdfLayerHandle & GetLayer() const;
53
55 SDF_API const SdfLayerOffset & GetOffset() const;
56
58 SDF_API const SdfLayerTreeHandleVector & GetChildTrees() const;
59
60private:
61 SdfLayerTree( const SdfLayerHandle & layer,
62 const SdfLayerTreeHandleVector & childTrees,
63 const SdfLayerOffset & cumulativeOffset );
64
65private:
66 const SdfLayerHandle _layer;
67 const SdfLayerOffset _offset;
68 const SdfLayerTreeHandleVector _childTrees;
69};
70
71PXR_NAMESPACE_CLOSE_SCOPE
72
73#endif // PXR_USD_SDF_LAYER_TREE_H
A scene description container that can combine with other such containers to form simple component as...
Definition: layer.h:84
Represents a time offset and scale between layers.
Definition: layerOffset.h:44
A SdfLayerTree is an immutable tree structure representing a sublayer stack and its recursive structu...
Definition: layerTree.h:40
SDF_API const SdfLayerTreeHandleVector & GetChildTrees() const
Returns the children of this tree node.
static SDF_API SdfLayerTreeHandle New(const SdfLayerHandle &layer, const SdfLayerTreeHandleVector &childTrees, const SdfLayerOffset &cumulativeOffset=SdfLayerOffset())
Create a new layer tree node.
SDF_API const SdfLayerHandle & GetLayer() const
Returns the layer handle this tree node represents.
SDF_API const SdfLayerOffset & GetOffset() const
Returns the cumulative layer offset from the root of the tree.
Enable a concrete base class for use with TfRefPtr.
Definition: refBase.h:56
Reference-counted smart pointer utility class.
Definition: refPtr.h:590
Enable a concrete base class for use with TfWeakPtr.
Definition: weakBase.h:124