Jump to content

Some viewer internal questions


animats
 Share

You are about to reply to a thread that has been inactive for 2035 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

(Some detailed questions about specific C++ code deep inside the viewer. If there is a better forum for this, please let me know.)

  1. Given an LLViewerObject, how do you get its human-readable name? (Needed for debug messages)
  2. How does viewer side parenting in llviewerobject.cpp after the comment "fix object parenting" differ from sim side parenting? Nominally SL doesn't have a full hierarchy (children of children) but this code looks like it supports one. Seated avatars seem to be children of the object they're sitting on, and attachments seem to be the children of avatars. That's a 3-level hierarchy.
  3. In llviewerobject.cpp, there are several occurrence of
    ((LLVOAvatar*)this)->setFootPlane(collision_plane);

    This is an unchecked downcast of LLViewerObject* to LLVOAvatar*. But LLVOAvatar has multiple inheritance:

    class LLVOAvatar :
        public LLAvatarAppearance,
        public LLViewerObject,
        public boost::signals2::trackable

    Downcasting a LLViewerObject to an LLVOAvatar is not legal C++ in this situation. I think. The LLViewerObject and its containing LLVOAVatar object don't start at the same address. The compiler won't catch that. Am I missing something, or is this storing into the wrong place? I think a dynamic cast, which checks, would be neeeded in this situation.

Link to comment
Share on other sites

On 9/15/2018 at 10:34 AM, Whirly Fizzle said:

You may be better posting these sorts of questions to the OpenSource-Dev mailing list
http://wiki.secondlife.com/wiki/OpenSource-Dev

Five years ago, yes. Traffic there is very low now. Zero during September. However, I did post a few things, like how to build successfully on Linux, a question someone asked in August.

I have two replies. One is in German, from an autoresponder at a German magazine. The other is a porno spam.

  • Haha 4
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2035 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...