Overte C++ Documentation
TransitionStage.h
1 //
2 // TransitionStage.h
3 //
4 // Created by Olivier Prat on 07/07/2017.
5 // Copyright 2017 High Fidelity, Inc.
6 // Copyright 2024 Overte e.V.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_render_TransitionStage_h
13 #define hifi_render_TransitionStage_h
14 
15 #include "Stage.h"
16 #include "StageSetup.h"
17 #include "Transition.h"
18 
19 namespace render {
20 
21  // Transition stage to set up Transition-related effects
22  class TransitionStage : public TypedStage<Transition> {
23  public:
24  bool isTransitionUsed(Index index) const { return _elements.checkIndex(index) && !_elements.isElementFreed(index); }
25  Index addTransition(ItemID itemId, TransitionType type, ItemID boundId);
26  };
27  using TransitionStagePointer = std::shared_ptr<TransitionStage>;
28 
29  class TransitionStageSetup : public StageSetup<TransitionStage> {
30  public:
31  using JobModel = Job::Model<TransitionStageSetup>;
32  };
33 
34 }
35 
36 #endif // hifi_render_TransitionStage_h