/** * @file llvoavatarself.h * @brief Declaration of LLVOAvatar class which is a derivation fo * LLViewerObject * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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_LLVOAVATARSELF_H #define LL_LLVOAVATARSELF_H #include "llviewertexture.h" #include "llvoavatar.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // LLVOAvatarSelf // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLVOAvatarSelf : public LLVOAvatar { /******************************************************************************** ** ** ** INITIALIZATION **/ public: LLVOAvatarSelf(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); virtual ~LLVOAvatarSelf(); virtual void markDead(); virtual void initInstance(); // Called after construction to initialize the class. void cleanup(); protected: /*virtual*/ BOOL loadAvatar(); BOOL loadAvatarSelf(); BOOL buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info); BOOL buildMenus(); /** Initialization ** ** *******************************************************************************/ /******************************************************************************** ** ** ** INHERITED **/ //-------------------------------------------------------------------- // LLViewerObject interface and related //-------------------------------------------------------------------- public: /*virtual*/ void updateRegion(LLViewerRegion *regionp); /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); //-------------------------------------------------------------------- // LLCharacter interface and related //-------------------------------------------------------------------- public: /*virtual*/ void stopMotionFromSource(const LLUUID& source_id); /*virtual*/ void requestStopMotion(LLMotion* motion); /*virtual*/ LLJoint* getJoint(const std::string &name); void resetJointPositions( void ); /** Initialization ** ** *******************************************************************************/ /******************************************************************************** ** ** ** STATE **/ public: /*virtual*/ bool isSelf() const { return true; } //-------------------------------------------------------------------- // Updates //-------------------------------------------------------------------- public: /*virtual*/ BOOL updateCharacter(LLAgent &agent); /*virtual*/ void idleUpdateTractorBeam(); private: U64 mLastRegionHandle; LLFrameTimer mRegionCrossingTimer; S32 mRegionCrossingCount; /** State ** ** *******************************************************************************/ /******************************************************************************** ** ** ** RENDERING **/ //-------------------------------------------------------------------- // Render beam //-------------------------------------------------------------------- protected: BOOL needsRenderBeam(); private: LLPointer mBeam; LLFrameTimer mBeamTimer; /** Rendering ** ** *******************************************************************************/ protected: /*virtual*/ void removeMissingBakedTextures(); /******************************************************************************** ** ** ** MESHES **/ protected: /*virtual*/ void restoreMeshData(); /** Meshes ** ** *******************************************************************************/ //-------------------------------------------------------------------- // HUDs //-------------------------------------------------------------------- private: LLViewerJoint* mScreenp; // special purpose joint for HUD attachments /** Attachments ** ** *******************************************************************************/ }; extern LLVOAvatarSelf *gAgentAvatarp; BOOL isAgentAvatarValid(); #endif // LL_VO_AVATARSELF_H