You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
806 B
C++
55 lines
806 B
C++
#include "stdafx.h"
|
|
#include "HTrackerSwitch.h"
|
|
|
|
HTrackerSwitch::HTrackerSwitch()
|
|
:m_bMove(false),
|
|
m_bHit(false),
|
|
m_bRoationAndShear(false)
|
|
{
|
|
}
|
|
|
|
void HTrackerSwitch::Reset()
|
|
{
|
|
m_bMove = false;
|
|
m_bHit = false;
|
|
m_bRoationAndShear = false;
|
|
}
|
|
|
|
void HTrackerSwitch::HitHandle()
|
|
{
|
|
m_bHit = true;
|
|
m_bMove = false;
|
|
}
|
|
|
|
void HTrackerSwitch::MouseMove()
|
|
{
|
|
m_bMove = true;
|
|
}
|
|
|
|
bool HTrackerSwitch::ButtonUp(int handleKind)
|
|
{
|
|
if (handleKind == 8) //Æ½ÒÆ
|
|
{
|
|
m_bRoationAndShear = false;
|
|
m_bHit = false;
|
|
m_bMove = false;
|
|
return false;
|
|
}
|
|
|
|
if (m_bMove == false && m_bHit)
|
|
{
|
|
m_bRoationAndShear = !m_bRoationAndShear;
|
|
}
|
|
//else
|
|
//m_bRoationAndShear = false;
|
|
|
|
m_bHit = false;
|
|
m_bMove = false;
|
|
|
|
return m_bRoationAndShear;
|
|
}
|
|
|
|
bool HTrackerSwitch::IsRotationAndShear()
|
|
{
|
|
return m_bRoationAndShear;
|
|
} |