HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
XUSD_LockedGeo.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Side Effects Software Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __XUSD_LockedGeo_h__
19 #define __XUSD_LockedGeo_h__
20 
21 #include "HUSD_API.h"
22 #include <GU/GU_DetailHandle.h>
23 #include <UT/UT_IntrusivePtr.h>
24 #include <UT/UT_StringHolder.h>
25 #include <pxr/usd/sdf/fileFormat.h>
26 
28 
30 
31 // This object contains a GU_Detail created by a SOP node which is likely to
32 // be loaded into USD through our BGEO SdfFileFormat plugin (it's possibly it
33 // won't actually be loaded if the SOP geometry is referenced by an unloaded
34 // payload arc, but we have no way to know if or when that payload might be
35 // loaded).
36 //
37 // This object should only be create by the XUSD_LockedGeoRegistry, and
38 // any XUSD_Data that might load this SOP layer needs to keep a shared pointer
39 // to this object as sidecar data to the USD stage in XUSD_Data.
40 
42  public UT_IntrusiveRefCounter<XUSD_LockedGeo>,
43  public UT_NonCopyable
44 {
45 public:
46  ~XUSD_LockedGeo();
47 
48 private:
49  friend class XUSD_LockedGeoRegistry;
50 
51  XUSD_LockedGeo(const UT_StringHolder &nodepath,
52  const XUSD_LockedGeoArgs &args,
53  const GU_DetailHandle &gdh);
54 
55  bool setGdh(const GU_DetailHandle &gdh);
56  GU_DetailHandle getGdh();
57 
58  bool matches(const UT_StringRef &nodepath,
59  const XUSD_LockedGeoArgs &args);
60  std::string getLayerIdentifier() const;
61 
62  UT_StringHolder myNodePath;
63  XUSD_LockedGeoArgs myCookArgs;
64  GU_DetailHandle myGdh;
65 };
66 
68 
70 
71 #endif
72 
PXR_NAMESPACE_OPEN_SCOPE typedef SdfFileFormat::FileFormatArguments XUSD_LockedGeoArgs
#define HUSD_API
Definition: HUSD_API.h:32
A reference counter base class for use with UT_IntrusivePtr.
UT_IntrusivePtr< XUSD_LockedGeo > XUSD_LockedGeoPtr
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
Wrapper around hboost::intrusive_ptr.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1375
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:91
**If you just want to fire and args
Definition: thread.h:615
std::map< std::string, std::string > FileFormatArguments
Definition: fileFormat.h:119