Loading...
Searching...
No Matches
spatialAudio.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 USDMEDIA_GENERATED_SPATIALAUDIO_H
8#define USDMEDIA_GENERATED_SPATIALAUDIO_H
9
11
12#include "pxr/pxr.h"
13#include "pxr/usd/usdMedia/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// SPATIALAUDIO //
34// -------------------------------------------------------------------------- //
35
76{
77public:
81 static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;
82
87 explicit UsdMediaSpatialAudio(const UsdPrim& prim=UsdPrim())
88 : UsdGeomXformable(prim)
89 {
90 }
91
95 explicit UsdMediaSpatialAudio(const UsdSchemaBase& schemaObj)
96 : UsdGeomXformable(schemaObj)
97 {
98 }
99
101 USDMEDIA_API
103
107 USDMEDIA_API
108 static const TfTokenVector &
109 GetSchemaAttributeNames(bool includeInherited=true);
110
120 USDMEDIA_API
122 Get(const UsdStagePtr &stage, const SdfPath &path);
123
146 USDMEDIA_API
148 Define(const UsdStagePtr &stage, const SdfPath &path);
149
150protected:
154 USDMEDIA_API
156
157private:
158 // needs to invoke _GetStaticTfType.
159 friend class UsdSchemaRegistry;
160 USDMEDIA_API
161 static const TfType &_GetStaticTfType();
162
163 static bool _IsTypedSchema();
164
165 // override SchemaBase virtuals.
166 USDMEDIA_API
167 const TfType &_GetTfType() const override;
168
169public:
170 // --------------------------------------------------------------------- //
171 // FILEPATH
172 // --------------------------------------------------------------------- //
188 USDMEDIA_API
190
196 USDMEDIA_API
197 UsdAttribute CreateFilePathAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
198
199public:
200 // --------------------------------------------------------------------- //
201 // AURALMODE
202 // --------------------------------------------------------------------- //
222 USDMEDIA_API
224
230 USDMEDIA_API
231 UsdAttribute CreateAuralModeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
232
233public:
234 // --------------------------------------------------------------------- //
235 // PLAYBACKMODE
236 // --------------------------------------------------------------------- //
263 USDMEDIA_API
265
271 USDMEDIA_API
272 UsdAttribute CreatePlaybackModeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
273
274public:
275 // --------------------------------------------------------------------- //
276 // STARTTIME
277 // --------------------------------------------------------------------- //
294 USDMEDIA_API
296
302 USDMEDIA_API
303 UsdAttribute CreateStartTimeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
304
305public:
306 // --------------------------------------------------------------------- //
307 // ENDTIME
308 // --------------------------------------------------------------------- //
328 USDMEDIA_API
330
336 USDMEDIA_API
337 UsdAttribute CreateEndTimeAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
338
339public:
340 // --------------------------------------------------------------------- //
341 // MEDIAOFFSET
342 // --------------------------------------------------------------------- //
357 USDMEDIA_API
359
365 USDMEDIA_API
366 UsdAttribute CreateMediaOffsetAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
367
368public:
369 // --------------------------------------------------------------------- //
370 // GAIN
371 // --------------------------------------------------------------------- //
381 USDMEDIA_API
383
389 USDMEDIA_API
390 UsdAttribute CreateGainAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
391
392public:
393 // ===================================================================== //
394 // Feel free to add custom code below this line, it will be preserved by
395 // the code generator.
396 //
397 // Just remember to:
398 // - Close the class declaration with };
399 // - Close the namespace with PXR_NAMESPACE_CLOSE_SCOPE
400 // - Close the include guard with #endif
401 // ===================================================================== //
402 // --(BEGIN CUSTOM CODE)--
403};
404
405PXR_NAMESPACE_CLOSE_SCOPE
406
407#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
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 all transformable prims, which allows arbitrary sequences of component affine transfor...
Definition: xformable.h:242
The SpatialAudio primitive defines basic properties for encoding playback of an audio file or stream ...
Definition: spatialAudio.h:76
USDMEDIA_API UsdAttribute GetMediaOffsetAttr() const
Expressed in seconds, mediaOffset specifies the offset from the referenced audio file's beginning at ...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
Definition: spatialAudio.h:81
USDMEDIA_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDMEDIA_API UsdAttribute GetAuralModeAttr() const
Determines how audio should be played.
USDMEDIA_API UsdAttribute CreateMediaOffsetAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetMediaOffsetAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDMEDIA_API UsdMediaSpatialAudio Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdMediaSpatialAudio holding the prim adhering to this schema at path on stage.
static USDMEDIA_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...
USDMEDIA_API UsdAttribute GetFilePathAttr() const
Path to the audio file.
USDMEDIA_API UsdAttribute GetGainAttr() const
Multiplier on the incoming audio signal.
USDMEDIA_API UsdAttribute GetEndTimeAttr() const
Expressed in the timeCodesPerSecond of the containing stage, endTime specifies when the audio stream ...
USDMEDIA_API UsdAttribute CreateEndTimeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetEndTimeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute CreateAuralModeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetAuralModeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdMediaSpatialAudio(const UsdSchemaBase &schemaObj)
Construct a UsdMediaSpatialAudio on the prim held by schemaObj .
Definition: spatialAudio.h:95
USDMEDIA_API UsdAttribute GetStartTimeAttr() const
Expressed in the timeCodesPerSecond of the containing stage, startTime specifies when the audio strea...
USDMEDIA_API UsdAttribute CreateFilePathAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFilePathAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
UsdMediaSpatialAudio(const UsdPrim &prim=UsdPrim())
Construct a UsdMediaSpatialAudio on UsdPrim prim .
Definition: spatialAudio.h:87
USDMEDIA_API UsdAttribute CreateGainAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetGainAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute CreateStartTimeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetStartTimeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDMEDIA_API UsdAttribute GetPlaybackModeAttr() const
Along with startTime and endTime, determines when the audio playback should start and stop during the...
virtual USDMEDIA_API ~UsdMediaSpatialAudio()
Destructor.
static USDMEDIA_API UsdMediaSpatialAudio Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
USDMEDIA_API UsdAttribute CreatePlaybackModeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetPlaybackModeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
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