Loading...
Searching...
No Matches
basisCurves.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_BASISCURVES_H
8#define USDGEOM_GENERATED_BASISCURVES_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// BASISCURVES //
34// -------------------------------------------------------------------------- //
35
247{
248public:
252 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
253
258 explicit UsdGeomBasisCurves(const UsdPrim& prim=UsdPrim())
259 : UsdGeomCurves(prim)
260 {
261 }
262
266 explicit UsdGeomBasisCurves(const UsdSchemaBase& schemaObj)
267 : UsdGeomCurves(schemaObj)
268 {
269 }
270
272 USDGEOM_API
274
278 USDGEOM_API
279 static const TfTokenVector &
280 GetSchemaAttributeNames(bool includeInherited=true);
281
291 USDGEOM_API
292 static UsdGeomBasisCurves
293 Get(const UsdStagePtr &stage, const SdfPath &path);
294
317 USDGEOM_API
318 static UsdGeomBasisCurves
319 Define(const UsdStagePtr &stage, const SdfPath &path);
320
321protected:
325 USDGEOM_API
327
328private:
329 // needs to invoke _GetStaticTfType.
330 friend class UsdSchemaRegistry;
331 USDGEOM_API
332 static const TfType &_GetStaticTfType();
333
334 static bool _IsTypedSchema();
335
336 // override SchemaBase virtuals.
337 USDGEOM_API
338 const TfType &_GetTfType() const override;
339
340public:
341 // --------------------------------------------------------------------- //
342 // TYPE
343 // --------------------------------------------------------------------- //
354 USDGEOM_API
356
362 USDGEOM_API
363 UsdAttribute CreateTypeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
364
365public:
366 // --------------------------------------------------------------------- //
367 // BASIS
368 // --------------------------------------------------------------------- //
381 USDGEOM_API
383
389 USDGEOM_API
390 UsdAttribute CreateBasisAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
391
392public:
393 // --------------------------------------------------------------------- //
394 // WRAP
395 // --------------------------------------------------------------------- //
409 USDGEOM_API
411
417 USDGEOM_API
418 UsdAttribute CreateWrapAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
419
420public:
421 // ===================================================================== //
422 // Feel free to add custom code below this line, it will be preserved by
423 // the code generator.
424 //
425 // Just remember to:
426 // - Close the class declaration with };
427 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
428 // - Close the include guard with #endif
429 // ===================================================================== //
430 // --(BEGIN CUSTOM CODE)--
431
434
435 typedef std::vector< std::pair<TfToken, size_t> > ComputeInterpolationInfo;
436
443 USDGEOM_API
445 const UsdTimeCode& timeCode,
446 ComputeInterpolationInfo* info=NULL) const;
447
452 USDGEOM_API
453 size_t ComputeUniformDataSize(const UsdTimeCode& timeCode) const;
454
459 USDGEOM_API
460 size_t ComputeVaryingDataSize(const UsdTimeCode& timeCode) const;
461
466 USDGEOM_API
467 size_t ComputeVertexDataSize(const UsdTimeCode& timeCode) const;
468
471 USDGEOM_API
472 VtIntArray ComputeSegmentCounts(const UsdTimeCode& timeCode) const;
473
475};
476
477PXR_NAMESPACE_CLOSE_SCOPE
478
479#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
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:183
BasisCurves are a batched curve representation analogous to the classic RIB definition via Basis and ...
Definition: basisCurves.h:247
static USDGEOM_API UsdGeomBasisCurves Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDGEOM_API size_t ComputeVertexDataSize(const UsdTimeCode &timeCode) const
Computes the expected size for data with "vertex" interpolation.
USDGEOM_API UsdAttribute CreateBasisAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetBasisAttr(), 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: basisCurves.h:252
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDGEOM_API UsdAttribute CreateWrapAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetWrapAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdGeomBasisCurves(const UsdSchemaBase &schemaObj)
Construct a UsdGeomBasisCurves on the prim held by schemaObj .
Definition: basisCurves.h:266
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 GetWrapAttr() const
If wrap is set to periodic, the curve when rendered will repeat the initial vertices (dependent on th...
USDGEOM_API UsdAttribute GetBasisAttr() const
The basis specifies the vstep and matrix used for cubic interpolation.
USDGEOM_API UsdAttribute CreateTypeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetTypeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API size_t ComputeVaryingDataSize(const UsdTimeCode &timeCode) const
Computes the expected size for data with "varying" interpolation.
static USDGEOM_API UsdGeomBasisCurves Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomBasisCurves holding the prim adhering to this schema at path on stage.
UsdGeomBasisCurves(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomBasisCurves on UsdPrim prim .
Definition: basisCurves.h:258
USDGEOM_API VtIntArray ComputeSegmentCounts(const UsdTimeCode &timeCode) const
Computes the segment counts of the curves based on their vertex counts from the curveVertexCounts att...
USDGEOM_API UsdAttribute GetTypeAttr() const
Linear curves interpolate linearly between two vertices.
USDGEOM_API size_t ComputeUniformDataSize(const UsdTimeCode &timeCode) const
Computes the expected size for data with "uniform" interpolation.
virtual USDGEOM_API ~UsdGeomBasisCurves()
Destructor.
USDGEOM_API TfToken ComputeInterpolationForSize(size_t n, const UsdTimeCode &timeCode, ComputeInterpolationInfo *info=NULL) const
Computes interpolation token for n.
Base class for UsdGeomBasisCurves, UsdGeomNurbsCurves, and UsdGeomHermiteCurves.
Definition: curves.h:59
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...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
Definition: timeCode.h:72
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