Loading...
Searching...
No Matches
velocityMotionResolvingSceneIndex.h
1//
2// Copyright 2024 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HDSI_VELOCITY_MOTION_RESOLVING_SCENE_INDEX_H
8#define PXR_IMAGING_HDSI_VELOCITY_MOTION_RESOLVING_SCENE_INDEX_H
9
10#include "pxr/imaging/hd/dataSource.h"
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/imaging/hd/sceneIndex.h"
13#include "pxr/imaging/hd/sceneIndexObserver.h"
14#include "pxr/imaging/hdsi/api.h"
15
16#include "pxr/usd/sdf/path.h"
17
18#include "pxr/base/tf/debug.h"
21#include "pxr/base/tf/token.h"
22
23#include "pxr/pxr.h"
24
25PXR_NAMESPACE_OPEN_SCOPE
26
28 HDSI_VELOCITY_MOTION);
29
30#define HDSI_VELOCITY_MOTION_RESOLVING_SCENE_INDEX_TOKENS \
31 (disable) \
32 (enable) \
33 (ignore) \
34 (noAcceleration) \
35 (timeCodesPerSecond) \
36 ((velocityMotionMode, "__velocityMotionMode"))
37
38TF_DECLARE_PUBLIC_TOKENS(HdsiVelocityMotionResolvingSceneIndexTokens,
39 HDSI_API, HDSI_VELOCITY_MOTION_RESOLVING_SCENE_INDEX_TOKENS);
40
42
97{
98public:
99 HDSI_API
100 static HdsiVelocityMotionResolvingSceneIndexRefPtr
101 New(
102 const HdSceneIndexBaseRefPtr& inputSceneIndex,
103 const HdContainerDataSourceHandle& inputArgs = nullptr);
104
105 HDSI_API
107 GetPrim(const SdfPath& primPath) const override;
108
109 HDSI_API
110 SdfPathVector
111 GetChildPrimPaths(const SdfPath& primPath) const override;
112
113 HDSI_API
114 static bool
115 PrimTypeSupportsVelocityMotion(const TfToken& primType);
116
117protected:
119 const HdSceneIndexBaseRefPtr& inputSceneIndex,
120 const HdContainerDataSourceHandle& inputArgs = nullptr);
121
122 void
123 _PrimsAdded(
124 const HdSceneIndexBase& sender,
125 const HdSceneIndexObserver::AddedPrimEntries& entries) override;
126
127 void
128 _PrimsRemoved(
129 const HdSceneIndexBase& sender,
130 const HdSceneIndexObserver::RemovedPrimEntries& entries) override;
131
132 void
133 _PrimsDirtied(
134 const HdSceneIndexBase& sender,
135 const HdSceneIndexObserver::DirtiedPrimEntries& entries) override;
136};
137
138PXR_NAMESPACE_CLOSE_SCOPE
139
140#endif // PXR_IMAGING_HDSI_VELOCITY_MOTION_RESOLVING_SCENE_INDEX_H
Abstract interface to scene data.
Definition: sceneIndex.h:54
An abstract base class for a filtering scene index that observes a single input scene index.
Scene index that resolves velocity-based motion for all prims that support it.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
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
Conditional debugging output class and macros.
Standard pointer typedefs.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
#define TF_DEBUG_CODES(...)
Define debugging symbols.
Definition: debug.h:376
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:92
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...