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/llvoavatar.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 'linden/indra/newview/llvoavatar.h')
-rw-r--r-- | linden/indra/newview/llvoavatar.h | 59 |
1 files changed, 42 insertions, 17 deletions
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index a8b8486..2033fda 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h | |||
@@ -43,7 +43,6 @@ | |||
43 | #include "llchat.h" | 43 | #include "llchat.h" |
44 | #include "llviewerobject.h" | 44 | #include "llviewerobject.h" |
45 | #include "lljointsolverrp3.h" | 45 | #include "lljointsolverrp3.h" |
46 | #include "llviewerjointshape.h" | ||
47 | #include "llviewerjointmesh.h" | 46 | #include "llviewerjointmesh.h" |
48 | #include "llviewerjointattachment.h" | 47 | #include "llviewerjointattachment.h" |
49 | #include "llcharacter.h" | 48 | #include "llcharacter.h" |
@@ -54,6 +53,7 @@ | |||
54 | #include "llframetimer.h" | 53 | #include "llframetimer.h" |
55 | #include "llxmltree.h" | 54 | #include "llxmltree.h" |
56 | #include "llwearable.h" | 55 | #include "llwearable.h" |
56 | #include "llrendertarget.h" | ||
57 | 57 | ||
58 | //Ventrella | 58 | //Ventrella |
59 | //#include "llvoiceclient.h" | 59 | //#include "llvoiceclient.h" |
@@ -62,6 +62,7 @@ | |||
62 | 62 | ||
63 | const S32 VOAVATAR_SCRATCH_TEX_WIDTH = 512; | 63 | const S32 VOAVATAR_SCRATCH_TEX_WIDTH = 512; |
64 | const S32 VOAVATAR_SCRATCH_TEX_HEIGHT = 512; | 64 | const S32 VOAVATAR_SCRATCH_TEX_HEIGHT = 512; |
65 | const S32 VOAVATAR_IMPOSTOR_PERIOD = 2; | ||
65 | 66 | ||
66 | const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise" | 67 | const LLUUID ANIM_AGENT_BODY_NOISE = LLUUID("9aa8b0a6-0c6f-9518-c7c3-4f41f2c001ad"); //"body_noise" |
67 | const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot" | 68 | const LLUUID ANIM_AGENT_BREATHE_ROT = LLUUID("4c5a103e-b830-2f1c-16bc-224aa0ad5bc8"); //"breathe_rot" |
@@ -269,6 +270,8 @@ public: | |||
269 | LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); | 270 | LLVOAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); |
270 | /*virtual*/ void markDead(); | 271 | /*virtual*/ void markDead(); |
271 | 272 | ||
273 | static void updateImpostors(); | ||
274 | |||
272 | //-------------------------------------------------------------------- | 275 | //-------------------------------------------------------------------- |
273 | // LLViewerObject interface | 276 | // LLViewerObject interface |
274 | //-------------------------------------------------------------------- | 277 | //-------------------------------------------------------------------- |
@@ -288,6 +291,7 @@ public: | |||
288 | // Graphical stuff for objects - maybe broken out into render class later? | 291 | // Graphical stuff for objects - maybe broken out into render class later? |
289 | 292 | ||
290 | U32 renderFootShadows(); | 293 | U32 renderFootShadows(); |
294 | U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255)); | ||
291 | U32 renderRigid(); | 295 | U32 renderRigid(); |
292 | U32 renderSkinned(EAvatarRenderPass pass); | 296 | U32 renderSkinned(EAvatarRenderPass pass); |
293 | U32 renderTransparent(); | 297 | U32 renderTransparent(); |
@@ -296,10 +300,10 @@ public: | |||
296 | /*virtual*/ void updateTextures(LLAgent &agent); | 300 | /*virtual*/ void updateTextures(LLAgent &agent); |
297 | // If setting a baked texture, need to request it from a non-local sim. | 301 | // If setting a baked texture, need to request it from a non-local sim. |
298 | /*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); | 302 | /*virtual*/ S32 setTETexture(const U8 te, const LLUUID& uuid); |
299 | 303 | /*virtual*/ void onShift(const LLVector3& shift_vector); | |
300 | virtual U32 getPartitionType() const; | 304 | virtual U32 getPartitionType() const; |
301 | 305 | ||
302 | void updateVisibility(BOOL force_invisible); | 306 | void updateVisibility(); |
303 | void updateAttachmentVisibility(U32 camera_mode); | 307 | void updateAttachmentVisibility(U32 camera_mode); |
304 | void clampAttachmentPositions(); | 308 | void clampAttachmentPositions(); |
305 | S32 getAttachmentCount(); // Warning: order(N) not order(1) | 309 | S32 getAttachmentCount(); // Warning: order(N) not order(1) |
@@ -309,8 +313,6 @@ public: | |||
309 | // void renderHUD(BOOL for_select); // old | 313 | // void renderHUD(BOOL for_select); // old |
310 | void rebuildHUD(); | 314 | void rebuildHUD(); |
311 | 315 | ||
312 | static void updateAllAvatarVisiblity(); | ||
313 | |||
314 | /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); | 316 | /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline); |
315 | /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); | 317 | /*virtual*/ BOOL updateGeometry(LLDrawable *drawable); |
316 | void updateShadowFaces(); | 318 | void updateShadowFaces(); |
@@ -318,13 +320,20 @@ public: | |||
318 | /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); | 320 | /*virtual*/ void setPixelAreaAndAngle(LLAgent &agent); |
319 | BOOL updateJointLODs(); | 321 | BOOL updateJointLODs(); |
320 | 322 | ||
321 | void writeCAL3D(std::string& path, std::string& file_base); | ||
322 | |||
323 | virtual void updateRegion(LLViewerRegion *regionp); | 323 | virtual void updateRegion(LLViewerRegion *regionp); |
324 | |||
325 | 324 | ||
325 | virtual const LLVector3 getRenderPosition() const; | ||
326 | virtual void updateDrawable(BOOL force_damped); | ||
326 | void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax); | 327 | void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax); |
327 | 328 | void getSpatialExtents(LLVector3& newMin, LLVector3& newMax); | |
329 | BOOL isImpostor() const; | ||
330 | BOOL needsImpostorUpdate() const; | ||
331 | const LLVector3& getImpostorOffset() const; | ||
332 | const LLVector2& getImpostorDim() const; | ||
333 | void getImpostorValues(LLVector3* extents, LLVector3& angle, F32& distance); | ||
334 | void cacheImpostorValues(); | ||
335 | void setImpostorDim(const LLVector2& dim); | ||
336 | |||
328 | //-------------------------------------------------------------------- | 337 | //-------------------------------------------------------------------- |
329 | // texture entry assignment | 338 | // texture entry assignment |
330 | //-------------------------------------------------------------------- | 339 | //-------------------------------------------------------------------- |
@@ -448,7 +457,7 @@ public: | |||
448 | 457 | ||
449 | void computeBodySize(); | 458 | void computeBodySize(); |
450 | 459 | ||
451 | void updateCharacter(LLAgent &agent); | 460 | BOOL updateCharacter(LLAgent &agent); |
452 | void updateHeadOffset(); | 461 | void updateHeadOffset(); |
453 | 462 | ||
454 | LLUUID& getStepSound(); | 463 | LLUUID& getStepSound(); |
@@ -546,8 +555,7 @@ public: | |||
546 | static void deleteCachedImages(); | 555 | static void deleteCachedImages(); |
547 | static void destroyGL(); | 556 | static void destroyGL(); |
548 | static void restoreGL(); | 557 | static void restoreGL(); |
549 | static void initVertexPrograms(); | 558 | static void resetImpostors(); |
550 | static void cleanupVertexPrograms(); | ||
551 | static enum EWearableType getTEWearableType( S32 te ); | 559 | static enum EWearableType getTEWearableType( S32 te ); |
552 | static LLUUID getDefaultTEImageID( S32 te ); | 560 | static LLUUID getDefaultTEImageID( S32 te ); |
553 | 561 | ||
@@ -696,6 +704,19 @@ public: | |||
696 | LLUUID mLastSkirtBakedID; | 704 | LLUUID mLastSkirtBakedID; |
697 | 705 | ||
698 | //-------------------------------------------------------------------- | 706 | //-------------------------------------------------------------------- |
707 | // impostor state | ||
708 | //-------------------------------------------------------------------- | ||
709 | LLRenderTarget mImpostor; | ||
710 | LLVector3 mImpostorOffset; | ||
711 | LLVector2 mImpostorDim; | ||
712 | BOOL mNeedsImpostorUpdate; | ||
713 | BOOL mNeedsAnimUpdate; | ||
714 | LLVector3 mImpostorExtents[2]; | ||
715 | LLVector3 mImpostorAngle; | ||
716 | F32 mImpostorDistance; | ||
717 | LLVector3 mLastAnimExtents[2]; | ||
718 | |||
719 | //-------------------------------------------------------------------- | ||
699 | // Misc Render State | 720 | // Misc Render State |
700 | //-------------------------------------------------------------------- | 721 | //-------------------------------------------------------------------- |
701 | BOOL mIsDummy; // For special views | 722 | BOOL mIsDummy; // For special views |
@@ -815,13 +836,14 @@ public: | |||
815 | // static members | 836 | // static members |
816 | //-------------------------------------------------------------------- | 837 | //-------------------------------------------------------------------- |
817 | static S32 sMaxVisible; | 838 | static S32 sMaxVisible; |
839 | static F32 sRenderDistance; //distance at which avatars will render (affected by control "RenderAvatarMaxVisible") | ||
818 | static S32 sCurJoint; | 840 | static S32 sCurJoint; |
819 | static S32 sCurVolume; | 841 | static S32 sCurVolume; |
820 | static BOOL sShowAnimationDebug; // show animation debug info | 842 | static BOOL sShowAnimationDebug; // show animation debug info |
843 | static BOOL sUseImpostors; //use impostors for far away avatars | ||
821 | static BOOL sShowFootPlane; // show foot collision plane reported by server | 844 | static BOOL sShowFootPlane; // show foot collision plane reported by server |
822 | static BOOL sShowCollisionVolumes; // show skeletal collision volumes | 845 | static BOOL sShowCollisionVolumes; // show skeletal collision volumes |
823 | static BOOL sVisibleInFirstPerson; | 846 | static BOOL sVisibleInFirstPerson; |
824 | |||
825 | static S32 sMaxOtherAvatarsToComposite; | 847 | static S32 sMaxOtherAvatarsToComposite; |
826 | 848 | ||
827 | static S32 sNumLODChangesThisFrame; | 849 | static S32 sNumLODChangesThisFrame; |
@@ -845,16 +867,16 @@ public: | |||
845 | static S32 sScratchTexBytes; | 867 | static S32 sScratchTexBytes; |
846 | 868 | ||
847 | // map of attachment points, by ID | 869 | // map of attachment points, by ID |
848 | LLPtrSkipMap<S32, LLViewerJointAttachment*> mAttachmentPoints; | 870 | typedef std::map<S32, LLViewerJointAttachment*> attachment_map_t; |
871 | attachment_map_t mAttachmentPoints; | ||
872 | |||
873 | std::vector<LLPointer<LLViewerObject> > mPendingAttachment; | ||
849 | 874 | ||
850 | // xml parse tree of avatar config file | 875 | // xml parse tree of avatar config file |
851 | static LLXmlTree sXMLTree; | 876 | static LLXmlTree sXMLTree; |
852 | // xml parse tree of avatar skeleton file | 877 | // xml parse tree of avatar skeleton file |
853 | static LLXmlTree sSkeletonXMLTree; | 878 | static LLXmlTree sSkeletonXMLTree; |
854 | 879 | ||
855 | // number of avatar duplicates, for debugging purposes | ||
856 | static BOOL sAvatarLoadTest; | ||
857 | |||
858 | // user-settable LOD factor | 880 | // user-settable LOD factor |
859 | static F32 sLODFactor; | 881 | static F32 sLODFactor; |
860 | 882 | ||
@@ -929,6 +951,9 @@ protected: | |||
929 | LLTexGlobalColor* mTexHairColor; | 951 | LLTexGlobalColor* mTexHairColor; |
930 | LLTexGlobalColor* mTexEyeColor; | 952 | LLTexGlobalColor* mTexEyeColor; |
931 | 953 | ||
954 | BOOL mNeedsSkin; //if TRUE, avatar has been animated and verts have not been updated | ||
955 | S32 mUpdatePeriod; | ||
956 | |||
932 | static LLVOAvatarSkeletonInfo* sSkeletonInfo; | 957 | static LLVOAvatarSkeletonInfo* sSkeletonInfo; |
933 | static LLVOAvatarInfo* sAvatarInfo; | 958 | static LLVOAvatarInfo* sAvatarInfo; |
934 | 959 | ||