PageRenderTime 24ms CodeModel.GetById 15ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llmorphview.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 87 lines | 41 code | 16 blank | 30 comment | 0 complexity | 611a7f0f0b74883da5ba017d779c934d MD5 | raw file
 1/** 
 2 * @file llmorphview.h
 3 * @brief Container for character morph controls
 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_LLMORPHVIEW_H
28#define LL_LLMORPHVIEW_H
29
30#include "llview.h"
31#include "v3dmath.h"
32#include "llframetimer.h"
33
34class LLJoint;
35
36class LLMorphView : public LLView
37{
38public:
39	struct Params : public LLInitParam::Block<Params, LLView::Params>
40	{
41		Params()
42		{
43			changeDefault(mouse_opaque, false);
44			changeDefault(follows.flags, FOLLOWS_ALL);
45		}
46	};
47	LLMorphView(const LLMorphView::Params&);
48	
49	void		shutdown();
50
51	// inherited methods
52	/*virtual*/ void	setVisible(BOOL visible);
53
54	void		setCameraTargetJoint(LLJoint *joint)		{mCameraTargetJoint = joint;}
55	LLJoint*	getCameraTargetJoint()						{return mCameraTargetJoint;}
56
57	void		setCameraOffset(const LLVector3d& camera_offset)	{mCameraOffset = camera_offset;}
58	void		setCameraTargetOffset(const LLVector3d& camera_target_offset) {mCameraTargetOffset = camera_target_offset;}
59
60	void		updateCamera();
61	void		setCameraDrivenByKeys( BOOL b );
62
63protected:
64	void		initialize();
65
66	LLJoint*	mCameraTargetJoint;
67	LLVector3d	mCameraOffset;
68	LLVector3d	mCameraTargetOffset;
69	LLVector3d	mOldCameraPos;
70	LLVector3d	mOldTargetPos;
71	F32			mOldCameraNearClip;
72	LLFrameTimer mCameraMoveTimer;
73
74	// camera rotation
75	F32			mCameraPitch;
76	F32			mCameraYaw;
77
78	BOOL		mCameraDrivenByKeys;
79};
80
81//
82// Globals
83//
84
85extern LLMorphView *gMorphView;
86
87#endif