#include <MDeviceState.h>
MDeviceState is a generic event class for input devices. Input device classes (such as MPxMidiInputDevice) are responsible for converting specific event types to an MDeviceState which Maya understands.
Public Member Functions | |
virtual | ~MDeviceState () |
int | devicePosition (const unsigned short int axis) const |
int | devicePosition (const MString &axisName) const |
void | setDevicePosition (const int position, const unsigned short int axis) |
void | setDevicePosition (const int position, const MString &axisName) |
bool | buttonState (const unsigned short int button) const |
bool | buttonState (const MString &buttonName) const |
void | setButtonState (const bool state, const unsigned short int button) |
void | setButtonState (const bool state, const MString &buttonName) |
int | maxAxis () const |
bool | isNull () |
MDeviceState::~MDeviceState | ( | ) | [virtual] |
Class destructor.
int MDeviceState::devicePosition | ( | const unsigned short int | axis | ) | const |
Returns the position of the device for the specified axis.
[in] | axis | The device axis to be tested |
int MDeviceState::devicePosition | ( | const MString & | axisName | ) | const |
Returns the position of the device for the specified axis.
[in] | axisName | The name of the device axis to be tested |
void MDeviceState::setDevicePosition | ( | const int | position, | |
const unsigned short int | axis | |||
) |
Sets the position of the device for the specified axis.
[in] | position | The new position value |
[in] | axis | The axis of the device to be set |
void MDeviceState::setDevicePosition | ( | const int | position, | |
const MString & | axis | |||
) |
Sets the position of the device for the specified axis.
[in] | position | The new position value |
[in] | axis | The name of the axis of the device to be set |
bool MDeviceState::buttonState | ( | const unsigned short int | button | ) | const |
Returns the state of the given button.
[in] | button | The number of the button to be tested |
bool MDeviceState::buttonState | ( | const MString & | buttonName | ) | const |
Returns the state of the named button.
[in] | buttonName | The name of the button to be tested |
void MDeviceState::setButtonState | ( | const bool | state, | |
const unsigned short int | button | |||
) |
Set the state of the specified button.
[in] | state | The state to be set (true or false) |
[in] | button | The button number |
void MDeviceState::setButtonState | ( | const bool | state, | |
const MString & | buttonName | |||
) |
Set the state of the specified button.
[in] | state | The state to be set (true or false) |
[in] | buttonName | The name of the button to be set |
int MDeviceState::maxAxis | ( | ) | const |
Return the value of the axis with the largest value. This is used to dejitter absolute devices.
bool MDeviceState::isNull | ( | ) |
Returns true if this device state is NULL;
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |