summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-12-10 20:42:29 -0600
committerDave Parks <davep@lindenlab.com>2010-12-10 20:42:29 -0600
commit6f8ff871cdd0402d07800444f0524079fe02fac6 (patch)
tree071fc033d8b721934650e79584cd415d3da501bb /indra/newview/llfloatermodelpreview.h
parent285ba513368c6b692ea2eb5d13b85300c76adbea (diff)
parent8e5f15a3b64e1e7cd14c8c4c9535299b93f3496b (diff)
merge
Diffstat (limited to 'indra/newview/llfloatermodelpreview.h')
-rw-r--r--indra/newview/llfloatermodelpreview.h42
1 files changed, 30 insertions, 12 deletions
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index a7d43a3d53..e233f3672a 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -49,6 +49,8 @@ class domProfile_COMMON;
class domInstance_geometry;
class domNode;
class domTranslate;
+class LLMenuButton;
+class LLToggleableMenu;
class LLModelLoader : public LLThread
{
@@ -146,7 +148,6 @@ public:
static void onUpload(void* data);
- static void onConsolidate(void* data);
static void onClearMaterials(void* data);
static void onModelDecompositionComplete(LLModel* model, std::vector<LLPointer<LLVertexBuffer> >& physics_mesh);
@@ -156,6 +157,14 @@ public:
void loadModel(S32 lod);
+ void onViewOptionChecked(const LLSD& userdata);
+ bool isViewOptionChecked(const LLSD& userdata);
+ bool isViewOptionEnabled(const LLSD& userdata);
+ void setViewOptionEnabled(const std::string& option, bool enabled);
+ void enableViewOption(const std::string& option);
+ void disableViewOption(const std::string& option);
+ void setViewOption(const std::string& option, bool value);
+
protected:
friend class LLModelPreview;
friend class LLMeshFilePicker;
@@ -167,12 +176,10 @@ protected:
static void onPreviewLODCommit(LLUICtrl*,void*);
- static void onTriangleLimitCommit(LLUICtrl*,void*);
-
static void onGenerateNormalsCommit(LLUICtrl*,void*);
static void onAutoFillCommit(LLUICtrl*,void*);
- static void onShowEdgesCommit(LLUICtrl*,void*);
+ static void onLODParamCommit(LLUICtrl*,void*);
static void onExplodeCommit(LLUICtrl*, void*);
@@ -190,9 +197,6 @@ protected:
void draw();
- static void setLimit(S32 lod, void* userdata);
- void setLimit(S32 lod, S32 limit);
-
void initDecompControls();
LLModelPreview* mModelPreview;
@@ -207,6 +211,13 @@ protected:
LLPointer<DecompRequest> mCurRequest;
+ std::map<std::string, bool> mViewOption;
+
+ //use "disabled" as false by default
+ std::map<std::string, bool> mViewOptionDisabled;
+
+ LLMenuButton* mViewOptionMenuButton;
+ LLToggleableMenu* mViewOptionMenu;
};
@@ -256,6 +267,8 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
void clearIncompatible(S32 lod);
void updateStatusMessages();
bool containsRiggedAsset( void );
+ void clearGLODGroup();
+
static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata );
@@ -269,6 +282,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
BOOL mNeedsUpdate;
bool mDirty;
+ bool mGenLOD;
U32 mTextureName;
F32 mCameraDistance;
F32 mCameraYaw;
@@ -279,10 +293,16 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
LLVector3 mPreviewScale;
S32 mPreviewLOD;
U32 mResourceCost;
- S32 mLimit[LLModel::NUM_LODS];
std::string mLODFile[LLModel::NUM_LODS];
bool mLoading;
+ //GLOD object parameters (must rebuild object if these change)
+ F32 mBuildShareTolerance;
+ U32 mBuildQueueMode;
+ U32 mBuildOperator;
+ U32 mBuildBorderMode;
+
+
LLModelLoader* mModelLoader;
@@ -292,11 +312,9 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex
LLModelLoader::model_list mModel[LLModel::NUM_LODS];
LLModelLoader::model_list mBaseModel;
- std::map<LLPointer<LLModel>, U32> mGroup;
+ U32 mGroup;
std::map<LLPointer<LLModel>, U32> mObject;
- std::map<LLPointer<LLModel>, std::vector<U32> > mPatch;
- std::map<LLPointer<LLModel>, F32> mPercentage;
-
+ U32 mMaxTriangleLimit;
std::map<LLPointer<LLModel>, std::vector<LLPointer<LLVertexBuffer> > > mPhysicsMesh;
LLMeshUploadThread::instance_list mUploadData;