www.pudn.com > 人体步态跟踪识别bate版.rar > Walker.h
// Walker.h: interface for the CWalker class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_WALKER_H__AA8ABAC4_007E_4143_AA76_890A5ADF2FF9__INCLUDED_)
#define AFX_WALKER_H__AA8ABAC4_007E_4143_AA76_890A5ADF2FF9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "WalkConf.h"
class CWalker
{
public:
CWalker(double len_thigh1,double len_calf1,double len_foot1);
CWalker(double len_thigh1,double len_calf1,double len_foot1,double ulimit_hip1,double llimit_hip1,
double ulimit_knee1,double llimit_knee1,double ulimit_ankle1,double llimit_ankle1);
void setLenLeg(double len_thigh1,double len_calf1,double len_foot1 );
void setLimitRotaHip(double ulimit_hip1,double llimit_hip1 );
void setLimitRotaKnee(double ulimit_knee1,double llimit_knee1 );
void setLimitRotaAnkle(double ulimit_ankle1,double llimit_ankle1 );
CWalkConf query(CPosition from, CPosition to,CPosition next, int whichFrame);
CWalkConf query(CPosition to, CPosition next,int whichSlice );
CWalkConf* genInterpolation1(CWalkConf keyframe1,CWalkConf keyframe2 );
CWalkConf* genInterpolation2(CWalkConf keyframe2,CWalkConf keyframe3 );
CWalkConf* genInterpolation3(CWalkConf keyframe3,CWalkConf keyframe4 );
CWalkConf genStandConf(CPosition in) ;
CWalkConf AKeyframe(CPosition from, CPosition to);
CWalkConf BKeyframe(CPosition from, CPosition to);
CWalkConf CKeyframe(CPosition from, CPosition to) ;
CWalkConf* genInterpolationA(CWalkConf keyframe1,CWalkConf keyframe2 );
CWalkConf* genInterpolationAA(CWalkConf keyframe1,CWalkConf keyframe2 );
CWalkConf* genInterpolationB(CWalkConf keyframe2,CWalkConf keyframe3 ) ;
CWalkConf* genInterpolationC(CWalkConf keyframe3,CWalkConf keyframe4 );
CPosition loca_f_knee(CWalkConf w);
CPosition loca_f_ankle(CWalkConf w);
CPosition loca_f_toetip(CWalkConf w);
CPosition loca_b_knee(CWalkConf w);
CPosition loca_b_ankle(CWalkConf w);
CPosition loca_b_toetip(CWalkConf w);
CPosition findPosition(CPosition l, double len, double theta);
double calIncluded(double a, double b, double c) ;
double antiCalIncluded(double a, double b, double theta);
double interJoint(double s, double e, int i, int total) ;
CPosition interCartesian(CPosition s, CPosition e, int i, int total);
CWalkConf genKeyframe4(CPosition from, CPosition to);
CWalkConf genKeyframe3(CPosition from, CPosition to);
CWalkConf genKeyframe2(CPosition from, CPosition to);
CWalkConf genKeyframe1(CPosition from, CPosition to);
CWalkConf* walk(CPosition from,CPosition to,CPosition next );
double len_trunk;
double len_neck;
double head;
private:
double len_thigh ; // the length of thigh
double len_calf ; // the length of calf
double len_foot ; // the length of foot
double ulimit_hip ; // the maximum value for the rotation of hip
double llimit_hip ; // the minimum value for the rotation of hip
double ulimit_knee ; // the maximum value for the rotation of knee
double llimit_knee ; // the minimum value for the rotation of knee
double ulimit_ankle ; // the maximum value for the rotation of ankle
double llimit_ankle ; // the minimum value for the rotation of ankle
/*** Control Variables*/
bool IsLeftLegFront ; // true -> LeftLeg is front leg
/*** Buffers to keep the information for Walk*/
CPosition preFrom ; // the step is from where
CPosition preTo ; // the step is to where
CWalkConf* wa ; // buffers to put the result
CWalker();
virtual ~CWalker();
};
#endif // !defined(AFX_WALKER_H__AA8ABAC4_007E_4143_AA76_890A5ADF2FF9__INCLUDED_)