PageRenderTime 213ms CodeModel.GetById 80ms app.highlight 6ms RepoModel.GetById 75ms app.codeStats 0ms

/indra/llcharacter/llkeyframestandmotion.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 116 lines | 50 code | 22 blank | 44 comment | 0 complexity | a084fd8a2bc75ae4346945976ca9e83b MD5 | raw file
  1/** 
  2 * @file llkeyframestandmotion.h
  3 * @brief Implementation of LLKeyframeStandMotion class.
  4 *
  5 * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6 * Second Life Viewer Source Code
  7 * Copyright (C) 2010, Linden Research, Inc.
  8 * 
  9 * This library is free software; you can redistribute it and/or
 10 * modify it under the terms of the GNU Lesser General Public
 11 * License as published by the Free Software Foundation;
 12 * version 2.1 of the License only.
 13 * 
 14 * This library is distributed in the hope that it will be useful,
 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 17 * Lesser General Public License for more details.
 18 * 
 19 * You should have received a copy of the GNU Lesser General Public
 20 * License along with this library; if not, write to the Free Software
 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 22 * 
 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 24 * $/LicenseInfo$
 25 */
 26
 27#ifndef LL_LLKEYFRAMESTANDMOTION_H
 28#define LL_LLKEYFRAMESTANDMOTION_H
 29
 30//-----------------------------------------------------------------------------
 31// Header files
 32//-----------------------------------------------------------------------------
 33#include "llkeyframemotion.h"
 34#include "lljointsolverrp3.h"
 35
 36
 37//-----------------------------------------------------------------------------
 38// class LLKeyframeStandMotion
 39//-----------------------------------------------------------------------------
 40class LLKeyframeStandMotion :
 41	public LLKeyframeMotion
 42{
 43public:
 44	// Constructor
 45	LLKeyframeStandMotion(const LLUUID &id);
 46
 47	// Destructor
 48	virtual ~LLKeyframeStandMotion();
 49
 50public:
 51	//-------------------------------------------------------------------------
 52	// functions to support MotionController and MotionRegistry
 53	//-------------------------------------------------------------------------
 54
 55	// static constructor
 56	// all subclasses must implement such a function and register it
 57	static LLMotion *create(const LLUUID &id) { return new LLKeyframeStandMotion(id); }
 58
 59public:
 60	//-------------------------------------------------------------------------
 61	// animation callbacks to be implemented by subclasses
 62	//-------------------------------------------------------------------------
 63	virtual LLMotionInitStatus onInitialize(LLCharacter *character);
 64	virtual BOOL onActivate();
 65	void	onDeactivate();
 66	virtual BOOL onUpdate(F32 time, U8* joint_mask);
 67
 68public:
 69	//-------------------------------------------------------------------------
 70	// Member Data
 71	//-------------------------------------------------------------------------
 72	LLCharacter	*mCharacter;
 73
 74	BOOL				mFlipFeet;
 75
 76	LLPointer<LLJointState>	mPelvisState;
 77
 78	LLPointer<LLJointState>	mHipLeftState;
 79	LLPointer<LLJointState>	mKneeLeftState;
 80	LLPointer<LLJointState>	mAnkleLeftState;
 81
 82	LLPointer<LLJointState>	mHipRightState;
 83	LLPointer<LLJointState>	mKneeRightState;
 84	LLPointer<LLJointState>	mAnkleRightState;
 85
 86	LLJoint				mPelvisJoint;
 87
 88	LLJoint				mHipLeftJoint;
 89	LLJoint				mKneeLeftJoint;
 90	LLJoint				mAnkleLeftJoint;
 91	LLJoint				mTargetLeft;
 92
 93	LLJoint				mHipRightJoint;
 94	LLJoint				mKneeRightJoint;
 95	LLJoint				mAnkleRightJoint;
 96	LLJoint				mTargetRight;
 97
 98	LLJointSolverRP3	mIKLeft;
 99	LLJointSolverRP3	mIKRight;
100
101	LLVector3			mPositionLeft;
102	LLVector3			mPositionRight;
103	LLVector3			mNormalLeft;
104	LLVector3			mNormalRight;
105	LLQuaternion		mRotationLeft;
106	LLQuaternion		mRotationRight;
107
108	LLQuaternion		mLastGoodPelvisRotation;
109	LLVector3			mLastGoodPosition;
110	BOOL				mTrackAnkles;
111
112	S32					mFrameNum;
113};
114
115#endif // LL_LLKEYFRAMESTANDMOTION_H
116