本文整理汇总了C++中InputState::modifierKeysPressed方法的典型用法代码示例。如果您正苦于以下问题:C++ InputState::modifierKeysPressed方法的具体用法?C++ InputState::modifierKeysPressed怎么用?C++ InputState::modifierKeysPressed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputState
的用法示例。
在下文中一共展示了InputState::modifierKeysPressed方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool ClipToolController::AddClipPointPart::doMouseClick(const InputState& inputState) {
if (!inputState.mouseButtonsPressed(MouseButtons::MBLeft) ||
!inputState.modifierKeysPressed(ModifierKeys::MKNone))
return false;
Vec3 temp;
return m_callback->addClipPoint(inputState, temp);
}
示例2: doStartMove
MoveObjectsToolController::MoveInfo MoveObjectsToolController::doStartMove(const InputState& inputState) {
if (!inputState.modifierKeysPressed(ModifierKeys::MKNone) &&
!inputState.modifierKeysPressed(ModifierKeys::MKAlt) &&
!inputState.modifierKeysPressed(ModifierKeys::MKCtrlCmd) &&
!inputState.modifierKeysPressed(ModifierKeys::MKCtrlCmd | ModifierKeys::MKAlt))
return MoveInfo();
const Model::PickResult& pickResult = inputState.pickResult();
const Model::Hit& hit = pickResult.query().pickable().type(Model::Group::GroupHit | Model::Entity::EntityHit | Model::Brush::BrushHit).selected().first();
if (!hit.isMatch())
return MoveInfo();
if (!m_tool->startMove(inputState))
return MoveInfo();
return MoveInfo(hit.hitPoint());
}
示例3: doStartMouseDrag
bool UVRotateTool::doStartMouseDrag(const InputState& inputState) {
assert(m_helper.valid());
if (!inputState.modifierKeysPressed(ModifierKeys::MKNone) ||
!inputState.mouseButtonsPressed(MouseButtons::MBLeft))
return false;
const Model::PickResult& pickResult = inputState.pickResult();
const Model::Hit& angleHandleHit = pickResult.query().type(AngleHandleHit).occluded().first();
if (!angleHandleHit.isMatch())
return false;
const Model::BrushFace* face = m_helper.face();
const Mat4x4 toFace = face->toTexCoordSystemMatrix(Vec2f::Null, Vec2f::One, true);
const Vec2f hitPointInFaceCoords(toFace * angleHandleHit.hitPoint());
m_initalAngle = measureAngle(hitPointInFaceCoords) - face->rotation();
MapDocumentSPtr document = lock(m_document);
document->beginTransaction("Rotate Texture");
return true;
}
示例4: handleInput
bool ResizeBrushesToolController::handleInput(const InputState& inputState) const {
return ((inputState.modifierKeysPressed(ModifierKeys::MKShift) ||
inputState.modifierKeysPressed(ModifierKeys::MKShift | ModifierKeys::MKCtrlCmd)) &&
m_tool->applies());
}
示例5: return
bool CameraTool2D::look(const InputState& inputState) const {
return (inputState.mouseButtonsPressed(MouseButtons::MBRight) &&
inputState.modifierKeysPressed(ModifierKeys::MKNone));
}