True Axis Physics SDK 1.2.0.1 Beta Documentation
www.trueaxis.com

IKSolver.h

00001 //---------------------------------------------------------------------------------
00002 // File Name: IKSolver.h
00003 // Description:
00004 //
00005 // Copyright (C) 2004 - 2006 True Axis Pty Ltd, Australia. 
00006 // All Rights Reserved.
00007 //
00008 // History:
00009 //      Luke Ryan:          Created
00010 //---------------------------------------------------------------------------------
00011 
00012 #ifndef TA_IKSOLVER_H
00013 #define TA_IKSOLVER_H
00014 
00015 #ifndef TA_MATRIX_H
00016 #include "Matrix.h"
00017 #endif // TA_MATRIX_H
00018 
00019 namespace TA
00020 {
00021 
00022 class TACOMMON_CLASS IKSolve2BoneSystem
00023 {
00024 public:
00025     IKSolve2BoneSystem(
00026         const Vec3& v3A,            // Start 
00027         const Vec3& v3B,            // Middle
00028         const Vec3& v3C,            // End
00029         const Vec3& v3Target,       // Where to try and put the end position.
00030         const Vec3& v3JointAim);    // Where to aim the elbow.
00031 
00032     //---------------------------------------------------------------------------------
00033     // Get the Amount to rotate the bone 1.
00034     //---------------------------------------------------------------------------------
00035     const Mat33& GetAmountToRotateBone1() { return m_m33Bone1Rotation; }
00036 
00037     //---------------------------------------------------------------------------------
00038     // Get the Amount to rotate the bone 2. Assumes bone 2 is a child of bone1.
00039     //---------------------------------------------------------------------------------
00040     const Mat33& GetAmountToRotateBone2() { return m_m33Bone2Rotation; }
00041 
00042 private:
00043     Vec3 m_v3NewB;
00044     Vec3 m_v3NewC;
00045     Mat33 m_m33Bone1Rotation;
00046     Mat33 m_m33Bone2Rotation; 
00047 };
00048 
00049 };
00050 
00051 #endif // TA_IKSOLVER_H


© Copyright 2004-2006 TRUE AXIS PTY LTD Australia. All rights reserved.