Loading...
Searching...
No Matches
visibilityAPI.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 USDGEOM_GENERATED_VISIBILITYAPI_H
8#define USDGEOM_GENERATED_VISIBILITYAPI_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdGeom/api.h"
15#include "pxr/usd/usd/prim.h"
16#include "pxr/usd/usd/stage.h"
18
19#include "pxr/base/vt/value.h"
20
21#include "pxr/base/gf/vec3d.h"
22#include "pxr/base/gf/vec3f.h"
24
25#include "pxr/base/tf/token.h"
26#include "pxr/base/tf/type.h"
27
28PXR_NAMESPACE_OPEN_SCOPE
29
30class SdfAssetPath;
31
32// -------------------------------------------------------------------------- //
33// VISIBILITYAPI //
34// -------------------------------------------------------------------------- //
35
77{
78public:
82 static const UsdSchemaKind schemaKind = UsdSchemaKind::SingleApplyAPI;
83
88 explicit UsdGeomVisibilityAPI(const UsdPrim& prim=UsdPrim())
89 : UsdAPISchemaBase(prim)
90 {
91 }
92
96 explicit UsdGeomVisibilityAPI(const UsdSchemaBase& schemaObj)
97 : UsdAPISchemaBase(schemaObj)
98 {
99 }
100
102 USDGEOM_API
104
108 USDGEOM_API
109 static const TfTokenVector &
110 GetSchemaAttributeNames(bool includeInherited=true);
111
121 USDGEOM_API
123 Get(const UsdStagePtr &stage, const SdfPath &path);
124
125
142 USDGEOM_API
143 static bool
144 CanApply(const UsdPrim &prim, std::string *whyNot=nullptr);
145
161 USDGEOM_API
163 Apply(const UsdPrim &prim);
164
165protected:
169 USDGEOM_API
171
172private:
173 // needs to invoke _GetStaticTfType.
174 friend class UsdSchemaRegistry;
175 USDGEOM_API
176 static const TfType &_GetStaticTfType();
177
178 static bool _IsTypedSchema();
179
180 // override SchemaBase virtuals.
181 USDGEOM_API
182 const TfType &_GetTfType() const override;
183
184public:
185 // --------------------------------------------------------------------- //
186 // GUIDEVISIBILITY
187 // --------------------------------------------------------------------- //
214 USDGEOM_API
216
222 USDGEOM_API
223 UsdAttribute CreateGuideVisibilityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
224
225public:
226 // --------------------------------------------------------------------- //
227 // PROXYVISIBILITY
228 // --------------------------------------------------------------------- //
258 USDGEOM_API
260
266 USDGEOM_API
267 UsdAttribute CreateProxyVisibilityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
268
269public:
270 // --------------------------------------------------------------------- //
271 // RENDERVISIBILITY
272 // --------------------------------------------------------------------- //
303 USDGEOM_API
305
311 USDGEOM_API
312 UsdAttribute CreateRenderVisibilityAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
313
314public:
315 // ===================================================================== //
316 // Feel free to add custom code below this line, it will be preserved by
317 // the code generator.
318 //
319 // Just remember to:
320 // - Close the class declaration with };
321 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
322 // - Close the include guard with #endif
323 // ===================================================================== //
324 // --(BEGIN CUSTOM CODE)--
325
339 USDGEOM_API
341};
342
343PXR_NAMESPACE_CLOSE_SCOPE
344
345#endif
Contains an asset path and optional evaluated and resolved paths.
Definition: assetPath.h:78
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
TfType represents a dynamic runtime type.
Definition: type.h:48
The base class for all API schemas.
Definition: apiSchemaBase.h:99
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
UsdGeomVisibilityAPI introduces properties that can be used to author visibility opinions.
Definition: visibilityAPI.h:77
USDGEOM_API UsdAttribute CreateGuideVisibilityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetGuideVisibilityAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
virtual USDGEOM_API ~UsdGeomVisibilityAPI()
Destructor.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: visibilityAPI.h:82
USDGEOM_API UsdAttribute GetGuideVisibilityAttr() const
This attribute controls visibility for geometry with purpose "guide".
static USDGEOM_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
Returns true if this single-apply API schema can be applied to the given prim.
static USDGEOM_API UsdGeomVisibilityAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomVisibilityAPI holding the prim adhering to this schema at path on stage.
UsdGeomVisibilityAPI(const UsdSchemaBase &schemaObj)
Construct a UsdGeomVisibilityAPI on the prim held by schemaObj .
Definition: visibilityAPI.h:96
USDGEOM_API UsdAttribute CreateRenderVisibilityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetRenderVisibilityAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDGEOM_API UsdAttribute GetProxyVisibilityAttr() const
This attribute controls visibility for geometry with purpose "proxy".
static USDGEOM_API UsdGeomVisibilityAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given prim.
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDGEOM_API UsdAttribute CreateProxyVisibilityAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetProxyVisibilityAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute GetPurposeVisibilityAttr(const TfToken &purpose) const
Return the attribute that is used for expressing visibility opinions for the given purpose.
UsdGeomVisibilityAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomVisibilityAPI on UsdPrim prim .
Definition: visibilityAPI.h:88
USDGEOM_API UsdAttribute GetRenderVisibilityAttr() const
This attribute controls visibility for geometry with purpose "render".
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:117
The base class for all schema types in Usd.
Definition: schemaBase.h:39
Singleton registry that provides access to schema type information and the prim definitions for regis...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:152
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition: common.h:112
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440