diff options
author | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:34 -0500 |
commit | cd17687f01420952712a500107e0f93e7ab8d5f8 (patch) | |
tree | ce48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llanimalcontrols.h | |
parent | Second Life viewer sources 1.19.0.5 (diff) | |
download | meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2 meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz |
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llanimalcontrols.h | 196 |
1 files changed, 0 insertions, 196 deletions
diff --git a/linden/indra/newview/llanimalcontrols.h b/linden/indra/newview/llanimalcontrols.h deleted file mode 100644 index 4235d98..0000000 --- a/linden/indra/newview/llanimalcontrols.h +++ /dev/null | |||
@@ -1,196 +0,0 @@ | |||
1 | /** | ||
2 | * @file llanimalcontrols.h | ||
3 | * @brief LLAnimalControls class definition | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2005&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2005-2008, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #ifndef LL_LLANIMALCONTROLS_H | ||
33 | #define LL_LLANIMALCONTROLS_H | ||
34 | |||
35 | #include "llhudobject.h" | ||
36 | #include "llflexibleobject.h" | ||
37 | |||
38 | //----------------------------------------------------------------------------------- | ||
39 | // Default setting for the attributes of a animalControls object... | ||
40 | //----------------------------------------------------------------------------------- | ||
41 | //const LLVector3 ANIMAL_CONTROLS_DEFAULT_ANCHOR_DIRECTION = LLVector3::z_axis; | ||
42 | //const LLVector3 ANIMAL_CONTROLS_DEFAULT_ANCHOR_POSITION_OFFSET = LLVector3::zero; | ||
43 | //const LLColor4 ANIMAL_CONTROLS_DEFAULT_COLOR = LLColor4( 1.0f, 1.0f, 1.0f, 1.0f ); | ||
44 | //const F32 ANIMAL_CONTROLS_DEFAULT_GRAVITY = 0.3f; | ||
45 | //const F32 ANIMAL_CONTROLS_DEFAULT_TENSION = 10.0f; | ||
46 | //const F32 ANIMAL_CONTROLS_DEFAULT_AIR_FRICTION = 10.0f; | ||
47 | //const F32 ANIMAL_CONTROLS_DEFAULT_LENGTH = 1.0f; | ||
48 | //const int ANIMAL_CONTROLS_DEFAULT_NUM_SECTIONS = 4; | ||
49 | //const F32 ANIMAL_CONTROLS_DEFAULT_ANCHOR_RADIUS = 0.05f; | ||
50 | //const F32 ANIMAL_CONTROLS_DEFAULT_RADIUS_CHANGE = -0.01f; | ||
51 | |||
52 | class LLViewerObject; | ||
53 | |||
54 | /*struct LLAnimalControlsBodyBehavior | ||
55 | { | ||
56 | LLVector3 mPosition; | ||
57 | LLQuaternion mHipRotation; | ||
58 | }; | ||
59 | |||
60 | class LLAnimalControlsHeadBehavior | ||
61 | { | ||
62 | private: | ||
63 | LLVector3 mBodyPosition; | ||
64 | LLQuaternion mBodyRotation; | ||
65 | LLHUDFlexibleObject mFeather; | ||
66 | LLVector3 mPosition; | ||
67 | LLQuaternion mRotation; | ||
68 | LLVector3 mFocusPosition; | ||
69 | bool mEyesBlinking; | ||
70 | F32 mEyeBlinkRate; | ||
71 | |||
72 | public: | ||
73 | LLAnimalControlsHeadBehavior(); | ||
74 | void setBodyPositionAndRotation( LLVector3 p, LLQuaternion r ); | ||
75 | void setFocusPosition( LLVector3 focusPosition ); | ||
76 | void update(); | ||
77 | void render(); | ||
78 | }; | ||
79 | |||
80 | |||
81 | class LLAnimalControlsLegBehavior | ||
82 | { | ||
83 | private: | ||
84 | LLVector3 mBodyPosition; | ||
85 | LLQuaternion mBodyRotation; | ||
86 | LLVector3 mHipAnchorPosition; | ||
87 | bool mWalking; | ||
88 | bool mIsLeft; | ||
89 | |||
90 | public: | ||
91 | LLAnimalControlsLegBehavior(); | ||
92 | void setBodyPositionAndRotation( LLVector3 p, LLQuaternion r ); | ||
93 | void update(); | ||
94 | void render(); | ||
95 | }; | ||
96 | |||
97 | |||
98 | class LLAnimalControlsVirtualServer | ||
99 | { | ||
100 | private: | ||
101 | int fakeClock; | ||
102 | LLVector3 focusPosition; | ||
103 | bool settingFocusPosition; | ||
104 | LLVector3 animalPosition; | ||
105 | LLQuaternion animalRotation; | ||
106 | |||
107 | public: | ||
108 | LLAnimalControlsVirtualServer(); | ||
109 | bool getSettingFocusPosition(); | ||
110 | LLVector3 getFocusPosition(); | ||
111 | void update(); | ||
112 | void setParentPositionAndRotation( LLVector3 p, LLQuaternion q ); | ||
113 | }; | ||
114 | |||
115 | |||
116 | //------------------------------------------------- | ||
117 | // This structure is also used in the part of the | ||
118 | // code that creates new animalControls objects. | ||
119 | //------------------------------------------------- | ||
120 | struct LLAnimalControlsAttributes | ||
121 | { | ||
122 | //LLVector3 mAnchorPositionOffset; | ||
123 | //LLVector3 mAnchorDirection; | ||
124 | //LLColor4 mColor; | ||
125 | //F32 mAnchorRadius; | ||
126 | //S32 mNumSections; | ||
127 | //F32 mLength; | ||
128 | //F32 mGravity; | ||
129 | //F32 mAirFriction; | ||
130 | //F32 mTension; | ||
131 | //F32 mRadiusChange; | ||
132 | bool mUsingBodyControls; | ||
133 | bool mUsingHeadControls; | ||
134 | bool mUsingTailControls; | ||
135 | bool mUsingLegControls; | ||
136 | |||
137 | //------ the constructor for the structure ------------ | ||
138 | LLAnimalControlsAttributes() | ||
139 | { | ||
140 | //mAnchorPositionOffset = ANIMAL_CONTROLS_DEFAULT_ANCHOR_DIRECTION; | ||
141 | //mAnchorDirection = ANIMAL_CONTROLS_DEFAULT_ANCHOR_POSITION_OFFSET; | ||
142 | //mAnchorRadius = ANIMAL_CONTROLS_DEFAULT_ANCHOR_RADIUS; | ||
143 | //mColor = ANIMAL_CONTROLS_DEFAULT_COLOR; | ||
144 | //mNumSections = ANIMAL_CONTROLS_DEFAULT_NUM_SECTIONS; | ||
145 | //mLength = ANIMAL_CONTROLS_DEFAULT_LENGTH; | ||
146 | //mGravity = ANIMAL_CONTROLS_DEFAULT_GRAVITY; | ||
147 | //mAirFriction = ANIMAL_CONTROLS_DEFAULT_AIR_FRICTION; | ||
148 | //mTension = ANIMAL_CONTROLS_DEFAULT_TENSION; | ||
149 | //mRadiusChange = ANIMAL_CONTROLS_DEFAULT_RADIUS_CHANGE; | ||
150 | } | ||
151 | };// end of attributes structure | ||
152 | |||
153 | |||
154 | |||
155 | //--------------------------------------------------------- | ||
156 | // The LLHUDAnimalControls class | ||
157 | //--------------------------------------------------------- | ||
158 | class LLHUDAnimalControls : public LLHUDObject | ||
159 | { | ||
160 | public: | ||
161 | LLHUDAnimalControls(); | ||
162 | void setParentObject( LLViewerObject * ); | ||
163 | void setAttributes( LLAnimalControlsAttributes ); | ||
164 | void markAsDead(); | ||
165 | void update(); | ||
166 | LLViewerObject * getParentObject(); | ||
167 | void render(); | ||
168 | |||
169 | private: | ||
170 | //-------------------------------------- | ||
171 | // private members | ||
172 | //-------------------------------------- | ||
173 | LLViewerObject* mParentObject; | ||
174 | LLAnimalControlsAttributes mAttributes; | ||
175 | LLAnimalControlsHeadBehavior mHeadBehavior; | ||
176 | LLAnimalControlsLegBehavior mLeftLegBehavior; | ||
177 | LLAnimalControlsLegBehavior mRightLegBehavior; | ||
178 | LLAnimalControlsVirtualServer mVirtualServer; | ||
179 | |||
180 | //-------------------------------------- | ||
181 | // private methods | ||
182 | //-------------------------------------- | ||
183 | void updateVirtualServer(); | ||
184 | void updateBodyBehavior(); | ||
185 | void renderBodyBehavior(); | ||
186 | //void updateLegBehavior(); | ||
187 | //void renderLegBehavior(); | ||
188 | //void updateHeadBehavior(); | ||
189 | //void renderHeadBehavior(); | ||
190 | |||
191 | friend class LLHUDObject; | ||
192 | |||
193 | };// end of class definition | ||
194 | |||
195 | */ | ||
196 | #endif // LL_LLANIMALCONTROLS_H | ||