Files Classes Functions Hierarchy
#include <pointsgraphtimeD2.h>
Public Member Functions | |
| pointsgraphtimeD2 (uintc N_, windowscaleD2 const &screen_, windowscaleD2 const &world_) | |
| void | push_back (doublec y) |
| Add the point to the back. | |
| void | push_front (doublec y) |
| Add the point to the front. | |
| void | update () |
| Update so draw() draws the current state. | |
Public Attributes | |
| uint | N |
| Number of points. | |
| uint | Ncurrent |
| Current number of points. | |
| deque< double > | ytime |
| y values in time. | |
The newest point is plotted furthest to the right. As the x-axis is in time.
Definition at line 10 of file pointsgraphtimeD2.h.
| pointsgraphtimeD2::pointsgraphtimeD2 | ( | uintc | N_, | |
| windowscaleD2 const & | screen_, | |||
| windowscaleD2 const & | world_ | |||
| ) |
| void pointsgraphtimeD2::push_back | ( | doublec | y | ) |
Add the point to the back.
Definition at line 13 of file pointsgraphtimeD2.cpp.
References N, Ncurrent, and ytime.
00014 { 00015 if (Ncurrent==N) 00016 { 00017 ytime.popfront(); 00018 ytime.push_back(y); 00019 return; 00020 } 00021 assert(Ncurrent<=N); 00022 00023 ++Ncurrent; 00024 ytime.push_back(y); 00025 }
| void pointsgraphtimeD2::push_front | ( | doublec | y | ) |
Add the point to the front.
| void pointsgraphtimeD2::update | ( | ) |
Current number of points.
Definition at line 18 of file pointsgraphtimeD2.h.
Referenced by push_back().
| deque<double> pointsgraphtimeD2::ytime |
1.5.8