LLTracker Class Reference

#include <lltracker.h>

Collaboration diagram for LLTracker:

Collaboration graph
[legend]
List of all members.

Public Types

 TRACKING_NOTHING = 0
 TRACKING_AVATAR = 1
 TRACKING_LANDMARK = 2
 TRACKING_LOCATION = 3
 LOCATION_NOTHING
 LOCATION_EVENT
 LOCATION_ITEM
enum  ETrackingStatus { TRACKING_NOTHING = 0, TRACKING_AVATAR = 1, TRACKING_LANDMARK = 2, TRACKING_LOCATION = 3 }
enum  ETrackingLocationType { LOCATION_NOTHING, LOCATION_EVENT, LOCATION_ITEM }

Static Public Member Functions

static LLTrackerinstance ()
static void cleanupInstance ()
static ETrackingStatus getTrackingStatus ()
static ETrackingLocationType getTrackedLocationType ()
static BOOL isTracking (void *)
static void stopTracking (void *)
static const LLUUIDgetTrackedLandmarkAssetID ()
static const LLUUIDgetTrackedLandmarkItemID ()
static void trackAvatar (const LLUUID &avatar_id, const LLString &name)
static void trackLandmark (const LLUUID &landmark_asset_id, const LLUUID &landmark_item_id, const LLString &name)
static void trackLocation (const LLVector3d &pos, const LLString &full_name, const LLString &tooltip, ETrackingLocationType location_type=LOCATION_NOTHING)
static LLVector3d getTrackedPositionGlobal ()
static BOOL hasLandmarkPosition ()
static const LLStringgetTrackedLocationName ()
static void drawHUDArrow ()
static void render3D ()
static BOOL handleMouseDown (S32 x, S32 y)
static const LLStringgetLabel ()
static const LLStringgetToolTip ()

Static Public Attributes

static LLTrackersTrackerp = NULL
static BOOL sCheesyBeacon = FALSE

Protected Member Functions

 LLTracker ()
 ~LLTracker ()
void stopTrackingAll (BOOL clear_ui=FALSE)
void stopTrackingAvatar (BOOL clear_ui=FALSE)
void stopTrackingLocation (BOOL clear_ui=FALSE)
void stopTrackingLandmark (BOOL clear_ui=FALSE)
void drawMarker (const LLVector3d &pos_global, const LLColor4 &color)
void setLandmarkVisited ()
void cacheLandmarkPosition ()
void purgeBeaconText ()

Static Protected Member Functions

static void renderBeacon (LLVector3d pos_global, const LLColor4 &color, LLHUDText *hud_textp, const std::string &label)

Protected Attributes

ETrackingStatus mTrackingStatus
ETrackingLocationType mTrackingLocationType
LLPointer< LLHUDTextmBeaconText
S32 mHUDArrowCenterX
S32 mHUDArrowCenterY
LLVector3d mTrackedPositionGlobal
LLString mLabel
LLString mToolTip
LLString mTrackedLandmarkName
LLUUID mTrackedLandmarkAssetID
LLUUID mTrackedLandmarkItemID
LLDynamicArray< LLUUIDmLandmarkAssetIDList
LLDynamicArray< LLUUIDmLandmarkItemIDList
BOOL mHasReachedLandmark
BOOL mHasLandmarkPosition
BOOL mLandmarkHasBeenVisited
LLString mTrackedLocationName
BOOL mIsTrackingLocation
BOOL mHasReachedLocation

Detailed Description

Definition at line 50 of file lltracker.h.


Member Enumeration Documentation

enum LLTracker::ETrackingLocationType

Enumerator:
LOCATION_NOTHING 
LOCATION_EVENT 
LOCATION_ITEM 

Definition at line 61 of file lltracker.h.

enum LLTracker::ETrackingStatus

Enumerator:
TRACKING_NOTHING 
TRACKING_AVATAR 
TRACKING_LANDMARK 
TRACKING_LOCATION 

Definition at line 53 of file lltracker.h.


Constructor & Destructor Documentation

LLTracker::LLTracker (  )  [protected]

Definition at line 81 of file lltracker.cpp.

Referenced by instance().

