summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.h
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-05 16:55:41 -0500
committerDave Parks <davep@lindenlab.com>2010-10-05 16:55:41 -0500
commit98d622551d9466d1153dedfbdd721becf8c38cd9 (patch)
treeedcb74137f1bb88a0566a9531dde64897b44802a /indra/newview/llmeshrepository.h
parent70b2ace13130b3a0d881fb87cff0167ed811f560 (diff)
parent1f00747cd2accbe1b243e5c23f6e74a061a22bfa (diff)
merge
Diffstat (limited to 'indra/newview/llmeshrepository.h')
-rw-r--r--indra/newview/llmeshrepository.h46
1 files changed, 31 insertions, 15 deletions
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 0bc63a8469..e7270cc47d 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -151,37 +151,53 @@ public:
class LLPhysicsDecomp : public LLThread
{
public:
+
+ typedef std::map<std::string, LLSD> decomp_params;
+
+ class Request : public LLRefCount
+ {
+ public:
+ //input params
+ std::string mStage;
+ std::vector<LLVector3> mPositions;
+ std::vector<U16> mIndices;
+ decomp_params mParams;
+
+ //output state
+ std::string mStatusMessage;
+ std::vector<LLPointer<LLVertexBuffer> > mHullMesh;
+ LLModel::physics_shape mHull;
+
+ virtual S32 statusCallback(const char* status, S32 p1, S32 p2) = 0;
+ virtual void completed() = 0;
+ virtual void setStatusMessage(const std::string& msg);
+ };
+
LLCondition* mSignal;
LLMutex* mMutex;
- LLCDMeshData mMesh;
-
bool mInited;
bool mQuitting;
bool mDone;
-
- S32 mContinue;
- std::string mStatus;
-
- std::vector<LLVector3> mPositions;
- std::vector<U16> mIndices;
-
- S32 mStage;
-
+
LLPhysicsDecomp();
~LLPhysicsDecomp();
void shutdown();
- void setStatusMessage(std::string msg);
-
- void execute(const char* stage, LLModel* mdl);
+
+ void submitRequest(Request* request);
static S32 llcdCallback(const char*, S32, S32);
void cancel();
virtual void run();
std::map<std::string, S32> mStageID;
- LLPointer<LLModel> mModel;
+
+ typedef std::queue<LLPointer<Request> > request_queue;
+ request_queue mRequestQ;
+
+ LLPointer<Request> mCurRequest;
+
};
class LLMeshRepoThread : public LLThread