PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/indra/llcharacter/llkeyframefallmotion.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 78 lines | 24 code | 10 blank | 44 comment | 0 complexity | 3fba30aa5481e8f864b41215a22bf663 MD5 | raw file
 1/** 
 2 * @file llkeyframefallmotion.h
 3 * @brief Implementation of LLKeframeWalkMotion 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_LLKeyframeFallMotion_H
28#define LL_LLKeyframeFallMotion_H
29
30//-----------------------------------------------------------------------------
31// Header files
32//-----------------------------------------------------------------------------
33#include "llkeyframemotion.h"
34#include "llcharacter.h"
35
36//-----------------------------------------------------------------------------
37// class LLKeyframeFallMotion
38//-----------------------------------------------------------------------------
39class LLKeyframeFallMotion :
40	public LLKeyframeMotion
41{
42public:
43	// Constructor
44	LLKeyframeFallMotion(const LLUUID &id);
45
46	// Destructor
47	virtual ~LLKeyframeFallMotion();
48
49public:
50	//-------------------------------------------------------------------------
51	// functions to support MotionController and MotionRegistry
52	//-------------------------------------------------------------------------
53
54	// static constructor
55	// all subclasses must implement such a function and register it
56	static LLMotion *create(const LLUUID &id) { return new LLKeyframeFallMotion(id); }
57
58public:
59	//-------------------------------------------------------------------------
60	// animation callbacks to be implemented by subclasses
61	//-------------------------------------------------------------------------
62	virtual LLMotionInitStatus onInitialize(LLCharacter *character);
63	virtual BOOL onActivate();
64	virtual F32 getEaseInDuration();
65	virtual BOOL onUpdate(F32 activeTime, U8* joint_mask);
66
67protected:
68	//-------------------------------------------------------------------------
69	// Member Data
70	//-------------------------------------------------------------------------
71	LLCharacter*	mCharacter;
72	F32				mVelocityZ;
73	LLPointer<LLJointState>	mPelvisState;
74	LLQuaternion	mRotationToGroundNormal;
75};
76
77#endif // LL_LLKeyframeFallMotion_H
78