Panda3D
|
00001 // Filename: mouseData.I 00002 // Created by: drose (15Jul02) 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 // Function: MouseData::Constructor 00018 // Access: Published 00019 // Description: 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE MouseData:: 00022 MouseData() { 00023 _in_window = false; 00024 _xpos = 0; 00025 _ypos = 0; 00026 } 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Function: MouseData::Copy Constructor 00030 // Access: Published 00031 // Description: 00032 //////////////////////////////////////////////////////////////////// 00033 INLINE MouseData:: 00034 MouseData(const MouseData ©) : 00035 _in_window(copy._in_window), 00036 _xpos(copy._xpos), 00037 _ypos(copy._ypos) 00038 { 00039 } 00040 00041 //////////////////////////////////////////////////////////////////// 00042 // Function: MouseData::Copy Assignment Operator 00043 // Access: Published 00044 // Description: 00045 //////////////////////////////////////////////////////////////////// 00046 INLINE void MouseData:: 00047 operator = (const MouseData ©) { 00048 _in_window = copy._in_window; 00049 _xpos = copy._xpos; 00050 _ypos = copy._ypos; 00051 } 00052 00053 //////////////////////////////////////////////////////////////////// 00054 // Function: MouseData::get_x 00055 // Access: Published 00056 // Description: 00057 //////////////////////////////////////////////////////////////////// 00058 INLINE int MouseData:: 00059 get_x() const { 00060 return _xpos; 00061 } 00062 00063 //////////////////////////////////////////////////////////////////// 00064 // Function: MouseData::get_y 00065 // Access: Published 00066 // Description: 00067 //////////////////////////////////////////////////////////////////// 00068 INLINE int MouseData:: 00069 get_y() const { 00070 return _ypos; 00071 } 00072 00073 //////////////////////////////////////////////////////////////////// 00074 // Function: MouseData::get_in_window 00075 // Access: Published 00076 // Description: 00077 //////////////////////////////////////////////////////////////////// 00078 INLINE bool MouseData:: 00079 get_in_window() const { 00080 return _in_window; 00081 } 00082 00083 00084 INLINE ostream &operator << (ostream &out, const MouseData &md) { 00085 md.output(out); 00086 return out; 00087 }