summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmeshrepository.h')
-rw-r--r--indra/newview/llmeshrepository.h37
1 files changed, 28 insertions, 9 deletions
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index ab17b921d6..01b51e753e 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -521,6 +521,9 @@ public:
// list of completed Decomposition info requests
std::list<LLModel::Decomposition*> mDecompositionQ;
+ // list of completed Physics Mesh info requests
+ std::list<LLModel::Decomposition*> mPhysicsQ;
+
//queue of requested headers
std::queue<HeaderRequest> mHeaderReqQ;
@@ -668,11 +671,11 @@ public:
LLPointer<DecompRequest> mFinalDecomp;
volatile bool mPhysicsComplete;
- typedef std::map<LLPointer<LLModel>, std::vector<LLVector3> > hull_map;
- hull_map mHullMap;
+ typedef std::map<LLPointer<LLModel>, std::vector<LLVector3> > hull_map_t;
+ hull_map_t mHullMap;
- typedef std::vector<LLModelInstance> instance_list;
- instance_list mInstanceList;
+ typedef std::vector<LLModelInstance> instance_list_t;
+ instance_list_t mInstanceList;
// Upload should happen in deterministic order, so sort instances by model name.
struct LLUploadModelInstanceLess
@@ -686,11 +689,11 @@ public:
}
// Note: probably can sort by mBaseModel->mSubmodelID here as well to avoid
// running over the list twice in wholeModelToLLSD.
- return a->mLabel < b->mLabel;
+ return a->mLabel > b->mLabel;
}
};
- typedef std::map<LLPointer<LLModel>, instance_list, LLUploadModelInstanceLess> instance_map;
- instance_map mInstance;
+ typedef std::map<LLPointer<LLModel>, instance_list_t, LLUploadModelInstanceLess> instance_map_t;
+ instance_map_t mInstance;
typedef std::map<std::string, std::string> lod_sources_map_t;
lod_sources_map_t mLodSources;
@@ -709,7 +712,7 @@ public:
std::string mWholeModelUploadURL;
LLUUID mDestinationFolderId;
- LLMeshUploadThread(instance_list& data, const lod_sources_map_t& sources_list,
+ LLMeshUploadThread(instance_list_t& data, const lod_sources_map_t& sources_list,
LLVector3& scale, bool upload_textures,
bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position,
const std::string & upload_url,
@@ -745,6 +748,22 @@ public:
static LLViewerFetchedTexture* FindViewerTexture(const LLImportMaterial& material);
+protected:
+ void packModelIntance(
+ LLModel* model,
+ LLMeshUploadThread::instance_list_t& instance_list,
+ std::string& model_name,
+ LLSD& res,
+ S32& mesh_num,
+ S32& texture_num,
+ S32& instance_num,
+ std::unordered_set<LLViewerTexture* > &textures,
+ std::unordered_map<LLViewerTexture*, S32> texture_index,
+ std::unordered_map<LLModel*, S32>& mesh_index,
+ std::vector<std::string>& texture_list_dest,
+ bool include_textures
+ );
+
private:
LLHandle<LLWholeModelFeeObserver> mFeeObserverHandle;
LLHandle<LLWholeModelUploadObserver> mUploadObserverHandle;
@@ -855,7 +874,7 @@ public:
void notifyMeshUnavailable(const LLVolumeParams& mesh_params, S32 request_lod, S32 volume_lod);
void notifySkinInfoReceived(LLMeshSkinInfo* info);
void notifySkinInfoUnavailable(const LLUUID& info);
- void notifyDecompositionReceived(LLModel::Decomposition* info);
+ void notifyDecompositionReceived(LLModel::Decomposition* info, bool physics_mesh);
S32 getActualMeshLOD(const LLVolumeParams& mesh_params, S32 lod);
static S32 getActualMeshLOD(LLMeshHeader& header, S32 lod);