LLTracker::~LLTracker (  )  [protected]

Definition at line 96 of file lltracker.cpp.

References purgeBeaconText().


Member Function Documentation

void LLTracker::cacheLandmarkPosition (  )  [protected]

Definition at line 766 of file lltracker.cpp.

References DESTINATION_UNVISITED_RADIUS, f, FALSE, gAgent, LLLandmarkList::getAsset(), LLFloaterWorldMap::getDistanceToDestination(), LLInventoryItem::getFlags(), LLLandmark::getGlobalPos(), LLFloaterWorldMap::getHomeID(), LLAgent::getHomePosGlobal(), LLInventoryModel::getItem(), gFloaterWorldMap, gInventory, gLandmarkList, LLInventoryItem::II_FLAGS_LANDMARK_VISITED, llendl, llwarns, mHasLandmarkPosition, mHasReachedLandmark, mLandmarkHasBeenVisited, mTrackedLandmarkAssetID, mTrackedLandmarkItemID, mTrackedPositionGlobal, LLUUID::setNull(), and TRUE.

Referenced by hasLandmarkPosition(), render3D(), and trackLandmark().

static void LLTracker::cleanupInstance (  )  [inline, static]

Definition at line 77 of file lltracker.h.

References NULL, and sTrackerp.

Referenced by cleanup_app().

void LLTracker::drawHUDArrow (  )  [static]

Definition at line 111 of file lltracker.cpp.

References drawMarker(), getTrackedPositionGlobal(), getTrackingStatus(), gTrackColor, gWorldp, instance(), LLAvatarTracker::instance(), llclamp(), LLVector3d::mdV, mTrackedPositionGlobal, LLWorld::resolveLandHeightGlobal(), TRACKING_AVATAR, TRACKING_LANDMARK, TRACKING_LOCATION, and VZ.

Referenced by LLHUDView::draw().

void LLTracker::drawMarker ( const LLVector3d pos_global,
const LLColor4 color 
) [protected]

Definition at line 642 of file lltracker.cpp.

References angle, f, gAgent, gCamera, LLRectBase< Type >::getHeight(), LLAgent::getPosAgentFromGlobal(), LLView::getRect(), LLRectBase< Type >::getWidth(), gHUDView, gl_draw_scaled_rotated_image(), HUD_ARROW_SIZE, llabs(), llclamp(), lltrunc(), mHUDArrowCenterX, mHUDArrowCenterY, LLCoord::mX, LLCoord::mY, LLViewerCamera::projectPosAgentToScreen(), LLViewerCamera::projectPosAgentToScreenEdge(), RAD_TO_DEG, S32, LLView::screenPointToLocal(), LLWorldMapView::sTrackArrowImage, TRUE, x, and y.

Referenced by drawHUDArrow().

static const LLString& LLTracker::getLabel ( void   )  [inline, static]

Definition at line 109 of file lltracker.h.

References instance(), and mLabel.

Referenced by LLWorldMapView::draw().

static const LLString& LLTracker::getToolTip (  )  [inline, static]

Definition at line 110 of file lltracker.h.

References instance(), and mToolTip.

Referenced by LLWorldMapView::draw().

static const LLUUID& LLTracker::getTrackedLandmarkAssetID (  )  [inline, static]

Definition at line 86 of file lltracker.h.

References instance(), and mTrackedLandmarkAssetID.

Referenced by LLFloaterWorldMap::flyToLandmark(), LLFloaterWorldMap::teleport(), and LLFloaterWorldMap::teleportToLandmark().

static const LLUUID& LLTracker::getTrackedLandmarkItemID (  )  [inline, static]

Definition at line 87 of file lltracker.h.

References instance(), and mTrackedLandmarkItemID.

Referenced by LLFloaterWorldMap::inventoryChanged().

const LLString & LLTracker::getTrackedLocationName (  )  [static]

Definition at line 403 of file lltracker.cpp.

References instance(), and mTrackedLocationName.

static ETrackingLocationType LLTracker::getTrackedLocationType (  )  [inline, static]

Definition at line 82 of file lltracker.h.

References instance(), and mTrackingLocationType.

