www.pudn.com > Product_Submit2004.rar > VisTest.cc, change:2004-10-12,size:966b


#include "VisTest.h" 
 
// Test to see if the modified vision transform works properly (-CM). 
VisTest::VisTest() { 
  currentTiltBig = 0; 
  currentTiltSmall = 15; 
  currentPan = 80; 
  index = 0; 
  leftSwing = true; 
} 
 
void VisTest::NewReadyModel() { 
  if (currentPan > 79 && !leftSwing) { 
    index++; 
    currentPan = 79; 
    leftSwing = true; 
  } 
 
  if (index == 0) { 
    currentTiltBig = 0; 
    currentTiltSmall = 15; 
  } else if (index == 1) { 
    currentTiltBig = -20; 
    currentTiltSmall = 15; 
  } else if (index == 2) { 
    currentTiltBig = -20; 
    currentTiltSmall = 0;  
  } else if (index == 3) { 
    currentTiltBig = 0; 
    currentTiltSmall = 25; 
  } else { 
    return; 
  } 
  if (leftSwing) currentPan-=1.5; 
  else currentPan+=1.5; 
  if (currentPan < -79 && leftSwing) leftSwing = false; 
  Utilities utils; 
  utils.Head_MoveTo(currentTiltBig, currentPan, currentTiltSmall); 
} 
 
 
void VisTest::NewPlayingModel() { 
}