|
| 1 | +/** |
| 2 | + * @file lljointdata.h |
| 3 | + * @brief LLJointData class for holding individual joint data and skeleton |
| 4 | + * |
| 5 | + * $LicenseInfo:firstyear=2025&license=viewerlgpl$ |
| 6 | + * Second Life Viewer Source Code |
| 7 | + * Copyright (C) 2025, Linden Research, Inc. |
| 8 | + * |
| 9 | + * This library is free software; you can redistribute it and/or |
| 10 | + * modify it under the terms of the GNU Lesser General Public |
| 11 | + * License as published by the Free Software Foundation; |
| 12 | + * version 2.1 of the License only. |
| 13 | + * |
| 14 | + * This library is distributed in the hope that it will be useful, |
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 | + * Lesser General Public License for more details. |
| 18 | + * |
| 19 | + * You should have received a copy of the GNU Lesser General Public |
| 20 | + * License along with this library; if not, write to the Free Software |
| 21 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 22 | + * |
| 23 | + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA |
| 24 | + * $/LicenseInfo$ |
| 25 | + */ |
| 26 | + |
| 27 | +#ifndef LL_LLJOINTDATA_H |
| 28 | +#define LL_LLJOINTDATA_H |
| 29 | + |
| 30 | +#include "v4math.h" |
| 31 | + |
| 32 | +// may be just move LLAvatarBoneInfo |
| 33 | +class LLJointData |
| 34 | +{ |
| 35 | +public: |
| 36 | + std::string mName; |
| 37 | + std::string mGroup; |
| 38 | + glm::mat4 mJointMatrix; |
| 39 | + glm::mat4 mRestMatrix; |
| 40 | + glm::vec3 mScale; |
| 41 | + LLVector3 mRotation; |
| 42 | + |
| 43 | + typedef std::vector<LLJointData> bones_t; |
| 44 | + bones_t mChildren; |
| 45 | + |
| 46 | + bool mIsJoint; // if not, collision_volume |
| 47 | + enum SupportCategory |
| 48 | + { |
| 49 | + SUPPORT_BASE, |
| 50 | + SUPPORT_EXTENDED |
| 51 | + }; |
| 52 | + SupportCategory mSupport; |
| 53 | + void setSupport(const std::string& support) |
| 54 | + { |
| 55 | + if (support == "extended") |
| 56 | + { |
| 57 | + mSupport = SUPPORT_EXTENDED; |
| 58 | + } |
| 59 | + else |
| 60 | + { |
| 61 | + mSupport = SUPPORT_BASE; |
| 62 | + } |
| 63 | + } |
| 64 | +}; |
| 65 | + |
| 66 | +#endif //LL_LLJOINTDATA_H |
0 commit comments