llpanelobject.h
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:5k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. /** 
  2.  * @file llpanelobject.h
  3.  * @brief Object editing (position, scale, etc.) in the tools floater
  4.  *
  5.  * $LicenseInfo:firstyear=2004&license=viewergpl$
  6.  * 
  7.  * Copyright (c) 2004-2010, 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_LLPANELOBJECT_H
  33. #define LL_LLPANELOBJECT_H
  34. #include "v3math.h"
  35. #include "llpanel.h"
  36. #include "llpointer.h"
  37. #include "llvolume.h"
  38. class LLSpinCtrl;
  39. class LLCheckBoxCtrl;
  40. class LLTextBox;
  41. class LLUICtrl;
  42. class LLButton;
  43. class LLViewerObject;
  44. class LLComboBox;
  45. class LLColorSwatchCtrl;
  46. class LLTextureCtrl;
  47. class LLInventoryItem;
  48. class LLUUID;
  49. class LLPanelObject : public LLPanel
  50. {
  51. public:
  52. LLPanelObject();
  53. virtual ~LLPanelObject();
  54. virtual BOOL postBuild();
  55. virtual void draw();
  56. virtual void  clearCtrls();
  57. void refresh();
  58. static bool precommitValidate(const LLSD& data);
  59. static void onCommitLock(LLUICtrl *ctrl, void *data);
  60. static void  onCommitPosition( LLUICtrl* ctrl, void* userdata);
  61. static void  onCommitScale( LLUICtrl* ctrl, void* userdata);
  62. static void  onCommitRotation( LLUICtrl* ctrl, void* userdata);
  63. static void  onCommitPhysics( LLUICtrl* ctrl, void* userdata);
  64. static void  onCommitTemporary( LLUICtrl* ctrl, void* userdata);
  65. static void  onCommitPhantom( LLUICtrl* ctrl, void* userdata);
  66. static void  onCommitCastShadows( LLUICtrl* ctrl, void* userdata);
  67. static void  onCommitParametric(LLUICtrl* ctrl, void* userdata);
  68. static void  onCommitMaterial( LLUICtrl* ctrl, void* userdata);
  69. void      onCommitSculpt(const LLSD& data);
  70. void      onCancelSculpt(const LLSD& data);
  71. void      onSelectSculpt(const LLSD& data);
  72. BOOL      onDropSculpt(LLInventoryItem* item);
  73. static void     onCommitSculptType(    LLUICtrl *ctrl, void* userdata);
  74. protected:
  75. void getState();
  76. void sendRotation(BOOL btn_down);
  77. void sendScale(BOOL btn_down);
  78. void sendPosition(BOOL btn_down);
  79. void sendIsPhysical();
  80. void sendIsTemporary();
  81. void sendIsPhantom();
  82. void sendCastShadows();
  83. void            sendSculpt();
  84. void  getVolumeParams(LLVolumeParams& volume_params);
  85. protected:
  86. S32 mComboMaterialItemCount;
  87. LLTextBox* mLabelMaterial;
  88. LLComboBox* mComboMaterial;
  89. // Per-object options
  90. LLTextBox* mLabelBaseType;
  91. LLComboBox* mComboBaseType;
  92. LLTextBox* mLabelCut;
  93. LLSpinCtrl* mSpinCutBegin;
  94. LLSpinCtrl* mSpinCutEnd;
  95. LLTextBox* mLabelHollow;
  96. LLSpinCtrl* mSpinHollow;
  97. LLTextBox* mLabelHoleType;
  98. LLComboBox* mComboHoleType;
  99. LLTextBox* mLabelTwist;
  100. LLSpinCtrl* mSpinTwist;
  101. LLSpinCtrl* mSpinTwistBegin;
  102. LLSpinCtrl* mSpinScaleX;
  103. LLSpinCtrl* mSpinScaleY;
  104. LLTextBox* mLabelSkew;
  105. LLSpinCtrl* mSpinSkew;
  106. LLTextBox* mLabelShear;
  107. LLSpinCtrl* mSpinShearX;
  108. LLSpinCtrl* mSpinShearY;
  109. // Advanced Path
  110. LLSpinCtrl* mCtrlPathBegin;
  111. LLSpinCtrl* mCtrlPathEnd;
  112. LLTextBox* mLabelTaper;
  113. LLSpinCtrl* mSpinTaperX;
  114. LLSpinCtrl* mSpinTaperY;
  115. LLTextBox* mLabelRadiusOffset;
  116. LLSpinCtrl* mSpinRadiusOffset;
  117. LLTextBox* mLabelRevolutions;
  118. LLSpinCtrl* mSpinRevolutions;
  119. LLTextBox* mLabelPosition;
  120. LLSpinCtrl* mCtrlPosX;
  121. LLSpinCtrl* mCtrlPosY;
  122. LLSpinCtrl* mCtrlPosZ;
  123. LLTextBox* mLabelSize;
  124. LLSpinCtrl* mCtrlScaleX;
  125. LLSpinCtrl* mCtrlScaleY;
  126. LLSpinCtrl* mCtrlScaleZ;
  127. LLTextBox* mLabelRotation;
  128. LLSpinCtrl* mCtrlRotX;
  129. LLSpinCtrl* mCtrlRotY;
  130. LLSpinCtrl* mCtrlRotZ;
  131. LLCheckBoxCtrl *mCheckLock;
  132. LLCheckBoxCtrl *mCheckPhysics;
  133. LLCheckBoxCtrl *mCheckTemporary;
  134. LLCheckBoxCtrl *mCheckPhantom;
  135. LLCheckBoxCtrl *mCheckCastShadows;
  136. LLTextureCtrl   *mCtrlSculptTexture;
  137. LLTextBox       *mLabelSculptType;
  138. LLComboBox      *mCtrlSculptType;
  139. LLCheckBoxCtrl  *mCtrlSculptMirror;
  140. LLCheckBoxCtrl  *mCtrlSculptInvert;
  141. LLVector3 mCurEulerDegrees; // to avoid sending rotation when not changed
  142. BOOL mIsPhysical; // to avoid sending "physical" when not changed
  143. BOOL mIsTemporary; // to avoid sending "temporary" when not changed
  144. BOOL mIsPhantom; // to avoid sending "phantom" when not changed
  145. BOOL mCastShadows; // to avoid sending "cast shadows" when not changed
  146. S32 mSelectedType; // So we know what selected type we last were
  147. LLUUID          mSculptTextureRevert;   // so we can revert the sculpt texture on cancel
  148. U8              mSculptTypeRevert;      // so we can revert the sculpt type on cancel
  149. LLPointer<LLViewerObject> mObject;
  150. LLPointer<LLViewerObject> mRootObject;
  151. };
  152. #endif