diff options
Diffstat (limited to 'indra/newview/llmeshrepository.h')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llmeshrepository.h | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index f237c3a60e..d775e8f74a 100644..100755 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -36,6 +36,7 @@ #define LLCONVEXDECOMPINTER_STATIC 1 #include "llconvexdecomposition.h" +#include "lluploadfloaterobservers.h" class LLVOVolume; class LLMeshResponder; @@ -91,6 +92,7 @@ public: LLPointer<LLViewerFetchedTexture> mDiffuseMap; std::string mDiffuseMapFilename; std::string mDiffuseMapLabel; + std::string mBinding; LLColor4 mDiffuseColor; bool mFullbright; @@ -119,9 +121,9 @@ public: S32 mLocalMeshID; LLMatrix4 mTransform; - std::vector<LLImportMaterial> mMaterial; + std::map<std::string, LLImportMaterial> mMaterial; - LLModelInstance(LLModel* model, const std::string& label, LLMatrix4& transform, std::vector<LLImportMaterial>& materials) + LLModelInstance(LLModel* model, const std::string& label, LLMatrix4& transform, std::map<std::string, LLImportMaterial>& materials) : mModel(model), mLabel(label), mTransform(transform), mMaterial(materials) { mLocalMeshID = -1; @@ -356,6 +358,9 @@ public: class LLMeshUploadThread : public LLThread { +private: + S32 mMeshUploadTimeOut ; //maximum time in seconds to execute an uploading request. + public: class DecompRequest : public LLPhysicsDecomp::Request { @@ -385,9 +390,7 @@ public: LLMutex* mMutex; LLCurlRequest* mCurlRequest; - S32 mPendingConfirmations; S32 mPendingUploads; - S32 mPendingCost; LLVector3 mOrigin; bool mFinished; bool mUploadTextures; @@ -399,38 +402,21 @@ public: std::string mWholeModelFeeCapability; std::string mWholeModelUploadURL; - std::queue<LLMeshUploadData> mUploadQ; - std::queue<LLMeshUploadData> mConfirmedQ; - std::queue<LLModelInstance> mInstanceQ; - - std::queue<LLTextureUploadData> mTextureQ; - std::queue<LLTextureUploadData> mConfirmedTextureQ; - - std::map<LLViewerFetchedTexture*, LLTextureUploadData> mTextureMap; - LLMeshUploadThread(instance_list& data, LLVector3& scale, bool upload_textures, - bool upload_skin, bool upload_joints); + bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload = true, + LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()), LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>())); ~LLMeshUploadThread(); - void uploadTexture(LLTextureUploadData& data); - void doUploadTexture(LLTextureUploadData& data); - void priceResult(LLTextureUploadData& data, const LLSD& content); - void onTextureUploaded(LLTextureUploadData& data); - - void uploadModel(LLMeshUploadData& data); - void doUploadModel(LLMeshUploadData& data); - void onModelUploaded(LLMeshUploadData& data); - void createObjects(LLMeshUploadData& data); - LLSD createObject(LLModelInstance& instance); - void priceResult(LLMeshUploadData& data, const LLSD& content); - bool finished() { return mFinished; } virtual void run(); void preStart(); void discard() ; BOOL isDiscarded(); + void generateHulls(); + void doWholeModelUpload(); + void requestWholeModelFee(); void wholeModelToLLSD(LLSD& dest, bool include_textures); @@ -438,6 +424,15 @@ public: LLVector3& result_pos, LLQuaternion& result_rot, LLVector3& result_scale); + + void setFeeObserverHandle(LLHandle<LLWholeModelFeeObserver> observer_handle) { mFeeObserverHandle = observer_handle; } + void setUploadObserverHandle(LLHandle<LLWholeModelUploadObserver> observer_handle) { mUploadObserverHandle = observer_handle; } + +private: + LLHandle<LLWholeModelFeeObserver> mFeeObserverHandle; + LLHandle<LLWholeModelUploadObserver> mUploadObserverHandle; + + bool mDoUpload; // if FALSE only model data will be requested, otherwise the model will be uploaded }; class LLMeshRepository @@ -488,7 +483,8 @@ public: LLSD& getMeshHeader(const LLUUID& mesh_id); void uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures, - bool upload_skin, bool upload_joints); + bool upload_skin, bool upload_joints, std::string upload_url, bool do_upload = true, + LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()), LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>())); S32 getMeshSize(const LLUUID& mesh_id, S32 lod); |