23 bool operator()(
const ax::NodeEditor::NodeId& lhs,
const ax::NodeEditor::NodeId& rhs)
const
25 return lhs.AsPointer() < rhs.AsPointer();
23 bool operator()(
const ax::NodeEditor::NodeId& lhs,
const ax::NodeEditor::NodeId& rhs)
const {
…}
31const float m_TouchTime = 1.0F;
32std::map<ax::NodeEditor::NodeId, float, NodeIdLess> m_NodeTouchTime;
41 m_NodeTouchTime[id] = m_TouchTime;
49 auto it = m_NodeTouchTime.find(
id);
50 if (it != m_NodeTouchTime.end() && it->second > 0.0F)
52 return (m_TouchTime - it->second) / m_TouchTime;
62 for (
auto& entry : m_NodeTouchTime)
64 if (entry.second > 0.0F)
66 entry.second -= deltaTime;
float GetTouchProgress(ax::NodeEditor::NodeId id)
Get the Touch Progress for the specified node.
void TouchNode(ax::NodeEditor::NodeId id)
Trigger a touch event on the specified node.
void UpdateTouch(float deltaTime)
Updates the touch events for all nodes.
Comparison operator for node Ids.
bool operator()(const ax::NodeEditor::NodeId &lhs, const ax::NodeEditor::NodeId &rhs) const
Smaller comparison operator for node Ids.