skeletons.cpp
上传用户:jsylhbnbhn
上传日期:2013-11-03
资源大小:119k
文件大小:1k
- // skelectons.cpp: implementation of the skelectons class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "skeletons.h"
- #include <iostream>
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- const int MaxFramesSize = 3;
- int frames_count =0;
- skelectons::skelectons()
- {
- }
- skelectons::~skelectons()
- {
- }
- void skelectons::add(skelecton *ske)
- {
- frames_count ++ ;
- ske->ID = frames_count ;
- skelecton_deq.push_back(*ske);
- if (skelecton_deq.size()>MaxFramesSize)
- skelecton_deq.pop_front ();
- }
- void skelectons::test()
- {
-
- skelecton_deque::iterator pdeque;
- cout <<"The output is:"<<endl;
-
- for(pdeque = skelecton_deq.begin();
- pdeque != skelecton_deq.end();
- pdeque++)
- {
- cout << pdeque->get_bone_by_name("neck")->x <<endl ;
- }
-
- }
- CvPoint3D32f skelectons::get_predict_point3D(char *name)
- {
- CvPoint3D32f pt;
- pt.x=0;
- pt.y=0;
- pt.z=0;
- return (pt);
- }
- skelecton* skelectons::get_previous_skelecton()
- {
- skelecton* ske=NULL;
- if(skelecton_deq.size()>0)
- ske= &skelecton_deq.back() ;
- return ske;
- }