diff options
author | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:46 -0500 |
commit | 38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch) | |
tree | adca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llviewerjointattachment.h | |
parent | README.txt (diff) | |
download | meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2 meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz |
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewerjointattachment.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewerjointattachment.h b/linden/indra/newview/llviewerjointattachment.h new file mode 100644 index 0000000..3d5f914 --- /dev/null +++ b/linden/indra/newview/llviewerjointattachment.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /** | ||
2 | * @file llviewerjointattachment.h | ||
3 | * @brief Implementation of LLViewerJointAttachment class | ||
4 | * | ||
5 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
8 | * to you under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
10 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
11 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
12 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
13 | * | ||
14 | * There are special exceptions to the terms and conditions of the GPL as | ||
15 | * it is applied to this Source Code. View the full text of the exception | ||
16 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
17 | * online at http://secondlife.com/developers/opensource/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #ifndef LL_LLVIEWERJOINTATTACHMENT_H | ||
29 | #define LL_LLVIEWERJOINTATTACHMENT_H | ||
30 | |||
31 | //----------------------------------------------------------------------------- | ||
32 | // Header Files | ||
33 | //----------------------------------------------------------------------------- | ||
34 | #include "llviewerjoint.h" | ||
35 | #include "llstring.h" | ||
36 | #include "lluuid.h" | ||
37 | |||
38 | class LLDrawable; | ||
39 | class LLViewerObject; | ||
40 | |||
41 | //----------------------------------------------------------------------------- | ||
42 | // class LLViewerJointAttachment | ||
43 | //----------------------------------------------------------------------------- | ||
44 | class LLViewerJointAttachment : | ||
45 | public LLViewerJoint | ||
46 | { | ||
47 | public: | ||
48 | LLViewerJointAttachment(); | ||
49 | virtual ~LLViewerJointAttachment(); | ||
50 | |||
51 | //virtual U32 render( F32 pixelArea ); // Returns triangle count | ||
52 | |||
53 | // Returns true if this object is transparent. | ||
54 | // This is used to determine in which order to draw objects. | ||
55 | /*virtual*/ BOOL isTransparent(); | ||
56 | |||
57 | // Draws the shape attached to a joint. | ||
58 | // Called by render(). | ||
59 | /*virtual*/ U32 drawShape( F32 pixelArea ); | ||
60 | |||
61 | /*virtual*/ BOOL updateLOD(F32 pixel_area, BOOL activate); | ||
62 | |||
63 | // | ||
64 | // accessors | ||
65 | // | ||
66 | |||
67 | void setJoint (LLJoint* joint) { mJoint = joint; } | ||
68 | void setPieSlice(S32 pie_slice) { mPieSlice = pie_slice; } | ||
69 | void setVisibleInFirstPerson(BOOL visibility) { mVisibleInFirst = visibility; } | ||
70 | BOOL getVisibleInFirstPerson() { return mVisibleInFirst; } | ||
71 | void setGroup(S32 group) { mGroup = group; } | ||
72 | void setOriginalPosition(LLVector3 &position); | ||
73 | void setAttachmentVisibility(BOOL visible); | ||
74 | void setIsHUDAttachment(BOOL is_hud) { mIsHUDAttachment = is_hud; } | ||
75 | BOOL getIsHUDAttachment() { return mIsHUDAttachment; } | ||
76 | |||
77 | BOOL isAnimatable() { return FALSE; } | ||
78 | |||
79 | S32 getGroup() { return mGroup; } | ||
80 | S32 getPieSlice() { return mPieSlice; } | ||
81 | BOOL getAttachmentDirty() { return mAttachmentDirty && mAttachedObject; } | ||
82 | LLViewerObject *getObject(S32 i) { return mAttachedObject; } | ||
83 | S32 getNumObjects() { return (mAttachedObject ? 1 : 0); } | ||
84 | const LLUUID& getItemID() { return mItemID; } | ||
85 | |||
86 | // | ||
87 | // unique methods | ||
88 | // | ||
89 | BOOL addObject(LLViewerObject* object); | ||
90 | void removeObject(LLViewerObject *object); | ||
91 | |||
92 | void lazyAttach(); | ||
93 | void setupDrawable(LLDrawable* drawable); | ||
94 | void clampObjectPosition(); | ||
95 | |||
96 | protected: | ||
97 | void calcLOD(); | ||
98 | |||
99 | protected: | ||
100 | LLJoint* mJoint; | ||
101 | LLViewerObject* mAttachedObject; | ||
102 | BOOL mAttachmentDirty; // does attachment drawable need to be fixed up? | ||
103 | BOOL mVisibleInFirst; | ||
104 | LLVector3 mOriginalPos; | ||
105 | S32 mGroup; | ||
106 | BOOL mIsHUDAttachment; | ||
107 | S32 mPieSlice; | ||
108 | LLUUID mItemID; // Inventory item id of the attached item (null if not in inventory) | ||
109 | }; | ||
110 | |||
111 | #endif // LL_LLVIEWERJOINTATTACHMENT_H | ||