00001 // Filename: pStatView.I 00002 // Created by: drose (12Jul00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 00020 00021 //////////////////////////////////////////////////////////////////// 00022 // Function: PStatView::get_thread_data 00023 // Access: Public 00024 // Description: Returns the current PStatThreadData associated with 00025 // the view. This was set by a previous call to 00026 // set_thread_data(). 00027 //////////////////////////////////////////////////////////////////// 00028 INLINE const PStatThreadData *PStatView:: 00029 get_thread_data() { 00030 return _thread_data; 00031 } 00032 00033 //////////////////////////////////////////////////////////////////// 00034 // Function: PStatView::get_client_data 00035 // Access: Public 00036 // Description: Returns the current PStatClientData associated with 00037 // the view. This was also set by a previous call to 00038 // set_thread_data(). 00039 //////////////////////////////////////////////////////////////////// 00040 INLINE const PStatClientData *PStatView:: 00041 get_client_data() { 00042 return _client_data; 00043 } 00044 00045 00046 //////////////////////////////////////////////////////////////////// 00047 // Function: PStatView::set_to_frame 00048 // Access: Public 00049 // Description: Sets to a particular frame number (or the nearest 00050 // available), extracted from the View's PStatThreadData 00051 // pointer. See the comments in the other flavor of 00052 // set_to_frame(). 00053 //////////////////////////////////////////////////////////////////// 00054 INLINE void PStatView:: 00055 set_to_frame(int frame_number) { 00056 set_to_frame(_thread_data->get_frame(frame_number)); 00057 } 00058 00059 //////////////////////////////////////////////////////////////////// 00060 // Function: PStatView::set_to_time 00061 // Access: Public 00062 // Description: Sets to the frame that occurred at the indicated time 00063 // (or the nearest available frame), extracted from the 00064 // View's PStatThreadData pointer. See the comments in 00065 // set_to_frame. 00066 //////////////////////////////////////////////////////////////////// 00067 INLINE void PStatView:: 00068 set_to_time(float time) { 00069 set_to_frame(_thread_data->get_frame_at_time(time)); 00070 } 00071 00072 //////////////////////////////////////////////////////////////////// 00073 // Function: PStatView::get_level_index 00074 // Access: Public 00075 // Description: Returns an index number that can be used to determine 00076 // when the set of known levels has changed. Each time 00077 // the set of levels in the view changes (because of new 00078 // data arriving from the client, for instance), this 00079 // number is incremented. 00080 //////////////////////////////////////////////////////////////////// 00081 INLINE int PStatView:: 00082 get_level_index() const { 00083 return _level_index; 00084 }