// /** * @file llimportobject.h */ #ifndef LL_LLIMPORTOBJECT_H #define LL_LLIMPORTOBJECT_H #include "llviewerobject.h" #include "llfloater.h" class BuildingSupply : public LLEventTimer { public: BuildingSupply(); BOOL tick(); }; class LLImportWearable { public: std::string mName; int mType; std::string mData; LLImportWearable(LLSD sd); }; class LLImportObject : public LLViewerObject { public: //LLImportObject(std::string id, std::string parentId); LLImportObject(std::string id, LLSD prim); std::string mId; std::string mParentId; std::string mPrimName; bool importIsAttachment; U32 importAttachPoint; LLVector3 importAttachPos; LLQuaternion importAttachRot; }; class LLXmlImportOptions { public: LLXmlImportOptions(LLXmlImportOptions* options); LLXmlImportOptions(std::string filename); LLXmlImportOptions(LLSD llsd); void init(LLSD llsd); std::string mName; //LLSD mLLSD; std::vector mRootObjects; std::vector mChildObjects; std::vector mWearables; BOOL mKeepPosition; LLViewerObject* mSupplier; }; class LLXmlImport { public: static void import(LLXmlImportOptions* import_options); static void onNewPrim(LLViewerObject* object); static void onNewItem(LLViewerInventoryItem* item); static void onNewAttachment(LLViewerObject* object); static void Cancel(void* user_data); static bool sImportInProgress; static bool sImportHasAttachments; static LLUUID sFolderID; static LLViewerObject* sSupplyParams; static int sPrimsNeeded; static std::vector sPrims; // all prims being imported static std::map sPt2watch; // attach points that need watching static std::map sId2attachpt; // attach points of all attachables static std::map sPt2attachpos; // positions of all attachables static std::map sPt2attachrot; // rotations of all attachables static int sPrimIndex; static int sAttachmentsDone; static std::map sId2localid; static std::map sRootpositions; static LLXmlImportOptions* sXmlImportOptions; }; #endif //