From 2115211328261d875dc0ccacdc2021f1c501a36d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 9 Apr 2012 18:53:52 -0700 Subject: Re-implementing the path testing functionality as a proper LLTool. --- indra/newview/llpathfindingpathtool.h | 102 ++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 indra/newview/llpathfindingpathtool.h (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h new file mode 100644 index 0000000000..80d3b4cceb --- /dev/null +++ b/indra/newview/llpathfindingpathtool.h @@ -0,0 +1,102 @@ +/** + * @file llpathfindingpathtool.h + * @author William Todd Stinson + * @brief XXX + * + * $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$ + */ + +#ifndef LL_LLPATHFINDINGPATHTOOL_H +#define LL_LLPATHFINDINGPATHTOOL_H + +#include "llsingleton.h" +#include "lltool.h" +#include "llpathinglib.h" + +#include +#include + +class LLPathfindingPathTool : public LLTool, public LLSingleton +{ +public: + typedef enum + { + kPathStatusUnknown, + kPathStatusChooseStartAndEndPoints, + kPathStatusChooseStartPoint, + kPathStatusChooseEndPoint, + kPathStatusHasValidPath, + kPathStatusHasInvalidPath, + kPathStatusNotEnabled, + kPathStatusNotImplemented, + kPathStatusError + } EPathStatus; + + typedef enum + { + kCharacterTypeNone, + kCharacterTypeA, + kCharacterTypeB, + kCharacterTypeC, + kCharacterTypeD + } ECharacterType; + + typedef + + LLPathfindingPathTool(); + virtual ~LLPathfindingPathTool(); + + typedef boost::function path_event_callback_t; + typedef boost::signals2::signal path_event_signal_t; + typedef boost::signals2::connection path_event_slot_t; + + virtual BOOL handleMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); + + EPathStatus getPathStatus() const; + + F32 getCharacterWidth() const; + void setCharacterWidth(F32 pCharacterWidth); + + ECharacterType getCharacterType() const; + void setCharacterType(ECharacterType pCharacterType); + + bool isRenderPath() const; + void clearPath(); + + path_event_slot_t registerPathEventListener(path_event_callback_t pPathEventCallback); + +protected: + +private: + void computePath(); + + LLPathingLib::PathingPacket mPathData; + LLPathingLib::LLPLResult mPathResult; + bool mHasStartPoint; + bool mHasEndPoint; + F32 mCharacterWidth; + ECharacterType mCharacterType; + path_event_signal_t mPathEventSignal; +}; + +#endif // LL_LLPATHFINDINGPATHTOOL_H -- cgit v1.2.3 From 65980a62abf6a4d6fb0d64e26febe40396f02d24 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 10 Apr 2012 10:32:52 -0700 Subject: BUILDFIX: Correcting a build error. --- indra/newview/llpathfindingpathtool.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 80d3b4cceb..d9dff3611b 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -60,8 +60,6 @@ public: kCharacterTypeD } ECharacterType; - typedef - LLPathfindingPathTool(); virtual ~LLPathfindingPathTool(); -- cgit v1.2.3 From 7f49803dd284417674988a4de5262ad63f66d092 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 10 Apr 2012 11:13:12 -0700 Subject: BUILDFIX: Correcting one more build issue on linux and mac platforms. --- indra/newview/llpathfindingpathtool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index d9dff3611b..1e17b71bd3 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -30,7 +30,7 @@ #include "llsingleton.h" #include "lltool.h" -#include "llpathinglib.h" +#include "LLPathingLib.h" #include #include -- cgit v1.2.3 From 7a60a12531769629ba20914128581498256f3e2f Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 10 Apr 2012 12:05:12 -0700 Subject: Implementing a temporary path functionality based on a suggestion to improve usability. --- indra/newview/llpathfindingpathtool.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 1e17b71bd3..2b9b363fec 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -86,12 +86,20 @@ public: protected: private: - void computePath(); + bool isAnyPathToolModKeys(MASK pMask) const; + bool isStartPathToolModKeys(MASK pMask) const; + bool isEndPathToolModKeys(MASK pMask) const; - LLPathingLib::PathingPacket mPathData; + void computeFinalPath(); + void computeTempPath(); + + LLPathingLib::PathingPacket mFinalPathData; + LLPathingLib::PathingPacket mTempPathData; LLPathingLib::LLPLResult mPathResult; - bool mHasStartPoint; - bool mHasEndPoint; + bool mHasFinalStartPoint; + bool mHasFinalEndPoint; + bool mHasTempStartPoint; + bool mHasTempEndPoint; F32 mCharacterWidth; ECharacterType mCharacterType; path_event_signal_t mPathEventSignal; -- cgit v1.2.3 From ba0e3c3c6485fefbe273b6fa8f9121850166b2cc Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 10 Apr 2012 18:20:21 -0700 Subject: Adding the display of the temporary start/end path character on hover state. --- indra/newview/llpathfindingpathtool.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 2b9b363fec..0ec22d959c 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -87,8 +87,27 @@ protected: private: bool isAnyPathToolModKeys(MASK pMask) const; - bool isStartPathToolModKeys(MASK pMask) const; - bool isEndPathToolModKeys(MASK pMask) const; + bool isPointAModKeys(MASK pMask) const; + bool isPointBModKeys(MASK pMask) const; + + void setFinalA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasFinalA() const; + const LLVector3 &getFinalAStart() const; + const LLVector3 &getFinalAEnd() const; + + void setTempA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasTempA() const; + + void setFinalB(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasFinalB() const; + const LLVector3 &getFinalBStart() const; + const LLVector3 &getFinalBEnd() const; + + void setTempB(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasTempB() const; + + void clearFinal(); + void clearTemp(); void computeFinalPath(); void computeTempPath(); @@ -96,11 +115,6 @@ private: LLPathingLib::PathingPacket mFinalPathData; LLPathingLib::PathingPacket mTempPathData; LLPathingLib::LLPLResult mPathResult; - bool mHasFinalStartPoint; - bool mHasFinalEndPoint; - bool mHasTempStartPoint; - bool mHasTempEndPoint; - F32 mCharacterWidth; ECharacterType mCharacterType; path_event_signal_t mPathEventSignal; }; -- cgit v1.2.3 From 1f09812ad23208016f0046ef2d1187f15958a822 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 10 Apr 2012 18:42:36 -0700 Subject: Modifying the behavior so that the user is able to drag the start/end points, but holding ctrl/shift while hovering will still not be destructive to the old values. --- indra/newview/llpathfindingpathtool.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 0ec22d959c..be2b90ee1a 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -68,6 +68,13 @@ public: typedef boost::signals2::connection path_event_slot_t; virtual BOOL handleMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); EPathStatus getPathStatus() const; -- cgit v1.2.3 From c7df83c77dce0d59a4ac8e3ff65f104431eed117 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 10 Apr 2012 19:02:47 -0700 Subject: Refactoring to remove duplicate code. --- indra/newview/llpathfindingpathtool.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index be2b90ee1a..ab1408826e 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -97,6 +97,10 @@ private: bool isPointAModKeys(MASK pMask) const; bool isPointBModKeys(MASK pMask) const; + void getRayPoints(S32 pX, S32 pY, LLVector3 &pRayStart, LLVector3 &pRayEnd) const; + void computeFinalPoints(S32 pX, S32 pY, MASK pMask); + void computeTempPoints(S32 pX, S32 pY, MASK pMask); + void setFinalA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); bool hasFinalA() const; const LLVector3 &getFinalAStart() const; -- cgit v1.2.3 From 6aeb2c68b9294e77ef9e16a8ad2fcd38d40ecfaf Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 11 Apr 2012 13:20:54 -0700 Subject: Refining the behavior of the pathing test tool behavior with regards to mouse clicks. --- indra/newview/llpathfindingpathtool.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index ab1408826e..15ce97fe67 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -68,12 +68,13 @@ public: typedef boost::signals2::connection path_event_slot_t; virtual BOOL handleMouseDown(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleMouseUp(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + virtual void onMouseCaptureLost(); virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); @@ -128,6 +129,9 @@ private: LLPathingLib::LLPLResult mPathResult; ECharacterType mCharacterType; path_event_signal_t mPathEventSignal; + bool mIsLeftMouseButtonHeld; + bool mIsMiddleMouseButtonHeld; + bool mIsRightMouseButtonHeld; }; #endif // LL_LLPATHFINDINGPATHTOOL_H -- cgit v1.2.3 From f1df928b4bc1df7bc8ab6871c5273b04d0b77dea Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 11 Apr 2012 13:58:26 -0700 Subject: Removing debug messaging that was accidentally committed. --- indra/newview/llpathfindingpathtool.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 15ce97fe67..fd55dd8335 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -74,7 +74,6 @@ public: virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask); virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask); virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); - virtual void onMouseCaptureLost(); virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); -- cgit v1.2.3 From 1cdef4903daea1622923550b1328b659a594b029 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 18 Apr 2012 16:03:33 -0700 Subject: Updating to the latest llphysicextensions pre-built package with the now lowercased version of the header file names. --- indra/newview/llpathfindingpathtool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index fd55dd8335..492304e4a4 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -30,7 +30,7 @@ #include "llsingleton.h" #include "lltool.h" -#include "LLPathingLib.h" +#include "llpathinglib.h" #include #include -- 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/llpathfindingpathtool.h | 272 +++++++++++++++++----------------- 1 file changed, 136 insertions(+), 136 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 492304e4a4..0294111ccf 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -1,136 +1,136 @@ -/** - * @file llpathfindingpathtool.h - * @author William Todd Stinson - * @brief XXX - * - * $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$ - */ - -#ifndef LL_LLPATHFINDINGPATHTOOL_H -#define LL_LLPATHFINDINGPATHTOOL_H - -#include "llsingleton.h" -#include "lltool.h" -#include "llpathinglib.h" - -#include -#include - -class LLPathfindingPathTool : public LLTool, public LLSingleton -{ -public: - typedef enum - { - kPathStatusUnknown, - kPathStatusChooseStartAndEndPoints, - kPathStatusChooseStartPoint, - kPathStatusChooseEndPoint, - kPathStatusHasValidPath, - kPathStatusHasInvalidPath, - kPathStatusNotEnabled, - kPathStatusNotImplemented, - kPathStatusError - } EPathStatus; - - typedef enum - { - kCharacterTypeNone, - kCharacterTypeA, - kCharacterTypeB, - kCharacterTypeC, - kCharacterTypeD - } ECharacterType; - - LLPathfindingPathTool(); - virtual ~LLPathfindingPathTool(); - - typedef boost::function path_event_callback_t; - typedef boost::signals2::signal path_event_signal_t; - typedef boost::signals2::connection path_event_slot_t; - - virtual BOOL handleMouseDown(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleMouseUp(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask); - virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); - - virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); - - EPathStatus getPathStatus() const; - - F32 getCharacterWidth() const; - void setCharacterWidth(F32 pCharacterWidth); - - ECharacterType getCharacterType() const; - void setCharacterType(ECharacterType pCharacterType); - - bool isRenderPath() const; - void clearPath(); - - path_event_slot_t registerPathEventListener(path_event_callback_t pPathEventCallback); - -protected: - -private: - bool isAnyPathToolModKeys(MASK pMask) const; - bool isPointAModKeys(MASK pMask) const; - bool isPointBModKeys(MASK pMask) const; - - void getRayPoints(S32 pX, S32 pY, LLVector3 &pRayStart, LLVector3 &pRayEnd) const; - void computeFinalPoints(S32 pX, S32 pY, MASK pMask); - void computeTempPoints(S32 pX, S32 pY, MASK pMask); - - void setFinalA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); - bool hasFinalA() const; - const LLVector3 &getFinalAStart() const; - const LLVector3 &getFinalAEnd() const; - - void setTempA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); - bool hasTempA() const; - - void setFinalB(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); - bool hasFinalB() const; - const LLVector3 &getFinalBStart() const; - const LLVector3 &getFinalBEnd() const; - - void setTempB(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); - bool hasTempB() const; - - void clearFinal(); - void clearTemp(); - - void computeFinalPath(); - void computeTempPath(); - - LLPathingLib::PathingPacket mFinalPathData; - LLPathingLib::PathingPacket mTempPathData; - LLPathingLib::LLPLResult mPathResult; - ECharacterType mCharacterType; - path_event_signal_t mPathEventSignal; - bool mIsLeftMouseButtonHeld; - bool mIsMiddleMouseButtonHeld; - bool mIsRightMouseButtonHeld; -}; - -#endif // LL_LLPATHFINDINGPATHTOOL_H +/** + * @file llpathfindingpathtool.h + * @author William Todd Stinson + * @brief XXX + * + * $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$ + */ + +#ifndef LL_LLPATHFINDINGPATHTOOL_H +#define LL_LLPATHFINDINGPATHTOOL_H + +#include "llsingleton.h" +#include "lltool.h" +#include "llpathinglib.h" + +#include +#include + +class LLPathfindingPathTool : public LLTool, public LLSingleton +{ +public: + typedef enum + { + kPathStatusUnknown, + kPathStatusChooseStartAndEndPoints, + kPathStatusChooseStartPoint, + kPathStatusChooseEndPoint, + kPathStatusHasValidPath, + kPathStatusHasInvalidPath, + kPathStatusNotEnabled, + kPathStatusNotImplemented, + kPathStatusError + } EPathStatus; + + typedef enum + { + kCharacterTypeNone, + kCharacterTypeA, + kCharacterTypeB, + kCharacterTypeC, + kCharacterTypeD + } ECharacterType; + + LLPathfindingPathTool(); + virtual ~LLPathfindingPathTool(); + + typedef boost::function path_event_callback_t; + typedef boost::signals2::signal path_event_signal_t; + typedef boost::signals2::connection path_event_slot_t; + + virtual BOOL handleMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMiddleMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleMiddleMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleRightMouseDown(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleRightMouseUp(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + + virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); + + EPathStatus getPathStatus() const; + + F32 getCharacterWidth() const; + void setCharacterWidth(F32 pCharacterWidth); + + ECharacterType getCharacterType() const; + void setCharacterType(ECharacterType pCharacterType); + + bool isRenderPath() const; + void clearPath(); + + path_event_slot_t registerPathEventListener(path_event_callback_t pPathEventCallback); + +protected: + +private: + bool isAnyPathToolModKeys(MASK pMask) const; + bool isPointAModKeys(MASK pMask) const; + bool isPointBModKeys(MASK pMask) const; + + void getRayPoints(S32 pX, S32 pY, LLVector3 &pRayStart, LLVector3 &pRayEnd) const; + void computeFinalPoints(S32 pX, S32 pY, MASK pMask); + void computeTempPoints(S32 pX, S32 pY, MASK pMask); + + void setFinalA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasFinalA() const; + const LLVector3 &getFinalAStart() const; + const LLVector3 &getFinalAEnd() const; + + void setTempA(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasTempA() const; + + void setFinalB(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasFinalB() const; + const LLVector3 &getFinalBStart() const; + const LLVector3 &getFinalBEnd() const; + + void setTempB(const LLVector3 &pStartPoint, const LLVector3 &pEndPoint); + bool hasTempB() const; + + void clearFinal(); + void clearTemp(); + + void computeFinalPath(); + void computeTempPath(); + + LLPathingLib::PathingPacket mFinalPathData; + LLPathingLib::PathingPacket mTempPathData; + LLPathingLib::LLPLResult mPathResult; + ECharacterType mCharacterType; + path_event_signal_t mPathEventSignal; + bool mIsLeftMouseButtonHeld; + bool mIsMiddleMouseButtonHeld; + bool mIsRightMouseButtonHeld; +}; + +#endif // LL_LLPATHFINDINGPATHTOOL_H -- cgit v1.2.3 From fb7c7043a467d0d6c2b741ca603b6b1c57a52ae9 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Fri, 1 Jun 2012 16:50:28 -0700 Subject: PATH-668: Eating the escape key in the pathfinding path tool to avoid certain bad behaviors. --- indra/newview/llpathfindingpathtool.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 0294111ccf..671f5bef95 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -77,6 +77,8 @@ public: virtual BOOL handleHover(S32 pX, S32 pY, MASK pMask); + virtual BOOL handleKey(KEY pKey, MASK pMask); + EPathStatus getPathStatus() const; F32 getCharacterWidth() const; -- cgit v1.2.3 From 11b6e272abf05c5429865aaa1366bd450b8bc218 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 21 Jun 2012 16:39:35 -0700 Subject: PATH-743: Altering the mouse cursor to give more feed back when in path testing mode. --- indra/newview/llpathfindingpathtool.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 671f5bef95..8a79da43c9 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -98,6 +98,7 @@ private: bool isAnyPathToolModKeys(MASK pMask) const; bool isPointAModKeys(MASK pMask) const; bool isPointBModKeys(MASK pMask) const; + bool isCameraModKeys(MASK pMask) const; void getRayPoints(S32 pX, S32 pY, LLVector3 &pRayStart, LLVector3 &pRayEnd) const; void computeFinalPoints(S32 pX, S32 pY, MASK pMask); -- 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/llpathfindingpathtool.h | 51 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index 8a79da43c9..e0db87d1ed 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -1,30 +1,29 @@ /** - * @file llpathfindingpathtool.h - * @author William Todd Stinson - * @brief XXX - * - * $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 llpathfindingpathtool.h +* @brief Header file for llpathfindingpathtool +* @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$ +*/ #ifndef LL_LLPATHFINDINGPATHTOOL_H #define LL_LLPATHFINDINGPATHTOOL_H -- cgit v1.2.3 From 685a672b74550ca0dbf8a816257c84c9c44fd34d Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 28 Jun 2012 15:37:55 -0700 Subject: Cleaning up new files in preparation for merge into viewer-release. --- indra/newview/llpathfindingpathtool.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpathfindingpathtool.h') diff --git a/indra/newview/llpathfindingpathtool.h b/indra/newview/llpathfindingpathtool.h index e0db87d1ed..97284265f1 100644 --- a/indra/newview/llpathfindingpathtool.h +++ b/indra/newview/llpathfindingpathtool.h @@ -27,13 +27,13 @@ #ifndef LL_LLPATHFINDINGPATHTOOL_H #define LL_LLPATHFINDINGPATHTOOL_H -#include "llsingleton.h" -#include "lltool.h" -#include "llpathinglib.h" - #include #include +#include "llpathinglib.h" +#include "llsingleton.h" +#include "lltool.h" + class LLPathfindingPathTool : public LLTool, public LLSingleton { public: -- cgit v1.2.3