From 0a08645eb6a86a3279beb925ebba88393bb89936 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 20 Apr 2022 10:25:05 -0700 Subject: SL-17021: Do not do software skinning/octree building of a face during picking unless eligible for narrow-phase intersect check (fast broad-phase intersect pre-check not yet implemented) --- indra/newview/llvovolume.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llvovolume.h') diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 4cb7a5481c..00a0a1dfd0 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -65,7 +65,10 @@ public: { } - void update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* src_volume); + using FaceIndex = S32; + static const FaceIndex UPDATE_ALL_FACES = -1; + static const FaceIndex DO_NOT_UPDATE_FACES = -2; + void update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* src_volume, FaceIndex face_index = UPDATE_ALL_FACES); std::string mExtraDebugText; }; @@ -363,7 +366,7 @@ public: //rigged volume update (for raycasting) - void updateRiggedVolume(bool force_update = false); + void updateRiggedVolume(bool force_update = false, LLRiggedVolume::FaceIndex face_index = LLRiggedVolume::UPDATE_ALL_FACES); LLRiggedVolume* getRiggedVolume(); //returns true if volume should be treated as a rigged volume -- cgit v1.2.3 From 1d3b85356f516fa2f5a5d49572743dc2a03ac86a Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 20 Apr 2022 16:19:42 -0700 Subject: SL-17021: Only calculate the octree for a skinned mesh if intersection falls inside an on-the-fly calculated bounding box. Technically not a broadphase check, but better than calculating an octree for a bunch of meshes. --- indra/newview/llvovolume.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvovolume.h') diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 00a0a1dfd0..f0213848c6 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -68,7 +68,7 @@ public: using FaceIndex = S32; static const FaceIndex UPDATE_ALL_FACES = -1; static const FaceIndex DO_NOT_UPDATE_FACES = -2; - void update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* src_volume, FaceIndex face_index = UPDATE_ALL_FACES); + void update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* src_volume, FaceIndex face_index = UPDATE_ALL_FACES, bool rebuild_face_octrees = true); std::string mExtraDebugText; }; @@ -365,8 +365,9 @@ public: S32 getMDCImplCount() { return mMDCImplCount; } - //rigged volume update (for raycasting) - void updateRiggedVolume(bool force_update = false, LLRiggedVolume::FaceIndex face_index = LLRiggedVolume::UPDATE_ALL_FACES); + // Rigged volume update (for raycasting) + // By default, this updates the bounding boxes of all the faces and builds an octree for precise per-triangle raycasting + void updateRiggedVolume(bool force_update = false, LLRiggedVolume::FaceIndex face_index = LLRiggedVolume::UPDATE_ALL_FACES, bool rebuild_face_octrees = true); LLRiggedVolume* getRiggedVolume(); //returns true if volume should be treated as a rigged volume -- cgit v1.2.3 From b97aec0da2e1ec97a8bfd408bdce61d91b4fcdab Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 20 Apr 2022 17:40:44 -0700 Subject: SL-17021: Change meaning of first argument to LLVOVolume::updateRiggedVolume from 'force_update' to 'foce_treat_as_rigged' --- indra/newview/llvovolume.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvovolume.h') diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index f0213848c6..64514c51b0 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -367,7 +367,7 @@ public: // Rigged volume update (for raycasting) // By default, this updates the bounding boxes of all the faces and builds an octree for precise per-triangle raycasting - void updateRiggedVolume(bool force_update = false, LLRiggedVolume::FaceIndex face_index = LLRiggedVolume::UPDATE_ALL_FACES, bool rebuild_face_octrees = true); + void updateRiggedVolume(bool force_treat_as_rigged, LLRiggedVolume::FaceIndex face_index = LLRiggedVolume::UPDATE_ALL_FACES, bool rebuild_face_octrees = true); LLRiggedVolume* getRiggedVolume(); //returns true if volume should be treated as a rigged volume -- cgit v1.2.3