diff options
author | Dave Parks <davep@lindenlab.com> | 2010-12-10 15:18:26 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-12-10 15:18:26 -0600 |
commit | 0ae6e2b451e9dc71800740240a615d934c91e581 (patch) | |
tree | a623d7c70addd51d768a7ebca61304894eb6de00 /indra/newview/llfloatermodelpreview.h | |
parent | e0188f916d2f0d2ccad01d407b9f90e9094b05b7 (diff) |
Reskin model importer according to latest spec, add extra LoD decimation parameters.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.h')
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 05106644dc..4037a6976c 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -48,6 +48,8 @@ class domProfile_COMMON; class domInstance_geometry; class domNode; class domTranslate; +class LLMenuButton; +class LLToggleableMenu; class LLModelLoader : public LLThread { @@ -142,7 +144,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); @@ -152,6 +153,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; @@ -163,12 +172,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*); @@ -186,9 +193,6 @@ protected: void draw(); - static void setLimit(S32 lod, void* userdata); - void setLimit(S32 lod, S32 limit); - void initDecompControls(); LLModelPreview* mModelPreview; @@ -204,6 +208,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; }; @@ -253,6 +264,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex BOOL mNeedsUpdate; bool mDirty; + bool mGenLOD; U32 mTextureName; F32 mCameraDistance; F32 mCameraYaw; @@ -263,9 +275,15 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex LLVector3 mPreviewScale; S32 mPreviewLOD; U32 mResourceCost; - S32 mLimit[LLModel::NUM_LODS]; std::string mLODFile[LLModel::NUM_LODS]; + //GLOD object parameters (must rebuild object if these change) + F32 mBuildShareTolerance; + U32 mBuildQueueMode; + U32 mBuildOperator; + U32 mBuildBorderMode; + + LLModelLoader* mModelLoader; @@ -279,7 +297,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex 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; |