HOG2
ScreenTransition.h
Go to the documentation of this file.
1 //
2 // ScreenTransition.h
3 // puzzleSample
4 //
5 // Created by Nathan Sturtevant on 5/22/19.
6 // Copyright © 2019 University of Denver. All rights reserved.
7 //
8 
9 #ifndef ScreenTransition_h
10 #define ScreenTransition_h
11 
12 #include <stdio.h>
13 #include "Graphics.h"
14 
16 public:
17  // Time 0 is empty; time 1 is full
18  virtual void Reset(float time) = 0;
19  // Adjust time (forward or backwards)
20  // return true when complete (0 or 1)
21  virtual bool Step(float time) = 0;
22  virtual void Draw(Graphics::Display &d) = 0;
23 };
24 
26 public:
28  virtual void Reset(float t);
29  virtual bool Step(float delta) ;
30  virtual void Draw(Graphics::Display &d) ;
31  void SetColor(rgbColor c);
32 private:
33  float mTime;
36 };
37 
39 public:
40  FallingBoxTransition(int dimension);
41  virtual void Reset(float t);
42  virtual bool Step(float delta) ;
43  virtual void Draw(Graphics::Display &d) ;
44 private:
45  float mTime;
46  int dim;
47 };
48 
49 #endif /* ScreenTransition_h */
FallingBoxTransition::Reset
virtual void Reset(float t)
Definition: ScreenTransition.cpp:54
rgbColor
A color; r/g/b are between 0...1.
Definition: Colors.h:17
FallingBoxTransition::dim
int dim
Definition: ScreenTransition.h:46
LineTransition::Step
virtual bool Step(float delta)
Definition: ScreenTransition.cpp:28
FallingBoxTransition::mTime
float mTime
Definition: ScreenTransition.h:45
LineTransition::numSegments
int numSegments
Definition: ScreenTransition.h:34
d
mcData d[]
Definition: MotionCaptureMovement.cpp:21
ScreenTransition::Reset
virtual void Reset(float time)=0
FallingBoxTransition::Draw
virtual void Draw(Graphics::Display &d)
Definition: ScreenTransition.cpp:70
LineTransition::LineTransition
LineTransition(int numSegments, int linesPerSegment, rgbColor color=Colors::black)
Definition: ScreenTransition.cpp:11
LineTransition::linesPerSegment
int linesPerSegment
Definition: ScreenTransition.h:34
FallingBoxTransition
Definition: ScreenTransition.h:38
FallingBoxTransition::Step
virtual bool Step(float delta)
Definition: ScreenTransition.cpp:58
Colors::black
const rgbColor black
Definition: Colors.h:119
LineTransition::mTime
float mTime
Definition: ScreenTransition.h:33
LineTransition::color
rgbColor color
Definition: ScreenTransition.h:35
Graphics::Display
Definition: Graphics.h:146
LineTransition::Draw
virtual void Draw(Graphics::Display &d)
Definition: ScreenTransition.cpp:39
LineTransition::Reset
virtual void Reset(float t)
Definition: ScreenTransition.cpp:23
Graphics.h
ScreenTransition::Draw
virtual void Draw(Graphics::Display &d)=0
ScreenTransition
Definition: ScreenTransition.h:15
FallingBoxTransition::FallingBoxTransition
FallingBoxTransition(int dimension)
Definition: ScreenTransition.cpp:51
ScreenTransition::Step
virtual bool Step(float time)=0
LineTransition::SetColor
void SetColor(rgbColor c)
Definition: ScreenTransition.cpp:18
LineTransition
Definition: ScreenTransition.h:25