Overte C++ Documentation
Transition.h
1 //
2 // Transition.h
3 
4 // Created by Olivier Prat on 07/07/2017.
5 // Copyright 2017 High Fidelity, Inc.
6 //
7 // Distributed under the Apache License, Version 2.0.
8 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
9 //
10 
11 #ifndef hifi_render_Transition_h
12 #define hifi_render_Transition_h
13 
14 #include "Item.h"
15 
16 #include "FadeProperties.h"
17 
18 namespace render {
19 
20 // This holds the current state for all transition event types applied to a render item
21 class Transition {
22 public:
23  TransitionType eventType { TransitionType::ELEMENT_ENTER_DOMAIN };
24  ItemID itemId { Item::INVALID_ITEM_ID };
25  ItemID boundItemId { Item::INVALID_ITEM_ID };
26  double time { 0.0 };
27  glm::vec3 noiseOffset { 0.f, 0.f, 0.f };
28  glm::vec3 baseOffset { 0.f, 0.f, 0.f };
29  glm::vec3 baseInvSize { 1.f, 1.f, 1.f };
30  float threshold { 0.f };
31  uint8_t isFinished { 0 };
32 
33  mutable gpu::BufferView paramsBuffer;
34  FadeProperties fadeProperties;
35 };
36 
37 typedef std::shared_ptr<Transition> TransitionPointer;
38 typedef std::vector<TransitionType> TransitionTypes;
39 
40 }
41 
42 #endif // hifi_render_Transition_h