@@ -92,8 +92,8 @@ struct mouseButton
92
92
struct mouseButton g_mouse;
93
93
std::mutex g_mouseMutex;
94
94
95
- ignition ::math::Vector3d g_trackOffset (1.0 , 0 , 0 );
96
- ignition ::math::Vector3d g_followOffset (-3 , 0 , 3 );
95
+ gz ::math::Vector3d g_trackOffset (1.0 , 0 , 0 );
96
+ gz ::math::Vector3d g_followOffset (-3 , 0 , 3 );
97
97
98
98
99
99
// ////////////////////////////////////////////////
@@ -158,7 +158,7 @@ void handleMouse()
158
158
2.0 * g_mouse.x / static_cast <double >(rayCamera->ImageWidth ()) - 1.0 ;
159
159
double ny = 1.0 -
160
160
2.0 * g_mouse.y / static_cast <double >(rayCamera->ImageHeight ());
161
- g_rayQuery->SetFromCamera (rayCamera, ignition ::math::Vector2d (nx, ny));
161
+ g_rayQuery->SetFromCamera (rayCamera, gz ::math::Vector2d (nx, ny));
162
162
g_target = g_rayQuery->ClosestPoint ();
163
163
if (!g_target)
164
164
{
@@ -188,7 +188,7 @@ void handleMouse()
188
188
if (g_mouse.motionDirty )
189
189
{
190
190
g_mouse.motionDirty = false ;
191
- auto drag = ignition ::math::Vector2d (g_mouse.dragX , g_mouse.dragY );
191
+ auto drag = gz ::math::Vector2d (g_mouse.dragX , g_mouse.dragY );
192
192
193
193
// left mouse button pan
194
194
if (g_mouse.button == GLUT_LEFT_BUTTON && g_mouse.state == GLUT_DOWN)
@@ -296,21 +296,21 @@ void keyboardCB(unsigned char _key, int, int)
296
296
if (_key == ' w' || _key == ' W' )
297
297
{
298
298
node->SetWorldPosition (node->WorldPosition () +
299
- node->WorldRotation () * ignition ::math::Vector3d (posIncr, 0 , 0 ));
299
+ node->WorldRotation () * gz ::math::Vector3d (posIncr, 0 , 0 ));
300
300
}
301
301
else if (_key == ' s' || _key == ' S' )
302
302
{
303
303
node->SetWorldPosition (node->WorldPosition () +
304
- node->WorldRotation () * ignition ::math::Vector3d (-posIncr, 0 , 0 ));
304
+ node->WorldRotation () * gz ::math::Vector3d (-posIncr, 0 , 0 ));
305
305
}
306
306
else if (_key == ' a' || _key == ' A' )
307
307
{
308
- node->SetWorldRotation (ignition ::math::Quaterniond (0 , 0 ,
308
+ node->SetWorldRotation (gz ::math::Quaterniond (0 , 0 ,
309
309
node->WorldRotation ().Yaw () + yawIncr));
310
310
}
311
311
else if (_key == ' d' || _key == ' D' )
312
312
{
313
- node->SetWorldRotation (ignition ::math::Quaterniond (0 , 0 ,
313
+ node->SetWorldRotation (gz ::math::Quaterniond (0 , 0 ,
314
314
node->WorldRotation ().Yaw () - yawIncr));
315
315
}
316
316
}
@@ -394,14 +394,14 @@ void keyboardCB(unsigned char _key, int, int)
394
394
if (_key == ' t' || _key == ' T' )
395
395
{
396
396
double trackPGain = 0.005 ;
397
- double p = ignition ::math::equal (cam->TrackPGain (), 1.0 ) ?
397
+ double p = gz ::math::equal (cam->TrackPGain (), 1.0 ) ?
398
398
trackPGain : 1.0 ;
399
399
cam->SetTrackPGain (p);
400
400
}
401
401
else if (_key == ' f' || _key == ' F' )
402
402
{
403
403
double followPGain = 0.01 ;
404
- double p = ignition ::math::equal (cam->FollowPGain (), 1.0 ) ?
404
+ double p = gz ::math::equal (cam->FollowPGain (), 1.0 ) ?
405
405
followPGain : 1.0 ;
406
406
cam->SetFollowPGain (p);
407
407
}
0 commit comments