24 return _time_data.empty();
35 return _level_data.empty();
69 _time_data.swap(other._time_data);
70 _level_data.swap(other._level_data);
82 nassertv((index & 0x7fff) == index);
87 _time_data.push_back(dp);
99 nassertv((index & 0x7fff) == index);
102 dp._index = index | 0x8000;
104 _time_data.push_back(dp);
116 nassertv((index & 0xffff) == index);
121 _level_data.push_back(dp);
137 return _time_data.front()._value;
151 return _time_data.back()._value;
163 return _time_data.back()._value - _time_data.front()._value;
174 return _time_data.size();
185 nassertr(n >= 0 && n < (
int)_time_data.size(), 0);
186 return _time_data[n]._index & 0x7fff;
197 nassertr(n >= 0 && n < (
int)_time_data.size(), 0);
198 return (_time_data[n]._index & 0x8000) == 0;
211 nassertr(n >= 0 && n < (
int)_time_data.size(), 0);
212 return _time_data[n]._value;
223 return _level_data.size();
234 nassertr(n >= 0 && n < (
int)_level_data.size(), 0);
235 return _level_data[n]._index;
245 nassertr(n >= 0 && n < (
int)_level_data.size(), 0);
246 return _level_data[n]._value;
254 INLINE
bool PStatFrameData::DataPoint::
255 operator < (
const PStatFrameData::DataPoint &other)
const {
256 return _value < other._value;
int get_num_events() const
Returns the number of individual events stored in the FrameData.
int get_level_collector(int n) const
Returns the index of the collector associated with the nth level value.
bool is_start(int n) const
Returns true if the nth event represents a start event, or false if it represents a stop event...
bool is_level_empty() const
Returns true if there are no levels indicated in the frame data, false otherwise. ...
int get_num_levels() const
Returns the number of individual level values stored in the FrameData.
void swap(PStatFrameData &other)
Exchanges the data in this object with the data in the other.
int get_time_collector(int n) const
Returns the index of the collector associated with the nth event.
void add_start(int index, double time)
Adds a 'start collector' data point to the frame data.
Contains the raw timing and level data for a single frame.
bool is_empty() const
Returns true if the FrameData has no time or level data.
bool is_time_empty() const
Returns true if there are no time events in the frame data, false otherwise.
void add_stop(int index, double time)
Adds a 'stop collector' data point to the frame data.
double get_end() const
Returns the time of the last data point in the frame data.
double get_time(int n) const
Returns the timestamp of the nth event, in seconds elapsed since some undefined epoch (which is guara...
void clear()
Removes all the data points from the frame data, in preparation for building up a new frame's worth...
double get_level(int n) const
Returns the height of the nth level value.
void add_level(int index, double level)
Adds a particular level value associated with a given collector to the frame data.
double get_start() const
Returns the time of the first data point in the frame data.
double get_net_time() const
Returns the total time elapsed for the frame.