SL-727 - right-click menus and hover info ignore control avatars.
parent
bcfc1931dd
commit
6837ca5cd8
|
|
@ -195,6 +195,18 @@ void LLControlAvatar::updateDebugText()
|
|||
getAnimatedVolumes(volumes);
|
||||
S32 animated_volume_count = volumes.size();
|
||||
addDebugText(llformat("CAV obj %d anim %d", total_linkset_count, animated_volume_count));
|
||||
#if 0
|
||||
// AXON - detailed rigged mesh info
|
||||
for (std::vector<LLVOVolume*>::iterator it = volumes.begin();
|
||||
it != volumes.end(); ++it)
|
||||
{
|
||||
LLRiggedVolume *rig_vol = (*it)->getRiggedVolume();
|
||||
if (rig_vol)
|
||||
{
|
||||
addDebugText(rig_vol->mExtraDebugText);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LLVOAvatar::updateDebugText();
|
||||
}
|
||||
|
|
@ -262,3 +274,37 @@ void LLControlAvatar::updateAnimations()
|
|||
LL_DEBUGS("AXON") << "process animation state changes here" << LL_ENDL;
|
||||
processAnimationStateChanges();
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLViewerObject* LLControlAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
|
||||
S32 face,
|
||||
BOOL pick_transparent,
|
||||
BOOL pick_rigged,
|
||||
S32* face_hit,
|
||||
LLVector4a* intersection,
|
||||
LLVector2* tex_coord,
|
||||
LLVector4a* normal,
|
||||
LLVector4a* tangent)
|
||||
{
|
||||
LLViewerObject* hit = NULL;
|
||||
|
||||
if (lineSegmentBoundingBox(start, end))
|
||||
{
|
||||
LLVector4a local_end = end;
|
||||
LLVector4a local_intersection;
|
||||
|
||||
if (mRootVolp &&
|
||||
mRootVolp->lineSegmentIntersect(start, local_end, face, pick_transparent, pick_rigged, face_hit, &local_intersection, tex_coord, normal, tangent))
|
||||
{
|
||||
local_end = local_intersection;
|
||||
if (intersection)
|
||||
{
|
||||
*intersection = local_intersection;
|
||||
}
|
||||
|
||||
hit = mRootVolp;
|
||||
}
|
||||
}
|
||||
|
||||
return hit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,17 @@ public:
|
|||
void getAnimatedVolumes(std::vector<LLVOVolume*>& 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;
|
||||
|
|
|
|||
|
|
@ -1704,6 +1704,7 @@ BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
// virtual
|
||||
LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
|
||||
S32 face,
|
||||
BOOL pick_transparent,
|
||||
|
|
|
|||
|
|
@ -169,7 +169,8 @@ public:
|
|||
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
|
||||
LLViewerObject* lineSegmentIntersectRiggedAttachments(const LLVector4a& start, const LLVector4a& end,
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -4364,6 +4364,9 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
|
|||
U32 maxJoints = LLSkinningUtil::getMeshJointCount(skin);
|
||||
LLSkinningUtil::initSkinningMatrixPalette((LLMatrix4*)mat, maxJoints, skin, avatar);
|
||||
|
||||
S32 rigged_vert_count = 0;
|
||||
S32 rigged_face_count = 0;
|
||||
LLVector4a box_min, box_max;
|
||||
for (S32 i = 0; i < volume->getNumVolumeFaces(); ++i)
|
||||
{
|
||||
const LLVolumeFace& vol_face = volume->getVolumeFace(i);
|
||||
|
|
@ -4385,6 +4388,8 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
|
|||
LL_RECORD_BLOCK_TIME(FTM_SKIN_RIGGED);
|
||||
|
||||
U32 max_joints = LLSkinningUtil::getMaxJointCount();
|
||||
rigged_vert_count += dst_face.mNumVertices;
|
||||
rigged_face_count++;
|
||||
for (U32 j = 0; j < dst_face.mNumVertices; ++j)
|
||||
{
|
||||
LLMatrix4a final_mat;
|
||||
|
|
@ -4404,12 +4409,19 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
|
|||
|
||||
min = pos[0];
|
||||
max = pos[1];
|
||||
if (i==0)
|
||||
{
|
||||
box_min = min;
|
||||
box_max = max;
|
||||
}
|
||||
|
||||
for (U32 j = 1; j < dst_face.mNumVertices; ++j)
|
||||
{
|
||||
min.setMin(min, pos[j]);
|
||||
max.setMax(max, pos[j]);
|
||||
}
|
||||
box_min.setMin(min,box_min);
|
||||
box_max.setMax(max,box_max);
|
||||
|
||||
dst_face.mCenter->setAdd(dst_face.mExtents[0], dst_face.mExtents[1]);
|
||||
dst_face.mCenter->mul(0.5f);
|
||||
|
|
@ -4429,6 +4441,10 @@ void LLRiggedVolume::update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, cons
|
|||
}
|
||||
}
|
||||
}
|
||||
mExtraDebugText = llformat("rigged %d/%d - box (%f %f %f) (%f %f %f)",
|
||||
rigged_face_count, rigged_vert_count,
|
||||
box_min[0], box_min[1], box_min[2],
|
||||
box_max[0], box_max[1], box_max[2]);
|
||||
}
|
||||
|
||||
U32 LLVOVolume::getPartitionType() const
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ public:
|
|||
}
|
||||
|
||||
void update(const LLMeshSkinInfo* skin, LLVOAvatar* avatar, const LLVolume* src_volume);
|
||||
|
||||
std::string mExtraDebugText;
|
||||
};
|
||||
|
||||
// Base class for implementations of the volume - Primitive, Flexible Object, etc.
|
||||
|
|
|
|||
Loading…
Reference in New Issue