Referenced by LLWorldMapView::drawTracking().

LLVector3d LLTracker::getTrackedPositionGlobal (  )  [static]

Definition at line 361 of file lltracker.cpp.

References LLAvatarTracker::getGlobalPos(), getTrackingStatus(), LLAvatarTracker::haveTrackingInfo(), instance(), LLAvatarTracker::instance(), mHasLandmarkPosition, mTrackedPositionGlobal, TRACKING_AVATAR, TRACKING_LANDMARK, and TRACKING_LOCATION.

Referenced by LLFloaterWorldMap::centerOnTarget(), LLFloaterAvatarList::checkTrackingStatus(), LLWorldMapView::draw(), LLNetMap::draw(), drawHUDArrow(), LLFloaterWorldMap::fly(), LLFloaterWorldMap::flyToLandmark(), LLWorldMapView::handleHover(), LLFloaterWorldMap::onCommitLocation(), process_agent_movement_complete(), LLWorldMap::processMapBlockReply(), LLMapLayerResponder::result(), LLFloaterWorldMap::teleport(), and LLFloaterWorldMap::updateLocation().

static ETrackingStatus LLTracker::getTrackingStatus (  )  [inline, static]

Definition at line 81 of file lltracker.h.

References instance(), and mTrackingStatus.

Referenced by LLFloaterWorldMap::centerOnTarget(), LLWorldMapView::draw(), LLNetMap::draw(), LLFloaterWorldMap::draw(), drawHUDArrow(), LLWorldMapView::drawTracking(), getTrackedPositionGlobal(), handleMouseDown(), LLFloaterWorldMap::onAvatarComboCommit(), LLFloaterWorldMap::onCommitLocation(), LLFloaterWorldMap::onLandmarkComboCommit(), LLFloaterWorldMap::show(), LLFloaterWorldMap::teleport(), and LLFloaterWorldMap::updateLocation().

BOOL LLTracker::handleMouseDown ( S32  x,
S32  y 
) [static]

Definition at line 333 of file lltracker.cpp.

References ARROW_OFF_RADIUS_SQRD, FALSE, getTrackingStatus(), instance(), mHUDArrowCenterX, mHUDArrowCenterY, S32, stopTrackingAll(), and TRUE.

Referenced by LLHUDView::handleMouseDown().

BOOL LLTracker::hasLandmarkPosition (  )  [static]

Definition at line 391 of file lltracker.cpp.

References cacheLandmarkPosition(), instance(), and mHasLandmarkPosition.

Referenced by LLFloaterWorldMap::flyToLandmark().

static LLTracker* LLTracker::instance ( void   )  [inline, static]

Definition at line 68 of file lltracker.h.

References LLTracker(), and sTrackerp.

Referenced by drawHUDArrow(), getLabel(), getToolTip(), getTrackedLandmarkAssetID(), getTrackedLandmarkItemID(), getTrackedLocationName(), getTrackedLocationType(), getTrackedPositionGlobal(), getTrackingStatus(), handleMouseDown(), hasLandmarkPosition(), isTracking(), render3D(), stopTracking(), trackAvatar(), trackLandmark(), and trackLocation().

static BOOL LLTracker::isTracking ( void  )  [inline, static]

Definition at line 83 of file lltracker.h.

References instance(), and mTrackingStatus.

Referenced by LLWorldMapView::handleHover(), LLNetMap::LLNetMap(), and process_agent_movement_complete().

void LLTracker::purgeBeaconText (  )  [protected]

Definition at line 816 of file lltracker.cpp.

References LLPointer< Type >::isNull(), mBeaconText, and NULL.

Referenced by stopTrackingAvatar(), stopTrackingLandmark(), stopTrackingLocation(), and ~LLTracker().

void LLTracker::render3D (  )  [static]

Definition at line 159 of file lltracker.cpp.

References LLHUDObject::addHUDObject(), cacheLandmarkPosition(), DESTINATION_REACHED_RADIUS, DESTINATION_UNVISITED_RADIUS, DESTINATION_VISITED_RADIUS, f, FALSE, gAgent, LLAvatarTracker::getAvatarID(), LLAvatarTracker::getBuddyInfo(), LLFloaterWorldMap::getDistanceToDestination(), LLAvatarTracker::getGlobalPos(), LLAvatarTracker::getName(), gFloaterWorldMap, gTrackColor, LLAvatarTracker::haveTrackingInfo(), LLAvatarTracker::instance(), instance(), LLAgent::isGodlike(), LLUUID::isNull(), LLRelationship::isOnline(), LLHUDObject::LL_HUD_TEXT, mBeaconText, mHasLandmarkPosition, mHasReachedLandmark, mIsTrackingLocation, mLandmarkHasBeenVisited, mTrackedLandmarkAssetID, mTrackedLandmarkName, mTrackedLocationName, mTrackedPositionGlobal, renderBeacon(), setLandmarkVisited(), stopTrackingAvatar(), stopTrackingLandmark(), stopTrackingLocation(), and TRUE.

Referenced by render_hud_elements().

void LLTracker::renderBeacon ( LLVector3d  pos_global,
const LLColor4 color,
LLHUDText hud_textp,
const std::string &  label 
) [static, protected]

Definition at line 472 of file lltracker.cpp.

References a, LLHUDText::ALIGN_VERT_CENTER, draw_shockwave(), f, FALSE, gAgent, gCamera, LLControlGroup::getBOOL(), LLAgent::getCameraPositionGlobal(), LLTimer::getElapsedTimeF32(), LLCamera::getFar(), LLSky::getFogColor(), LLCoordFrame::getLeftAxis(), LLAgent::getPosAgentFromGlobal(), glBegin, glColor4fv, glEnd, glPopMatrix, glTranslatef, gRenderStartTime, gSavedSettings, gSky, i, llmax(), llmin(), LLVector3d::magVec(), LLVector3::mV, LLColor4::mV, pulse_func(), sCheesyBeacon, LLHUDText::setColor(), LLHUDText::setFont(), LLHUDObject::setPositionAgent(), LLHUDText::setString(), LLHUDText::setVertAlignment(), LLHUDText::setZCompare(), LLFontGL::sSansSerif, t, utf8str_to_wstring(), x, y, and z.

Referenced by render3D().

void LLTracker::setLandmarkVisited (  )  [protected]

Definition at line 732 of file lltracker.cpp.

References LLInventoryModel::accountForUpdate(), LLInventoryModel::addChangedMask(), LLMessageSystem::addU32(), LLMessageSystem::addUUID(), gAgent, LLInventoryItem::getFlags(), LLAgent::getID(), LLInventoryModel::getItem(), LLInventoryObject::getParentUUID(), LLAgent::getSessionID(), LLInventoryObject::getUUID(), gInventory, gMessageSystem, i, LLInventoryItem::II_FLAGS_LANDMARK_VISITED, LLInventoryObserver::INTERNAL, LLUUID::isNull(), mTrackedLandmarkItemID, LLMessageSystem::newMessage(), LLMessageSystem::nextBlock(), LLInventoryModel::notifyObservers(), LLAgent::sendReliableMessage(), and LLInventoryItem::setFlags().

Referenced by render3D().

void LLTracker::stopTracking ( void  )  [static]

Definition at line 103 of file lltracker.cpp.

References instance(), and stopTrackingAll().

Referenced by LLFloaterAvatarList::checkTrackingStatus(), LLFloaterWorldMap::friendsChanged(), LLNetMap::LLNetMap(), LLFloaterWorldMap::onAvatarComboPrearrange(), LLFloaterWorldMap::onClearBtn(), LLFloaterAvatarList::onClickTrack(), LLFloaterWorldMap::onLandmarkComboCommit(), LLFloaterWorldMap::onLandmarkComboPrearrange(), process_agent_movement_complete(), LLFloaterWorldMap::trackAvatar(), LLFloaterWorldMap::trackLandmark(), and LLFloaterWorldMap::trackLocation().

void LLTracker::stopTrackingAll ( BOOL  clear_ui = FALSE  )  [protected]

Definition at line 581 of file lltracker.cpp.

References mTrackingStatus, stopTrackingAvatar(), stopTrackingLandmark(), stopTrackingLocation(), TRACKING_AVATAR, TRACKING_LANDMARK, TRACKING_LOCATION, and TRACKING_NOTHING.

Referenced by handleMouseDown(), and stopTracking().

void LLTracker::stopTrackingAvatar ( BOOL  clear_ui = FALSE  )  [protected]

Definition at line 601 of file lltracker.cpp.

References LLFloaterWorldMap::clearAvatarSelection(), LLAvatarTracker::getAvatarID(), gFloaterWorldMap, LLAvatarTracker::instance(), LLUUID::isNull(), mTrackingStatus, purgeBeaconText(), TRACKING_NOTHING, and LLAvatarTracker::untrack().

Referenced by render3D(), stopTrackingAll(), trackLandmark(), and trackLocation().

void LLTracker::stopTrackingLandmark ( BOOL  clear_ui = FALSE  )  [protected]

Definition at line 615 of file lltracker.cpp.

References LLFloaterWorldMap::clearLandmarkSelection(), FALSE, gFloaterWorldMap, mHasLandmarkPosition, mHasReachedLandmark, mLandmarkHasBeenVisited, mTrackedLandmarkAssetID, mTrackedLandmarkItemID, mTrackedLandmarkName, mTrackedPositionGlobal, mTrackingStatus, purgeBeaconText(), LLUUID::setNull(), TRACKING_NOTHING, TRUE, and LLVector3d::zeroVec().

Referenced by render3D(), stopTrackingAll(), trackAvatar(), and trackLocation().

void LLTracker::stopTrackingLocation ( BOOL  clear_ui = FALSE  )  [protected]

Definition at line 630 of file lltracker.cpp.

References LLFloaterWorldMap::clearLocationSelection(), FALSE, gFloaterWorldMap, LOCATION_NOTHING, mIsTrackingLocation, mTrackedLocationName, mTrackedPositionGlobal, mTrackingLocationType, mTrackingStatus, purgeBeaconText(), TRACKING_NOTHING, and LLVector3d::zeroVec().

Referenced by render3D(), stopTrackingAll(), trackAvatar(), and trackLandmark().

void LLTracker::trackAvatar ( const LLUUID avatar_id,
const LLString name 
) [static]

Definition at line 290 of file lltracker.cpp.

References LLAvatarTracker::instance(), instance(), mLabel, mTrackingStatus, stopTrackingLandmark(), stopTrackingLocation(), LLAvatarTracker::track(), and TRACKING_AVATAR.

Referenced by cmd_track(), LLFloaterAvatarList::onClickTrack(), and LLFloaterWorldMap::trackAvatar().

void LLTracker::trackLandmark ( const LLUUID landmark_asset_id,
const LLUUID landmark_item_id,
const LLString name 
) [static]

Definition at line 302 of file lltracker.cpp.

References cacheLandmarkPosition(), instance(), mLabel, mTrackedLandmarkAssetID, mTrackedLandmarkItemID, mTrackedLandmarkName, mTrackingStatus, stopTrackingAvatar(), stopTrackingLocation(), and TRACKING_LANDMARK.

Referenced by LLFloaterWorldMap::trackLandmark().

void LLTracker::trackLocation ( const LLVector3d pos,
const LLString full_name,
const LLString tooltip,
ETrackingLocationType  location_type = LOCATION_NOTHING 
) [static]

Definition at line 317 of file lltracker.cpp.

References instance(), mIsTrackingLocation, mLabel, mToolTip, mTrackedLocationName, mTrackedPositionGlobal, mTrackingLocationType, mTrackingStatus, stopTrackingAvatar(), stopTrackingLandmark(), TRACKING_LOCATION, and TRUE.

Referenced by LLFloaterAvatarList::checkTrackingStatus(), LLFloaterTopObjects::showBeacon(), LLFloaterWorldMap::trackEvent(), LLFloaterWorldMap::trackGenericItem(), and LLFloaterWorldMap::trackLocation().


Member Data Documentation

LLPointer<LLHUDText> LLTracker::mBeaconText [protected]

Definition at line 133 of file lltracker.h.

Referenced by purgeBeaconText(), and render3D().

BOOL LLTracker::mHasLandmarkPosition [protected]

Definition at line 148 of file lltracker.h.

Referenced by cacheLandmarkPosition(), getTrackedPositionGlobal(), hasLandmarkPosition(), render3D(), and stopTrackingLandmark().

BOOL LLTracker::mHasReachedLandmark [protected]

Definition at line 147 of file lltracker.h.

Referenced by cacheLandmarkPosition(), render3D(), and stopTrackingLandmark().

BOOL LLTracker::mHasReachedLocation [protected]

Definition at line 153 of file lltracker.h.

S32 LLTracker::mHUDArrowCenterX [protected]

Definition at line 134 of file lltracker.h.

Referenced by drawMarker(), and handleMouseDown().

S32 LLTracker::mHUDArrowCenterY [protected]

Definition at line 135 of file lltracker.h.

Referenced by drawMarker(), and handleMouseDown().

BOOL LLTracker::mIsTrackingLocation [protected]

Definition at line 152 of file lltracker.h.

Referenced by render3D(), stopTrackingLocation(), and trackLocation().

LLString LLTracker::mLabel [protected]

Definition at line 139 of file lltracker.h.

Referenced by getLabel(), trackAvatar(), trackLandmark(), and trackLocation().

LLDynamicArray<LLUUID> LLTracker::mLandmarkAssetIDList [protected]

Definition at line 145 of file lltracker.h.

BOOL LLTracker::mLandmarkHasBeenVisited [protected]

Definition at line 149 of file lltracker.h.

Referenced by cacheLandmarkPosition(), render3D(), and stopTrackingLandmark().

LLDynamicArray<LLUUID> LLTracker::mLandmarkItemIDList [protected]

Definition at line 146 of file lltracker.h.

LLString LLTracker::mToolTip [protected]

Definition at line 140 of file lltracker.h.

Referenced by getToolTip(), and trackLocation().

LLUUID LLTracker::mTrackedLandmarkAssetID [protected]

Definition at line 143 of file lltracker.h.

Referenced by cacheLandmarkPosition(), getTrackedLandmarkAssetID(), render3D(), stopTrackingLandmark(), and trackLandmark().

LLUUID LLTracker::mTrackedLandmarkItemID [protected]

Definition at line 144 of file lltracker.h.

Referenced by cacheLandmarkPosition(), getTrackedLandmarkItemID(), setLandmarkVisited(), stopTrackingLandmark(), and trackLandmark().

LLString LLTracker::mTrackedLandmarkName [protected]

Definition at line 142 of file lltracker.h.

Referenced by render3D(), stopTrackingLandmark(), and trackLandmark().

LLString LLTracker::mTrackedLocationName [protected]

Definition at line 151 of file lltracker.h.

Referenced by getTrackedLocationName(), render3D(), stopTrackingLocation(), and trackLocation().

LLVector3d LLTracker::mTrackedPositionGlobal [protected]

Definition at line 137 of file lltracker.h.

Referenced by cacheLandmarkPosition(), drawHUDArrow(), getTrackedPositionGlobal(), render3D(), stopTrackingLandmark(), stopTrackingLocation(), and trackLocation().

ETrackingLocationType LLTracker::mTrackingLocationType [protected]

Definition at line 132 of file lltracker.h.

Referenced by getTrackedLocationType(), stopTrackingLocation(), and trackLocation().

ETrackingStatus LLTracker::mTrackingStatus [protected]

Definition at line 131 of file lltracker.h.

Referenced by getTrackingStatus(), isTracking(), stopTrackingAll(), stopTrackingAvatar(), stopTrackingLandmark(), stopTrackingLocation(), trackAvatar(), trackLandmark(), and trackLocation().

BOOL LLTracker::sCheesyBeacon = FALSE [static]

Definition at line 107 of file lltracker.h.

Referenced by draw_shockwave(), pulse_func(), and renderBeacon().

LLTracker * LLTracker::sTrackerp = NULL [static]

Definition at line 106 of file lltracker.h.

Referenced by cleanupInstance(), and instance().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:53 2010 for Second Life Viewer by  doxygen 1.4.7