#include #include #include"/>

turn - Copy (2) - #include"turn.h#include #include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "turn.h" #include <string> #include <stdio.h> #include <iostream> #include <sstream> #include <iomanip> #include <fstream> #include <math.h> using namespace std; /* This is the ActionTurn constructor, note the use of constructor chaining with the ArAction. also note how it uses setNextArgument, which makes it so that other things can see what parameters this action has, and set them. It also initializes the classes variables. */ ActionTurn::ActionTurn(double turnThreshold, double turnAmount) : ArAction("Turn") { myTurnThreshold = turnThreshold; myTurnAmount = turnAmount; setNextArgument(ArArg("turn threshold (mm)", &myTurnThreshold, "The number of mm away from obstacle to begin turnning.")); setNextArgument(ArArg("turn amount (deg)", &myTurnAmount, "The number of degress to turn if turning.")); myTurning = 0; } /* Sets the myRobot pointer (all setRobot overloaded functions must do this), finds the sonar device from the robot, and if the sonar isn't there, then it deactivates itself. */ void ActionTurn::setRobot(ArRobot *robot)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/19/2011 for the course ECE 101 taught by Professor Chu during the Spring '11 term at Punjab Engineering College.

Page1 / 2

turn - Copy (2) - #include"turn.h#include #include...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online