MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / mouseInputCallSelection

Function mouseInputCallSelection

Samples/NiViewer/MouseInput.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44MouseInput g_MouseInput = {SELECTION_NONE, {0,0}, {0,0}, NULL, NULL};
45
46void mouseInputCallSelection()
47{
48 if (g_MouseInput.pSelectionCallback != NULL)
49 {
50 IntRect selection;
51 selection.uBottom = XN_MIN(g_MouseInput.StartSelection.Y, g_MouseInput.LastLocation.Y);
52 selection.uTop = XN_MAX(g_MouseInput.StartSelection.Y, g_MouseInput.LastLocation.Y);
53 selection.uLeft = XN_MIN(g_MouseInput.StartSelection.X, g_MouseInput.LastLocation.X);
54 selection.uRight = XN_MAX(g_MouseInput.StartSelection.X, g_MouseInput.LastLocation.X);
55
56 g_MouseInput.pSelectionCallback(g_MouseInput.nSelectionState, selection);
57 }
58}
59
60void mouseInputMotion(int x, int y)
61{

Callers 2

mouseInputMotionFunction · 0.85
mouseInputButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected