diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-01-13 10:23:47 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-01-13 10:23:47 -0500 |
commit | e7f068c37ef18315a11f1054bfd095b3420025aa (patch) | |
tree | 456890d1905e92ee474d71ad3ec0778314c8054b /indra/newview/llfloatermodelpreview.h | |
parent | e47ff7bd4748202ff4e6a33bd78b84288d1d1ec8 (diff) | |
parent | d51d294296ac0d53a46586c9868bb80e0468680b (diff) |
Automated merge from mesh-development
Diffstat (limited to 'indra/newview/llfloatermodelpreview.h')
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 3747abedd1..8fc85cebb9 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -152,6 +152,8 @@ public: static void onMouseCaptureLostModelPreview(LLMouseHandler*); static void setUploadAmount(S32 amount) { sUploadAmount = amount; } + + void setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost); static void onBrowseLOD(void* data); @@ -187,6 +189,7 @@ protected: static void onAutoFillCommit(LLUICtrl*,void*); static void onLODParamCommit(LLUICtrl*,void*); + static void onLODParamCommitTriangleLimit(LLUICtrl*,void*); static void onExplodeCommit(LLUICtrl*, void*); @@ -232,6 +235,7 @@ protected: LLMenuButton* mViewOptionMenuButton; LLToggleableMenu* mViewOptionMenu; LLMutex* mStatusLock; + }; class LLMeshFilePicker : public LLFilePickerThread @@ -247,10 +251,12 @@ private: class LLModelPreview : public LLViewerDynamicTexture, public LLMutex -{ - public: - - LLModelPreview(S32 width, S32 height, LLFloater* fmp); +{ + typedef boost::signals2::signal<void (F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost)> details_signal_t; + typedef boost::signals2::signal<void (void)> model_loaded_signal_t; + +public: + LLModelPreview(S32 width, S32 height, LLFloater* fmp); virtual ~LLModelPreview(); void resetPreviewTarget(); @@ -271,7 +277,7 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex void clearModel(S32 lod); void loadModel(std::string filename, S32 lod); void loadModelCallback(S32 lod); - void genLODs(S32 which_lod = -1, U32 decimation = 3); + void genLODs(S32 which_lod = -1, U32 decimation = 3, bool enforce_tri_limit = false); void generateNormals(); void consolidate(); void clearMaterials(); @@ -280,10 +286,13 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex void clearIncompatible(S32 lod); void updateStatusMessages(); void clearGLODGroup(); - + void onLODParamCommit(bool enforce_tri_limit); static void textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); - + + boost::signals2::connection setDetailsCallback( const details_signal_t::slot_type& cb ){ return mDetailsSignal.connect(cb); } + boost::signals2::connection setModelLoadedCallback( const model_loaded_signal_t::slot_type& cb ){ return mModelLoadedSignal.connect(cb); } + protected: friend class LLFloaterModelPreview; friend class LLFloaterModelWizard; @@ -335,6 +344,9 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex //map of vertex buffers to models (one vertex buffer in vector per face in model std::map<LLModel*, std::vector<LLPointer<LLVertexBuffer> > > mVertexBuffer[LLModel::NUM_LODS+1]; + + details_signal_t mDetailsSignal; + model_loaded_signal_t mModelLoadedSignal; }; |