From c9baf4c66157c601cc4d4e325c7843b3bf9a0cad Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 7 Jun 2017 14:23:49 +0100 Subject: SL-691,SL-694 - viewer can animate objects based on server messaging. First end-to-end demo for animated objects. --- indra/newview/llcontrolavatar.h | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 indra/newview/llcontrolavatar.h (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h new file mode 100644 index 0000000000..c8b1039363 --- /dev/null +++ b/indra/newview/llcontrolavatar.h @@ -0,0 +1,50 @@ +/** + * @file llcontrolavatar.h + * @brief Special dummy avatar used to drive rigged meshes. + * + * $LicenseInfo:firstyear=2017&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2017, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_CONTROLAVATAR_H +#define LL_CONTROLAVATAR_H + +#include "llvoavatar.h" +#include "llvovolume.h" + +class LLControlAvatar: + public LLVOAvatar +{ + LOG_CLASS(LLControlAvatar); + +public: + LLControlAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); + virtual ~LLControlAvatar(); + + void matchTransform(LLVOVolume *obj); + void updateGeom(LLVOVolume *obj); + + static LLControlAvatar *createControlAvatar(LLVOVolume *obj); + + bool mPlaying; +}; + +#endif //LL_CONTROLAVATAR_H -- cgit v1.2.3 From b2a06578187af5446b5e24379abc8764f0cd731f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 16 Jun 2017 16:03:06 +0100 Subject: SL-697 - global scale function for LLControlAvatar, to support arbitrary scaling of animated objects. Not currently used. --- indra/newview/llcontrolavatar.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index c8b1039363..a783b9228f 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -42,9 +42,13 @@ public: void matchTransform(LLVOVolume *obj); void updateGeom(LLVOVolume *obj); + void setGlobalScale(F32 scale); + void recursiveScaleJoint(LLJoint *joint, F32 factor); static LLControlAvatar *createControlAvatar(LLVOVolume *obj); bool mPlaying; + + F32 mGlobalScale; }; #endif //LL_CONTROLAVATAR_H -- cgit v1.2.3 From 4907e437c1a9523e3b3d098403da8c780c6345f9 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 20 Jun 2017 15:04:11 +0100 Subject: SL-731 - control avatar has pointer back to associated volume. Can use this link to find associated inventory item name for an animation in debug display. --- indra/newview/llcontrolavatar.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index a783b9228f..f29388e035 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -39,8 +39,8 @@ public: LLControlAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); virtual ~LLControlAvatar(); - void matchTransform(LLVOVolume *obj); - void updateGeom(LLVOVolume *obj); + void matchVolumeTransform(); + void updateVolumeGeom(); void setGlobalScale(F32 scale); void recursiveScaleJoint(LLJoint *joint, F32 factor); @@ -49,6 +49,8 @@ public: bool mPlaying; F32 mGlobalScale; + + LLVOVolume *mVolp; }; #endif //LL_CONTROLAVATAR_H -- cgit v1.2.3 From b6aedb116f60b9e4823f61b945b3f374d9267c1d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 27 Jun 2017 14:15:42 +0100 Subject: SL-722 - in progress on managing animated object state with linksets --- indra/newview/llcontrolavatar.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index f29388e035..bb54cc5b2d 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -50,7 +50,7 @@ public: F32 mGlobalScale; - LLVOVolume *mVolp; + LLVOVolume *mRootVolp; }; #endif //LL_CONTROLAVATAR_H -- cgit v1.2.3 From 7af46e7fe37552175c46a9366e9574bb9c716a68 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 27 Jun 2017 20:24:15 +0100 Subject: SL-722 - defer markDead() for LLControlAvatar when unlinking. Fixes asset crash in pipeline. Also added various checks for mDrawable null in llvoavatar.cpp. --- indra/newview/llcontrolavatar.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index bb54cc5b2d..5cca0ab9dd 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -46,11 +46,20 @@ public: void recursiveScaleJoint(LLJoint *joint, F32 factor); static LLControlAvatar *createControlAvatar(LLVOVolume *obj); + // Delayed kill so we don't make graphics pipeline unhappy calling + // markDead() inside other graphics pipeline operations. + void markForDeath(); + + virtual void idleUpdate(LLAgent &agent, const F64 &time); + bool mPlaying; F32 mGlobalScale; LLVOVolume *mRootVolp; + + bool mMarkedForDeath; + }; #endif //LL_CONTROLAVATAR_H -- cgit v1.2.3 From a09cc5f4bb9ccf93db7233d0b1fd0142803b2f23 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 30 Jun 2017 20:49:23 +0100 Subject: SL-731 - added a hook for debug text specific to control avatars. Also renamed resetJointsOnDetach to removeAttachmentOverridesForObject to make the connection to addAttachmentOverridesForObject more obvious. --- indra/newview/llcontrolavatar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 5cca0ab9dd..fc7b4aa06d 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -52,6 +52,8 @@ public: virtual void idleUpdate(LLAgent &agent, const F64 &time); + virtual void updateDebugText(); + bool mPlaying; F32 mGlobalScale; -- cgit v1.2.3 From f55667397e75991348fa25b6ad581a36de99acf0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 6 Jul 2017 01:25:10 +0100 Subject: SL-722 - handle per-object animation requests, combine for control avatar animation state. --- indra/newview/llcontrolavatar.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index fc7b4aa06d..1be2d58441 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -51,6 +51,9 @@ public: void markForDeath(); virtual void idleUpdate(LLAgent &agent, const F64 &time); + + void getAnimatedVolumes(std::vector& volumes); + void updateAnimations(); virtual void updateDebugText(); -- cgit v1.2.3 From 6837ca5cd899d0aba71f856f540b535a7fc78595 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 18 Jul 2017 19:33:14 +0100 Subject: SL-727 - right-click menus and hover info ignore control avatars. --- indra/newview/llcontrolavatar.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 1be2d58441..a6b77b73ba 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -55,6 +55,17 @@ public: void getAnimatedVolumes(std::vector& volumes); void updateAnimations(); + virtual LLViewerObject* lineSegmentIntersectRiggedAttachments( + const LLVector4a& start, const LLVector4a& end, + S32 face = -1, // which face to check, -1 = ALL_SIDES + BOOL pick_transparent = FALSE, + BOOL pick_rigged = FALSE, + S32* face_hit = NULL, // which face was hit + LLVector4a* intersection = NULL, // return the intersection point + LLVector2* tex_coord = NULL, // return the texture coordinates of the intersection point + LLVector4a* normal = NULL, // return the surface normal at the intersection point + LLVector4a* tangent = NULL); // return the surface tangent at the intersection point + virtual void updateDebugText(); bool mPlaying; -- cgit v1.2.3 From fff9dde8a8ec5f3afb2ebd32fc0d54827671fc2a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 11 Sep 2017 21:40:39 +0100 Subject: SL-726, SL-718 - refactoring updateCharacter() --- indra/newview/llcontrolavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index a6b77b73ba..308d431615 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -51,6 +51,7 @@ public: void markForDeath(); virtual void idleUpdate(LLAgent &agent, const F64 &time); + virtual BOOL updateCharacter(LLAgent &agent); void getAnimatedVolumes(std::vector& volumes); void updateAnimations(); -- cgit v1.2.3 From 2f1b75f03e8066b54d9dae16ab29095752c4ee8a Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 16 Nov 2017 19:24:53 +0000 Subject: SL-704 - first pass cleaning up comments. Also added LLControlAvatar::initInstance() as a potential hook for optimizations. --- indra/newview/llcontrolavatar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 308d431615..a0f7912d24 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -37,6 +37,7 @@ class LLControlAvatar: public: LLControlAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); + virtual void initInstance(); // Called after construction to initialize the class. virtual ~LLControlAvatar(); void matchVolumeTransform(); -- cgit v1.2.3 From 9af10a84cf0671d04e844299456d4bc48d1dec45 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 2 Feb 2018 20:32:43 +0000 Subject: MAINT-8239 - problems with some instances failing to load some joint positions. Added DumpXML and Reset Skeleton support for animated objects when debugging. --- indra/newview/llcontrolavatar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index a0f7912d24..f45de25d81 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -70,6 +70,8 @@ public: virtual void updateDebugText(); + virtual std::string getFullname() const; + bool mPlaying; F32 mGlobalScale; -- cgit v1.2.3 From 7ed17b5c2c11b9e57316c87b29524b88edb8f762 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 3 May 2018 22:42:02 +0100 Subject: MAINT-8608, MAINT-8539, MAINT-8615 - changes to make object animation info more persistent, tolerant to race conditions during initialization --- indra/newview/llcontrolavatar.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index f45de25d81..02244769b9 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -82,4 +82,18 @@ public: }; +typedef std::map signaled_animation_map_t; +typedef std::map object_signaled_animation_map_t; + +// Stores information about previously requested animations, by object id. +class LLObjectSignaledAnimationMap: public LLSingleton +{ + LLSINGLETON_EMPTY_CTOR(LLObjectSignaledAnimationMap); + +public: + object_signaled_animation_map_t mMap; + + object_signaled_animation_map_t& getMap() { return mMap; } +}; + #endif //LL_CONTROLAVATAR_H -- cgit v1.2.3 From abcddc97cf01fb61bc4b77ab492c02e3985bb1e1 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 13 Jun 2018 19:39:10 +0100 Subject: SL-915, MAINT-8554 - WIP on managing dynamic avatar bounding box, using to constrain encroachment by animated objects --- indra/newview/llcontrolavatar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 02244769b9..c72dc03efc 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -80,6 +80,8 @@ public: bool mMarkedForDeath; + LLVector3 mPositionConstraintFixup; + }; typedef std::map signaled_animation_map_t; -- cgit v1.2.3 From 795aedf4a922f17aac667afc0c368e7fe18b0e03 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 6 Sep 2018 19:47:51 +0100 Subject: SL-966 - size and pos limit calcs moved to sep method. Global scale option for testing of size limits. --- indra/newview/llcontrolavatar.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index c72dc03efc..9924697938 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -40,9 +40,10 @@ public: virtual void initInstance(); // Called after construction to initialize the class. virtual ~LLControlAvatar(); + void getNewConstraintFixups(LLVector3& new_pos_constraint, F32& new_scale_constraint) const; void matchVolumeTransform(); void updateVolumeGeom(); - + void setGlobalScale(F32 scale); void recursiveScaleJoint(LLJoint *joint, F32 factor); static LLControlAvatar *createControlAvatar(LLVOVolume *obj); @@ -81,7 +82,11 @@ public: bool mMarkedForDeath; LLVector3 mPositionConstraintFixup; + F32 mScaleConstraintFixup; + static const F32 MAX_LEGAL_OFFSET; + static const F32 MAX_LEGAL_SIZE; + }; typedef std::map signaled_animation_map_t; -- cgit v1.2.3 From aacb7eb25fd4caceaafb145ed550e14cebeef665 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 1 Oct 2018 16:11:09 +0100 Subject: SL-9773 - treat animated object attachments the same as other rigged attachments for purposes of visibility in mouselook. --- indra/newview/llcontrolavatar.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 9924697938..f7f8db2717 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -73,6 +73,8 @@ public: virtual std::string getFullname() const; + /* virtual */ bool shouldRenderRigged() const; + bool mPlaying; F32 mGlobalScale; -- cgit v1.2.3 From 9ad912b601425bef843bfc45e9d8075623c37584 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 10 Oct 2018 15:59:22 +0100 Subject: SL-9849 - animated object attachments get isImpostor() state from av they're attached to --- indra/newview/llcontrolavatar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index f7f8db2717..70f6b76a21 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -73,7 +73,9 @@ public: virtual std::string getFullname() const; - /* virtual */ bool shouldRenderRigged() const; + virtual bool shouldRenderRigged() const; + + virtual BOOL isImpostor(); bool mPlaying; -- cgit v1.2.3 From 0109a71d1ccf5f9bff9b454415ed67dd43b70157 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 12 Oct 2018 18:53:49 +0100 Subject: SL-9857 - suppress constraint adjustments immediately after region crossing --- indra/newview/llcontrolavatar.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llcontrolavatar.h') diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h index 70f6b76a21..288d07cd48 100644 --- a/indra/newview/llcontrolavatar.h +++ b/indra/newview/llcontrolavatar.h @@ -90,7 +90,10 @@ public: static const F32 MAX_LEGAL_OFFSET; static const F32 MAX_LEGAL_SIZE; - + + static void onRegionChanged(); + bool mRegionChanged; + static boost::signals2::connection sRegionChangedSlot; }; typedef std::map signaled_animation_map_t; -- cgit v1.2.3