From 218c8c9476dbc31507b114fd920f001176e28a84 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 12 Jan 2012 12:02:35 -0800 Subject: Adding some fake data to the linksets UI grid for development purposes. --- indra/newview/llfloaterpathfindinglinksets.cpp | 138 +++++++++++++++++++++++++ 1 file changed, 138 insertions(+) (limited to 'indra/newview/llfloaterpathfindinglinksets.cpp') diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index af9eda51cd..d0c85d3ef6 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -42,6 +42,8 @@ #include "llhttpclient.h" #include "lluuid.h" +#define XXX_STINSON_USE_FAKE_DATA + //--------------------------------------------------------------------------- // NavmeshDataGetResponder //--------------------------------------------------------------------------- @@ -601,6 +603,141 @@ LLFloaterPathfindingLinksets::~LLFloaterPathfindingLinksets() void LLFloaterPathfindingLinksets::sendNavmeshDataGetRequest() { +#ifdef XXX_STINSON_USE_FAKE_DATA + LLSD allData; + + const std::string firstUUID("37198314751"); + LLSD firstData; + firstData["name"] = "Curabitur malesuada"; + firstData["description"] = "Accusam nominavi contentiones per ad"; + firstData["landimpact"] = S32(57); + firstData["fixed"] = bool(false); + firstData["walkable"] = bool(false); + firstData["phantom"] = bool(false); + firstData["A"] = F32(37.5f); + firstData["B"] = F32(7.8f); + firstData["C"] = F32(98.6f); + firstData["D"] = F32(0.0f); + LLVector3 firstLocation(135.0f, 57.0f, 2.0f); + firstData["position"] = firstLocation.getValue(); + + const std::string secondUUID("5467227"); + LLSD secondData; + secondData["name"] = "At tota"; + secondData["description"] = "His ad placerat tincidun"; + secondData["landimpact"] = S32(2); + secondData["fixed"] = bool(false); + secondData["walkable"] = bool(false); + secondData["phantom"] = bool(true); + secondData["A"] = F32(30.5f); + secondData["B"] = F32(70.8f); + secondData["C"] = F32(100.0f); + secondData["D"] = F32(0.1f); + LLVector3 secondLocation(15.0f, 157.0f, 22.0f); + secondData["position"] = secondLocation.getValue(); + + const std::string thirdUUID("897234"); + LLSD thirdData; + thirdData["name"] = "No soleat"; + thirdData["description"] = ""; + thirdData["landimpact"] = S32(200); + thirdData["fixed"] = bool(false); + thirdData["walkable"] = bool(true); + thirdData["phantom"] = bool(false); + thirdData["A"] = F32(58.5f); + thirdData["B"] = F32(8.0f); + thirdData["C"] = F32(2.0f); + thirdData["D"] = F32(15.5f); + LLVector3 thirdLocation(577.0f, 14.0f, -14.5f); + thirdData["position"] = thirdLocation.getValue(); + + const std::string fourthUUID("498792"); + LLSD fourthData; + fourthData["name"] = "Paulo tritani bonorum"; + fourthData["description"] = "Vis verear impetus"; + fourthData["landimpact"] = S32(56); + fourthData["fixed"] = bool(false); + fourthData["walkable"] = bool(true); + fourthData["phantom"] = bool(true); + fourthData["A"] = F32(100.0f); + fourthData["B"] = F32(100.0f); + fourthData["C"] = F32(0.0f); + fourthData["D"] = F32(0.0f); + LLVector3 fourthLocation(215.0f, 57.0f, 5.0f); + fourthData["position"] = fourthLocation.getValue(); + + const std::string fifthUUID("5996732"); + LLSD fifthData; + fifthData["name"] = "Curabitur malesuada"; + fifthData["description"] = "Reque possit philosophia"; + fifthData["landimpact"] = S32(20); + fifthData["fixed"] = bool(true); + fifthData["walkable"] = bool(false); + fifthData["phantom"] = bool(false); + fifthData["A"] = F32(37.5f); + fifthData["B"] = F32(7.8f); + fifthData["C"] = F32(98.6f); + fifthData["D"] = F32(0.0f); + LLVector3 fifthLocation(135.0f, 57.0f, 2.0f); + fifthData["position"] = fifthLocation.getValue(); + + const std::string sixthUUID("03217522"); + LLSD sixthData; + sixthData["name"] = "At tota"; + sixthData["description"] = "Usu no aliquid dignissim"; + sixthData["landimpact"] = S32(257); + sixthData["fixed"] = bool(true); + sixthData["walkable"] = bool(false); + sixthData["phantom"] = bool(true); + sixthData["A"] = F32(0.0f); + sixthData["B"] = F32(0.0f); + sixthData["C"] = F32(100.0f); + sixthData["D"] = F32(0.1f); + LLVector3 sixthLocation(315.0f, 57.0f, 12.0f); + sixthData["position"] = sixthLocation.getValue(); + + const std::string seventhUUID("7844327"); + LLSD seventhData; + seventhData["name"] = "No soleat"; + seventhData["description"] = "honestatis"; + seventhData["landimpact"] = S32(25); + seventhData["fixed"] = bool(true); + seventhData["walkable"] = bool(true); + seventhData["phantom"] = bool(false); + seventhData["A"] = F32(55.4f); + seventhData["B"] = F32(27.12f); + seventhData["C"] = F32(32.5f); + seventhData["D"] = F32(15.5f); + LLVector3 seventhLocation(7.0f, 0.0f, 0.0f); + seventhData["position"] = seventhLocation.getValue(); + + const std::string eigthUUID("2478739685"); + LLSD eigthData; + eigthData["name"] = "Sea te aliquam"; + eigthData["description"] = ""; + eigthData["landimpact"] = S32(17); + eigthData["fixed"] = bool(true); + eigthData["walkable"] = bool(true); + eigthData["phantom"] = bool(true); + eigthData["A"] = F32(10.0f); + eigthData["B"] = F32(10.0f); + eigthData["C"] = F32(50.0f); + eigthData["D"] = F32(60.0f); + LLVector3 eigthLocation(25.0f, 7.0f, 5.0f); + eigthData["position"] = eigthLocation.getValue(); + + allData[firstUUID] = firstData; + allData[secondUUID] = secondData; + allData[thirdUUID] = thirdData; + allData[fourthUUID] = fourthData; + allData[fifthUUID] = fifthData; + allData[sixthUUID] = sixthData; + allData[seventhUUID] = seventhData; + allData[eigthUUID] = eigthData; + + handleNavmeshDataGetReply(allData); + +#else // XXX_STINSON_USE_FAKE_DATA if (isFetchInProgress()) { if (getFetchState() == kFetchRequestSent) @@ -630,6 +767,7 @@ void LLFloaterPathfindingLinksets::sendNavmeshDataGetRequest() } } } +#endif } void LLFloaterPathfindingLinksets::handleNavmeshDataGetReply(const LLSD& pNavmeshData) -- cgit v1.2.3