From 473da43c1bbc20245b3a74c1adc7c92f91d25807 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 27 Mar 2012 19:05:29 -0700 Subject: Refactoring the characters floater code. --- indra/newview/llpathfindingcharacterlist.cpp | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 indra/newview/llpathfindingcharacterlist.cpp (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp new file mode 100644 index 0000000000..64fddd490c --- /dev/null +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -0,0 +1,63 @@ +/** + * @file llpathfindingcharacterlist.cpp + * @author William Todd Stinson + * @brief Class to implement the list of a set of pathfinding characters + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include +#include + +#include "llsd.h" +#include "lluuid.h" +#include "llpathfindingcharacter.h" +#include "llpathfindingcharacterlist.h" + +//--------------------------------------------------------------------------- +// LLPathfindingCharacterList +//--------------------------------------------------------------------------- + +LLPathfindingCharacterList::LLPathfindingCharacterList() + : LLPathfindingCharacterMap() +{ +} + +LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterItems) + : LLPathfindingCharacterMap() +{ + for (LLSD::map_const_iterator characterItemIter = pCharacterItems.beginMap(); + characterItemIter != pCharacterItems.endMap(); ++characterItemIter) + { + const std::string& uuid(characterItemIter->first); + const LLSD& characterData = characterItemIter->second; + LLPathfindingCharacterPtr character(new LLPathfindingCharacter(uuid, characterData)); + insert(std::pair(uuid, character)); + } +} + +LLPathfindingCharacterList::~LLPathfindingCharacterList() +{ + clear(); +} -- cgit v1.2.3 From cbebd682f7b9b0cff120bc36d9db9bb170dc1b2a Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 25 Apr 2012 13:04:13 -0700 Subject: Removing windows line endings from .h and .cpp files. --- indra/newview/llpathfindingcharacterlist.cpp | 126 +++++++++++++-------------- 1 file changed, 63 insertions(+), 63 deletions(-) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 64fddd490c..5ab4a8910f 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -1,63 +1,63 @@ -/** - * @file llpathfindingcharacterlist.cpp - * @author William Todd Stinson - * @brief Class to implement the list of a set of pathfinding characters - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#include "llviewerprecompiledheaders.h" - -#include -#include - -#include "llsd.h" -#include "lluuid.h" -#include "llpathfindingcharacter.h" -#include "llpathfindingcharacterlist.h" - -//--------------------------------------------------------------------------- -// LLPathfindingCharacterList -//--------------------------------------------------------------------------- - -LLPathfindingCharacterList::LLPathfindingCharacterList() - : LLPathfindingCharacterMap() -{ -} - -LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterItems) - : LLPathfindingCharacterMap() -{ - for (LLSD::map_const_iterator characterItemIter = pCharacterItems.beginMap(); - characterItemIter != pCharacterItems.endMap(); ++characterItemIter) - { - const std::string& uuid(characterItemIter->first); - const LLSD& characterData = characterItemIter->second; - LLPathfindingCharacterPtr character(new LLPathfindingCharacter(uuid, characterData)); - insert(std::pair(uuid, character)); - } -} - -LLPathfindingCharacterList::~LLPathfindingCharacterList() -{ - clear(); -} +/** + * @file llpathfindingcharacterlist.cpp + * @author William Todd Stinson + * @brief Class to implement the list of a set of pathfinding characters + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include +#include + +#include "llsd.h" +#include "lluuid.h" +#include "llpathfindingcharacter.h" +#include "llpathfindingcharacterlist.h" + +//--------------------------------------------------------------------------- +// LLPathfindingCharacterList +//--------------------------------------------------------------------------- + +LLPathfindingCharacterList::LLPathfindingCharacterList() + : LLPathfindingCharacterMap() +{ +} + +LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterItems) + : LLPathfindingCharacterMap() +{ + for (LLSD::map_const_iterator characterItemIter = pCharacterItems.beginMap(); + characterItemIter != pCharacterItems.endMap(); ++characterItemIter) + { + const std::string& uuid(characterItemIter->first); + const LLSD& characterData = characterItemIter->second; + LLPathfindingCharacterPtr character(new LLPathfindingCharacter(uuid, characterData)); + insert(std::pair(uuid, character)); + } +} + +LLPathfindingCharacterList::~LLPathfindingCharacterList() +{ + clear(); +} -- cgit v1.2.3 From 3c2be426e5e905076d00b9492c0e66c8b31caf19 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 30 May 2012 18:47:12 -0700 Subject: First pass at refactoring the pathfinding linksets and pathfinding characters classes to reduce code duplication, as both functionalities were heavily duplicated. --- indra/newview/llpathfindingcharacterlist.cpp | 37 ++++++++++++++++------------ 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 5ab4a8910f..53b21f436d 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -27,37 +27,42 @@ #include "llviewerprecompiledheaders.h" -#include -#include +#include "llpathfindingcharacterlist.h" #include "llsd.h" -#include "lluuid.h" #include "llpathfindingcharacter.h" -#include "llpathfindingcharacterlist.h" +#include "llpathfindingobject.h" +#include "llpathfindingobjectlist.h" //--------------------------------------------------------------------------- // LLPathfindingCharacterList //--------------------------------------------------------------------------- LLPathfindingCharacterList::LLPathfindingCharacterList() - : LLPathfindingCharacterMap() + : LLPathfindingObjectList() { } -LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterItems) - : LLPathfindingCharacterMap() +LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) + : LLPathfindingObjectList() { - for (LLSD::map_const_iterator characterItemIter = pCharacterItems.beginMap(); - characterItemIter != pCharacterItems.endMap(); ++characterItemIter) - { - const std::string& uuid(characterItemIter->first); - const LLSD& characterData = characterItemIter->second; - LLPathfindingCharacterPtr character(new LLPathfindingCharacter(uuid, characterData)); - insert(std::pair(uuid, character)); - } + parseCharacterListData(pCharacterListData); } LLPathfindingCharacterList::~LLPathfindingCharacterList() { - clear(); +} + +void LLPathfindingCharacterList::parseCharacterListData(const LLSD& pCharacterListData) +{ + LLPathfindingObjectMap &objectMap = getObjectMap(); + + for (LLSD::map_const_iterator characterDataIter = pCharacterListData.beginMap(); + characterDataIter != pCharacterListData.endMap(); ++characterDataIter) + { + const std::string& uuid(characterDataIter->first); + const LLSD& characterData = characterDataIter->second; + LLPathfindingObjectPtr character(new LLPathfindingCharacter(uuid, characterData)); + objectMap.insert(std::pair(uuid, character)); + } } -- cgit v1.2.3 From 3352a1eac15f752535b636866eeb966ec3900c62 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 30 May 2012 19:39:08 -0700 Subject: Cleaning up some unreferenced headers and classes definitions from previous refactoring. --- indra/newview/llpathfindingcharacterlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 53b21f436d..9b0ed14e35 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -29,10 +29,10 @@ #include "llpathfindingcharacterlist.h" -#include "llsd.h" #include "llpathfindingcharacter.h" #include "llpathfindingobject.h" #include "llpathfindingobjectlist.h" +#include "llsd.h" //--------------------------------------------------------------------------- // LLPathfindingCharacterList -- cgit v1.2.3 From ef75a2e07ec4f26c9126c04af1adfbd28d7eaa9b Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 31 May 2012 16:38:19 -0400 Subject: WIP:Displaying physics capsule for a character - it is currently disabled. --- indra/newview/llpathfindingcharacterlist.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 9b0ed14e35..15eaac771f 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -33,6 +33,7 @@ #include "llpathfindingobject.h" #include "llpathfindingobjectlist.h" #include "llsd.h" +#include "llpathinglib.h" //--------------------------------------------------------------------------- // LLPathfindingCharacterList @@ -46,6 +47,13 @@ LLPathfindingCharacterList::LLPathfindingCharacterList() LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) : LLPathfindingObjectList() { + if ( LLPathingLib::getInstance() == NULL ) + { + LLPathingLib::initSystem(); + } + + LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); + parseCharacterListData(pCharacterListData); } -- cgit v1.2.3 From b912c27bf44a45e607adc3b5c94d3fd8a9bbf53e Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 11 Jun 2012 16:40:53 -0700 Subject: PATH-711: Implementing Leo's changes for the pathfinding console. --- indra/newview/llpathfindingcharacterlist.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 15eaac771f..ac1fb15be9 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -47,12 +47,10 @@ LLPathfindingCharacterList::LLPathfindingCharacterList() LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) : LLPathfindingObjectList() { - if ( LLPathingLib::getInstance() == NULL ) + if (LLPathingLib::getInstance() != NULL) { - LLPathingLib::initSystem(); + LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); } - - LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); parseCharacterListData(pCharacterListData); } -- cgit v1.2.3 From ce101172954c9cbc9a089d8796643d545bdee9d5 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 25 Jun 2012 18:02:41 -0700 Subject: PATH-718: Ensuring that the characters panel will work correctly with a stubbed physicsextension library. --- indra/newview/llpathfindingcharacterlist.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index ac1fb15be9..9b0ed14e35 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -33,7 +33,6 @@ #include "llpathfindingobject.h" #include "llpathfindingobjectlist.h" #include "llsd.h" -#include "llpathinglib.h" //--------------------------------------------------------------------------- // LLPathfindingCharacterList @@ -47,11 +46,6 @@ LLPathfindingCharacterList::LLPathfindingCharacterList() LLPathfindingCharacterList::LLPathfindingCharacterList(const LLSD& pCharacterListData) : LLPathfindingObjectList() { - if (LLPathingLib::getInstance() != NULL) - { - LLPathingLib::getInstance()->cleanupPhysicsCapsuleRepResiduals( ); - } - parseCharacterListData(pCharacterListData); } -- cgit v1.2.3 From 78910cf3016fc55eaf8214640b348df0f8bcdeda Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 26 Jun 2012 18:04:19 -0700 Subject: Updating the header licensing comments. --- indra/newview/llpathfindingcharacterlist.cpp | 51 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'indra/newview/llpathfindingcharacterlist.cpp') diff --git a/indra/newview/llpathfindingcharacterlist.cpp b/indra/newview/llpathfindingcharacterlist.cpp index 9b0ed14e35..12340cebfa 100644 --- a/indra/newview/llpathfindingcharacterlist.cpp +++ b/indra/newview/llpathfindingcharacterlist.cpp @@ -1,29 +1,30 @@ /** - * @file llpathfindingcharacterlist.cpp - * @author William Todd Stinson - * @brief Class to implement the list of a set of pathfinding characters - * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ +* @file llpathfindingcharacterlist.cpp +* @brief Implementation of llpathfindingcharacterlist +* @author Stinson@lindenlab.com +* +* $LicenseInfo:firstyear=2012&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2012, Linden Research, Inc. +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; +* version 2.1 of the License only. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +* +* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +* $/LicenseInfo$ +*/ + #include "llviewerprecompiledheaders.h" -- cgit v1.2.3