jeudi 24 novembre 2016

What does this type of structure initialization mean?

I am not able to make sense of this initialization. What does G('variables'): variables(variables) mean? Can you please explain this type of a structure initialization?

 17 struct G
 18 {
 19    
 20 
 21     Eigen::Affine3d p;
 22     Eigen::Affine3d pO;
 23     double i;
 24 
 25     G(
 26         const Eigen::Affine3d& p = Eigen::Affine3d::Identity(),
 27         const Eigen::Affine3d& pO = Eigen::Affine3d::Identity(),
 28         double i = -1.0)
 29     :
 30         p(p),
 31         pO(pO),
 32         i(i)
 33     {
 34     }
 35 };

Aucun commentaire:

Enregistrer un commentaire