View Single Post
  #1   Spotlight this post!  
Unread 26-01-2012, 22:53
Method's Avatar
Method Method is offline
Registered User
no team
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Ca
Posts: 38
Method is an unknown quantity at this point
Comprehensive help for camera code

for(UINT32 x = 0; x < particles->size(); x++)
{
ParticleAnalysisReport& par = (*particles)[x];
if(par.center_mass_x_normalized > 0)
{
//right
}
if(par.center_mass_x_normalized < 0)
{
//left
}
}


This is a part of an example of tracking code.
I do not understand the purpose of the for, or why (*particles)[x] isn't just (*particles)
Is particles->size(); returning the number of particles or something? If so, wouldn't the code make the robot cycle through aiming at the different targets?
Reply With Quote