88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
// Filename: mouseData.I
|
|
// Created by: drose (15Jul02)
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
//
|
|
// PANDA 3D SOFTWARE
|
|
// Copyright (c) Carnegie Mellon University. All rights reserved.
|
|
//
|
|
// All use of this software is subject to the terms of the revised BSD
|
|
// license. You should have received a copy of this license along
|
|
// with this source code in a file named "LICENSE."
|
|
//
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: MouseData::Constructor
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE MouseData::
|
|
MouseData() {
|
|
_in_window = false;
|
|
_xpos = 0;
|
|
_ypos = 0;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: MouseData::Copy Constructor
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE MouseData::
|
|
MouseData(const MouseData ©) :
|
|
_in_window(copy._in_window),
|
|
_xpos(copy._xpos),
|
|
_ypos(copy._ypos)
|
|
{
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: MouseData::Copy Assignment Operator
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE void MouseData::
|
|
operator = (const MouseData ©) {
|
|
_in_window = copy._in_window;
|
|
_xpos = copy._xpos;
|
|
_ypos = copy._ypos;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: MouseData::get_x
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE double MouseData::
|
|
get_x() const {
|
|
return _xpos;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: MouseData::get_y
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE double MouseData::
|
|
get_y() const {
|
|
return _ypos;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
// Function: MouseData::get_in_window
|
|
// Access: Published
|
|
// Description:
|
|
////////////////////////////////////////////////////////////////////
|
|
INLINE bool MouseData::
|
|
get_in_window() const {
|
|
return _in_window;
|
|
}
|
|
|
|
|
|
INLINE ostream &operator << (ostream &out, const MouseData &md) {
|
|
md.output(out);
|
|
return out;
|
|
}
|