Panda3D
|
00001 // Filename: pStatView.I 00002 // Created by: drose (12Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 00016 00017 //////////////////////////////////////////////////////////////////// 00018 // Function: PStatView::get_thread_data 00019 // Access: Public 00020 // Description: Returns the current PStatThreadData associated with 00021 // the view. This was set by a previous call to 00022 // set_thread_data(). 00023 //////////////////////////////////////////////////////////////////// 00024 INLINE const PStatThreadData *PStatView:: 00025 get_thread_data() { 00026 return _thread_data; 00027 } 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: PStatView::get_client_data 00031 // Access: Public 00032 // Description: Returns the current PStatClientData associated with 00033 // the view. This was also set by a previous call to 00034 // set_thread_data(). 00035 //////////////////////////////////////////////////////////////////// 00036 INLINE const PStatClientData *PStatView:: 00037 get_client_data() { 00038 return _client_data; 00039 } 00040 00041 00042 //////////////////////////////////////////////////////////////////// 00043 // Function: PStatView::set_to_frame 00044 // Access: Public 00045 // Description: Sets to a particular frame number (or the nearest 00046 // available), extracted from the View's PStatThreadData 00047 // pointer. See the comments in the other flavor of 00048 // set_to_frame(). 00049 //////////////////////////////////////////////////////////////////// 00050 INLINE void PStatView:: 00051 set_to_frame(int frame_number) { 00052 set_to_frame(_thread_data->get_frame(frame_number)); 00053 } 00054 00055 //////////////////////////////////////////////////////////////////// 00056 // Function: PStatView::set_to_time 00057 // Access: Public 00058 // Description: Sets to the frame that occurred at the indicated time 00059 // (or the nearest available frame), extracted from the 00060 // View's PStatThreadData pointer. See the comments in 00061 // set_to_frame. 00062 //////////////////////////////////////////////////////////////////// 00063 INLINE void PStatView:: 00064 set_to_time(double time) { 00065 set_to_frame(_thread_data->get_frame_at_time(time)); 00066 } 00067 00068 //////////////////////////////////////////////////////////////////// 00069 // Function: PStatView::get_show_level 00070 // Access: Public 00071 // Description: Returns true if we are showing level data, false if 00072 // time data. 00073 //////////////////////////////////////////////////////////////////// 00074 INLINE bool PStatView:: 00075 get_show_level() const { 00076 return _show_level; 00077 } 00078 00079 //////////////////////////////////////////////////////////////////// 00080 // Function: PStatView::get_level_index 00081 // Access: Public 00082 // Description: Returns an index number that can be used to determine 00083 // when the set of known levels has changed. Each time 00084 // the set of levels in the view changes (because of new 00085 // data arriving from the client, for instance), this 00086 // number is incremented. 00087 //////////////////////////////////////////////////////////////////// 00088 INLINE int PStatView:: 00089 get_level_index() const { 00090 return _level_index; 00091 }