PageRenderTime 342ms CodeModel.GetById 326ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llmorphview.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 87 lines | 41 code | 16 blank | 30 comment | 0 complexity | 611a7f0f0b74883da5ba017d779c934d MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llmorphview.h
  3. * @brief Container for character morph controls
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, 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. #ifndef LL_LLMORPHVIEW_H
  27. #define LL_LLMORPHVIEW_H
  28. #include "llview.h"
  29. #include "v3dmath.h"
  30. #include "llframetimer.h"
  31. class LLJoint;
  32. class LLMorphView : public LLView
  33. {
  34. public:
  35. struct Params : public LLInitParam::Block<Params, LLView::Params>
  36. {
  37. Params()
  38. {
  39. changeDefault(mouse_opaque, false);
  40. changeDefault(follows.flags, FOLLOWS_ALL);
  41. }
  42. };
  43. LLMorphView(const LLMorphView::Params&);
  44. void shutdown();
  45. // inherited methods
  46. /*virtual*/ void setVisible(BOOL visible);
  47. void setCameraTargetJoint(LLJoint *joint) {mCameraTargetJoint = joint;}
  48. LLJoint* getCameraTargetJoint() {return mCameraTargetJoint;}
  49. void setCameraOffset(const LLVector3d& camera_offset) {mCameraOffset = camera_offset;}
  50. void setCameraTargetOffset(const LLVector3d& camera_target_offset) {mCameraTargetOffset = camera_target_offset;}
  51. void updateCamera();
  52. void setCameraDrivenByKeys( BOOL b );
  53. protected:
  54. void initialize();
  55. LLJoint* mCameraTargetJoint;
  56. LLVector3d mCameraOffset;
  57. LLVector3d mCameraTargetOffset;
  58. LLVector3d mOldCameraPos;
  59. LLVector3d mOldTargetPos;
  60. F32 mOldCameraNearClip;
  61. LLFrameTimer mCameraMoveTimer;
  62. // camera rotation
  63. F32 mCameraPitch;
  64. F32 mCameraYaw;
  65. BOOL mCameraDrivenByKeys;
  66. };
  67. //
  68. // Globals
  69. //
  70. extern LLMorphView *gMorphView;
  71. #endif