Loading...
Searching...
No Matches
heuristic.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 USDLOD_GENERATED_HEURISTIC_H
8#define USDLOD_GENERATED_HEURISTIC_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdLod/api.h"
14#include "pxr/usd/usd/typed.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// LODHEURISTIC //
34// -------------------------------------------------------------------------- //
35
53{
54public:
59
64 explicit UsdLodHeuristic(const UsdPrim& prim=UsdPrim())
65 : UsdTyped(prim)
66 {
67 }
68
72 explicit UsdLodHeuristic(const UsdSchemaBase& schemaObj)
73 : UsdTyped(schemaObj)
74 {
75 }
76
78 USDLOD_API
80
84 USDLOD_API
85 static const TfTokenVector &
86 GetSchemaAttributeNames(bool includeInherited=true);
87
97 USDLOD_API
98 static UsdLodHeuristic
99 Get(const UsdStagePtr &stage, const SdfPath &path);
100
101
102protected:
106 USDLOD_API
108
109private:
110 // needs to invoke _GetStaticTfType.
111 friend class UsdSchemaRegistry;
112 USDLOD_API
113 static const TfType &_GetStaticTfType();
114
115 static bool _IsTypedSchema();
116
117 // override SchemaBase virtuals.
118 USDLOD_API
119 const TfType &_GetTfType() const override;
120
121public:
122 // --------------------------------------------------------------------- //
123 // LODDOMAIN
124 // --------------------------------------------------------------------- //
137 USDLOD_API
139
145 USDLOD_API
146 UsdAttribute CreateLodDomainAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
147
148public:
149 // ===================================================================== //
150 // Feel free to add custom code below this line, it will be preserved by
151 // the code generator.
152 //
153 // Just remember to:
154 // - Close the class declaration with };
155 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
156 // - Close the include guard with #endif
157 // ===================================================================== //
158 // --(BEGIN CUSTOM CODE)--
159};
160
161PXR_NAMESPACE_CLOSE_SCOPE
162
163#endif
Contains an asset path and optional evaluated and resolved paths.
Definition assetPath.h:79
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
TfType represents a dynamic runtime type.
Definition type.h:48
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition attribute.h:183
Base class for LOD Heuristics.
Definition heuristic.h:53
virtual USDLOD_API ~UsdLodHeuristic()
Destructor.
USDLOD_API UsdAttribute CreateLodDomainAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetLodDomainAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition heuristic.h:58
USDLOD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static USDLOD_API UsdLodHeuristic Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdLodHeuristic holding the prim adhering to this schema at path on stage.
USDLOD_API UsdAttribute GetLodDomainAttr() const
The "domain" of this heuristic.
static USDLOD_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...
UsdLodHeuristic(const UsdPrim &prim=UsdPrim())
Construct a UsdLodHeuristic on UsdPrim prim .
Definition heuristic.h:64
UsdLodHeuristic(const UsdSchemaBase &schemaObj)
Construct a UsdLodHeuristic on the prim held by schemaObj .
Definition heuristic.h:72
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...
The base class for all typed schemas (those that can impart a typeName to a UsdPrim),...
Definition typed.h:45
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition value.h:90
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
Definition common.h:112
@ AbstractTyped
Represents a non-concrete typed schema.
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