//Leg.h #ifndef LEG_H #define LEG_H #include #include "InverseKinemetics.h" #include #include using namespace std; class Leg { public: //Variable D3DXVECTOR3 OffsetVector, SizeVector, Coordinate; struct vector MoveSpace; bool MoveSpaceRenderd; D3DXVECTOR3 ModelSpaceHip, ModelSpaceKnee, ModelSpaceFeet; vector WorldSpaceLineModel; bool Error; HDC HDCBuffer, HDCSecondBuffer; //Initial Leg(); ~Leg(); void GetHDC( HDC hdc ); void GetHDCSecondBuffer( HDC hdc ); //Input void Coordinates( float ix, float iy, float iz ); void Coordinates( D3DXVECTOR3 i ); void Offset( float ix, float iy, float iz ); void Offset( D3DXVECTOR3 i ); void Size( float ix, float iy, float iz ); void Size( D3DXVECTOR3 i ); //Functions void GetPossibleMoveSpace( ); void CalculateLegRight( ); void CalculateWorldSpaceLineModel( ); void PrintMoveSpaceOnWorldSpace( ); void PrintWorldSpaceLineModel( ); void Print3DLinesOnWorldSpace( ); }; #endif /* Z-Axis Rotation x' = x*cos q - y*sin q y' = x*sin q + y*cos q z' = z X-Axis Rotation y' = y*cos q - z*sin q z' = y*sin q + z*cos q x' = x Y-Axis Rotation z' = z*cos q - x*sin q x' = z*sin q + x*cos q y' = y */