llpanelvolume.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /**
  2. * @file llpanelvolume.h
  3. * @brief Object editing (position, scale, etc.) in the tools floater
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewergpl$
  6. *
  7. * Copyright (c) 2001-2009, Linden Research, Inc.
  8. *
  9. * Second Life Viewer Source Code
  10. * The source code in this file ("Source Code") is provided by Linden Lab
  11. * to you under the terms of the GNU General Public License, version 2.0
  12. * ("GPL"), unless you have obtained a separate licensing agreement
  13. * ("Other License"), formally executed by you and Linden Lab. Terms of
  14. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  15. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  16. *
  17. * There are special exceptions to the terms and conditions of the GPL as
  18. * it is applied to this Source Code. View the full text of the exception
  19. * in the file doc/FLOSS-exception.txt in this software distribution, or
  20. * online at
  21. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  22. *
  23. * By copying, modifying or distributing this software, you acknowledge
  24. * that you have read and understood your obligations described above,
  25. * and agree to abide by those obligations.
  26. *
  27. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  28. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  29. * COMPLETENESS OR PERFORMANCE.
  30. * $/LicenseInfo$
  31. */
  32. #ifndef LL_LLPANELVOLUME_H
  33. #define LL_LLPANELVOLUME_H
  34. #include "llpanel.h"
  35. #include "llpointer.h"
  36. #include "llvolume.h"
  37. #include "llvector3.h"
  38. class LLButton;
  39. class LLCheckBoxCtrl;
  40. class LLColorSwatchCtrl;
  41. class LLComboBox;
  42. class LLInventoryItem;
  43. class LLSpinCtrl;
  44. class LLTextBox;
  45. class LLTextureCtrl;
  46. class LLUICtrl;
  47. class LLViewerObject;
  48. class LLPanelVolume final : public LLPanel
  49. {
  50. protected:
  51. LOG_CLASS(LLPanelVolume);
  52. public:
  53. LLPanelVolume(const std::string& name);
  54. ~LLPanelVolume() override;
  55. bool postBuild() override;
  56. void refresh() override;
  57. void clearCtrls() override;
  58. void sendIsPhysical();
  59. void sendIsLight();
  60. void sendIsFlexible();
  61. private:
  62. void getState();
  63. void refreshCost();
  64. static void onCommitPhysics(LLUICtrl* ctrl, void* userdata);
  65. static void onCommitIsLight(LLUICtrl* ctrl, void* userdata);
  66. static void onCommitLight(LLUICtrl* ctrl, void* userdata);
  67. static void onCommitIsFlexible(LLUICtrl* ctrl, void* userdata);
  68. static void onCommitFlexible(LLUICtrl* ctrl, void* userdata);
  69. static void onCommitMaterial(LLUICtrl* ctrl, void* userdata);
  70. static void onLightCancelColor(LLUICtrl* ctrl, void* userdata);
  71. static void onLightSelectColor(LLUICtrl* ctrl, void* userdata);
  72. static void onLightCancelTexture(LLUICtrl* ctrl, void* userdata);
  73. static void onLightSelectTexture(LLUICtrl* ctrl, void* userdata);
  74. static bool onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item,
  75. void* userdata);
  76. static void sendPhysicsShapeType(LLUICtrl* ctrl, void* userdata);
  77. static void sendPhysicsGravity(LLUICtrl* ctrl, void* userdata);
  78. static void sendPhysicsFriction(LLUICtrl* ctrl, void* userdata);
  79. static void sendPhysicsRestitution(LLUICtrl* ctrl, void* userdata);
  80. static void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata);
  81. static void onCommitAnimatedMesh(LLUICtrl* ctrl, void* userdata);
  82. static void onClickProbe(void* userdata);
  83. private:
  84. // Common UI elements
  85. LLTextBox* mLabelSelectSingle;
  86. LLTextBox* mLabelEditObject;
  87. // Flexible UI elements
  88. LLCheckBoxCtrl* mCheckFlexiblePath;
  89. LLSpinCtrl* mSpinFlexSections;
  90. LLSpinCtrl* mSpinFlexGravity;
  91. LLSpinCtrl* mSpinFlexFriction;
  92. LLSpinCtrl* mSpinFlexWind;
  93. LLSpinCtrl* mSpinFlexTension;
  94. LLSpinCtrl* mSpinFlexForceX;
  95. LLSpinCtrl* mSpinFlexForceY;
  96. LLSpinCtrl* mSpinFlexForceZ;
  97. // Physics UI elements
  98. LLTextBox* mLabelPhysicsShape;
  99. LLCheckBoxCtrl* mCheckPhysics;
  100. LLComboBox* mComboPhysicsShape;
  101. LLSpinCtrl* mSpinPhysicsGravity;
  102. LLSpinCtrl* mSpinPhysicsFriction;
  103. LLSpinCtrl* mSpinPhysicsDensity;
  104. LLSpinCtrl* mSpinPhysicsRestitution;
  105. // Material UI elements
  106. LLTextBox* mLabelMaterial;
  107. LLComboBox* mComboMaterial;
  108. std::string mFullBright;
  109. // Light UI elements
  110. LLCheckBoxCtrl* mCheckEmitLight;
  111. LLColorSwatchCtrl* mSwatchLightColor;
  112. LLTextureCtrl* mTextureLight;
  113. LLSpinCtrl* mSpinLightIntensity;
  114. LLSpinCtrl* mSpinLightRadius;
  115. LLSpinCtrl* mSpinLightFalloff;
  116. LLSpinCtrl* mSpinLightFOV;
  117. LLSpinCtrl* mSpinLightFocus;
  118. LLSpinCtrl* mSpinLightAmbiance;
  119. // Animated mesh/puppet element
  120. LLCheckBoxCtrl* mCheckAnimatedMesh;
  121. // Reflection probe
  122. LLButton* mReflectionProbe;
  123. std::string mPhysicsNone;
  124. std::string mPhysicsPrim;
  125. std::string mPhysicsHull;
  126. S32 mComboMaterialItemCount;
  127. LLColor4 mLightSavedColor;
  128. LLUUID mLightSavedTexture;
  129. LLPointer<LLViewerObject> mObject;
  130. LLPointer<LLViewerObject> mRootObject;
  131. // To avoid sending "physical" when not changed
  132. bool mIsPhysical;
  133. };
  134. #endif