LLWorldMapView Class Reference

#include <llworldmapview.h>

Inheritance diagram for LLWorldMapView:

Inheritance graph
[legend]
Collaboration diagram for LLWorldMapView:

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< U64handle_list_t

Public Member Functions

 LLWorldMapView (const std::string &name, const LLRect &rect)
virtual ~LLWorldMapView ()
virtual void reshape (S32 width, S32 height, BOOL called_from_parent=TRUE)
virtual void setVisible (BOOL visible)
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleDoubleClick (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual BOOL handleToolTip (S32 x, S32 y, LLString &msg, LLRect *sticky_rect_screen)
bool checkItemHit (S32 x, S32 y, LLItemInfo &item, LLUUID *id, bool track)
void handleClick (S32 x, S32 y, MASK mask, S32 *hit_type, LLUUID *id)
LLVector3 globalPosToView (const LLVector3d &global_pos)
LLVector3d viewPosToGlobal (S32 x, S32 y)
virtual void draw ()
void drawGenericItems (const LLWorldMap::item_info_list_t &items, LLUIImagePtr image)
void drawGenericItem (const LLItemInfo &item, LLUIImagePtr image)
void drawImage (const LLVector3d &global_pos, LLUIImagePtr image, const LLColor4 &color=LLColor4::white)
void drawImageStack (const LLVector3d &global_pos, LLUIImagePtr image, U32 count, F32 offset, const LLColor4 &color)
void drawAgents ()
void drawEvents ()
void drawFrustum ()
void drawTracking (const LLVector3d &pos_global, const LLColor4 &color, BOOL draw_arrow=TRUE, LLString label=LLString(), LLString tooltip="", S32 vert_offset=0)
void updateBlock (S32 block_x, S32 block_y)
void updateVisibleBlocks ()

Static Public Member Functions

static void initClass ()
static void cleanupClass ()
static void setScale (F32 scale)
static void translatePan (S32 delta_x, S32 delta_y)
static void setPan (S32 x, S32 y, BOOL snap=TRUE)
static void cleanupTextures ()
static void drawTrackingArrow (const LLRect &view_rect, S32 x, S32 y, const LLColor4 &color, S32 arrow_size=DEFAULT_TRACKING_ARROW_SIZE)
static void drawTrackingDot (F32 x_pixels, F32 y_pixels, const LLColor4 &color, F32 relative_z=0.f, F32 dot_radius=3.f)
static void drawTrackingCircle (const LLRect &rect, S32 x, S32 y, const LLColor4 &color, S32 min_thickness, S32 overlap)
static void drawAvatar (F32 x_pixels, F32 y_pixels, const LLColor4 &color, F32 relative_z=0.f, F32 dot_radius=3.f)
static void drawIconName (F32 x_pixels, F32 y_pixels, const LLColor4 &color, const std::string &first_line, const std::string &second_line)
static void clearLastClick ()

Public Attributes

LLColor4 mBackgroundColor
BOOL mItemPicked
BOOL mPanning
S32 mMouseDownPanX
S32 mMouseDownPanY
S32 mMouseDownX
S32 mMouseDownY
LLTextBoxmTextBoxEast
LLTextBoxmTextBoxNorth
LLTextBoxmTextBoxWest
LLTextBoxmTextBoxSouth
LLTextBoxmTextBoxSouthEast
LLTextBoxmTextBoxNorthEast
LLTextBoxmTextBoxNorthWest
LLTextBoxmTextBoxSouthWest
LLTextBoxmTextBoxScrollHint
S32 mSelectIDStart
handle_list_t mVisibleRegions

Static Public Attributes

static LLUIImagePtr sAvatarYouSmallImage = NULL
static LLUIImagePtr sAvatarSmallImage = NULL
static LLUIImagePtr sAvatarLargeImage = NULL
static LLUIImagePtr sAvatarAboveImage = NULL
static LLUIImagePtr sAvatarBelowImage = NULL
static LLUIImagePtr sTelehubImage = NULL
static LLUIImagePtr sInfohubImage = NULL
static LLUIImagePtr sHomeImage = NULL
static LLUIImagePtr sEventImage = NULL
static LLUIImagePtr sEventMatureImage = NULL
static LLUIImagePtr sTrackCircleImage = NULL
static LLUIImagePtr sTrackArrowImage = NULL
static LLUIImagePtr sClassifiedsImage = NULL
static LLUIImagePtr sForSaleImage = NULL
static F32 sThresholdA = 48.f
static F32 sThresholdB = 96.f
static F32 sPixelsPerMeter = 1.f
static F32 sPanX = 0.f
static F32 sPanY = 0.f
static F32 sTargetPanX = 0.f
static F32 sTargetPanY = 0.f
static S32 sTrackingArrowX = 0
static S32 sTrackingArrowY = 0
static BOOL sHandledLastClick = FALSE

Protected Member Functions

void setDirectionPos (LLTextBox *text_box, F32 rotation)
void updateDirections ()


Detailed Description

Definition at line 56 of file llworldmapview.h.


Member Typedef Documentation

typedef std::vector<U64> LLWorldMapView::handle_list_t

Definition at line 188 of file llworldmapview.h.


Constructor & Destructor Documentation

LLWorldMapView::LLWorldMapView ( const std::string &  name,
const LLRect rect 
)

LLWorldMapView::~LLWorldMapView (  )  [virtual]

Definition at line 209 of file llworldmapview.cpp.

References cleanupTextures().

Here is the call graph for this function:


Member Function Documentation

void LLWorldMapView::initClass ( void   )  [static]

void LLWorldMapView::cleanupClass ( void   )  [static]

void LLWorldMapView::reshape ( S32  width,
S32  height,
BOOL  called_from_parent = TRUE 
) [virtual]

Reimplemented from LLView.

Definition at line 1461 of file llworldmapview.cpp.

References LLView::reshape().

Here is the call graph for this function:

void LLWorldMapView::setVisible ( BOOL  visible  )  [virtual]

BOOL LLWorldMapView::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 1619 of file llworldmapview.cpp.

References gFocusMgr, llround(), mMouseDownPanX, mMouseDownPanY, mMouseDownX, mMouseDownY, LLFocusMgr::setMouseCapture(), sHandledLastClick, sPanX, sPanY, and TRUE.

Here is the call graph for this function:

BOOL LLWorldMapView::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

BOOL LLWorldMapView::handleDoubleClick ( S32  x,
S32  y,
MASK  mask 
) [virtual]

BOOL LLWorldMapView::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

BOOL LLWorldMapView::handleToolTip ( S32  x,
S32  y,
LLString msg,
LLRect sticky_rect_screen 
) [virtual]

bool LLWorldMapView::checkItemHit ( S32  x,
S32  y,
LLItemInfo item,
LLUUID id,
bool  track 
)

void LLWorldMapView::handleClick ( S32  x,
S32  y,
MASK  mask,
S32 hit_type,
LLUUID id 
)

void LLWorldMapView::setScale ( F32  scale  )  [static]

Definition at line 222 of file llworldmapview.cpp.

References gMapScale, REGION_WIDTH_METERS, sPanX, sPanY, sPixelsPerMeter, sTargetPanX, and sTargetPanY.

Referenced by LLFloaterWorldMap::draw().

Here is the caller graph for this function:

void LLWorldMapView::translatePan ( S32  delta_x,
S32  delta_y 
) [static]

Definition at line 246 of file llworldmapview.cpp.

References sPanX, sPanY, sTargetPanX, and sTargetPanY.

Referenced by LLFloaterWorldMap::onPanBtn().

Here is the caller graph for this function:

void LLWorldMapView::setPan ( S32  x,
S32  y,
BOOL  snap = TRUE 
) [static]

Definition at line 256 of file llworldmapview.cpp.

References sPanX, sPanY, sTargetPanX, and sTargetPanY.

Referenced by LLFloaterWorldMap::centerOnTarget(), LLFloaterWorldMap::onShowAgentBtn(), and LLFloaterWorldMap::show().

Here is the caller graph for this function:

LLVector3 LLWorldMapView::globalPosToView ( const LLVector3d global_pos  ) 

Definition at line 982 of file llworldmapview.cpp.

References gAgent, LLAgent::getCameraPositionGlobal(), LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLVector3::mV, LLVector3::setVec(), sPanX, sPanY, sPixelsPerMeter, VX, and VY.

Referenced by checkItemHit(), draw(), drawImage(), drawImageStack(), and drawTracking().

Here is the call graph for this function:

Here is the caller graph for this function:

LLVector3d LLWorldMapView::viewPosToGlobal ( S32  x,
S32  y 
)

void LLWorldMapView::draw ( void   )  [virtual]

Reimplemented from LLPanel.

Definition at line 279 of file llworldmapview.cpp.

References AGENTS_UPDATE_TIME, LLFontGL::BASELINE, LLGLImmediate::begin(), LLViewerImage::bindTexture(), LLGLImmediate::blendFunc(), LLViewerImage::BOOST_MAP, LLViewerImage::BOOST_MAP_LAYER, LLTextureView::clearDebugImages(), LLGLImmediate::color3f(), LLGLImmediate::color4f(), LLGLImmediate::color4fv(), LLView::draw(), drawAgents(), drawEvents(), drawFrustum(), drawGenericItems(), drawImage(), drawTracking(), LLFontGL::DROP_SHADOW, LLGLImmediate::end(), FALSE, LLGLImmediate::flush(), from_region_handle(), gAgent, LLControlGroup::getBOOL(), LLAgent::getCameraPositionGlobal(), LLTimer::getElapsedSeconds(), LLImageGL::getHasGLTexture(), LLRectBase< Type >::getHeight(), LLAgent::getHomePosGlobal(), LLViewerImageList::getImage(), LLSingleton< LLWorldMap >::getInstance(), LLCriticalDamp::getInterpolant(), LLTracker::getLabel(), LLView::getLocalRect(), LLAgent::getPositionGlobal(), LLView::getRect(), LLTracker::getToolTip(), LLTracker::getTrackedPositionGlobal(), LLTracker::getTrackingStatus(), LLRectBase< Type >::getWidth(), gGL, gImageList, gl_rect_2d(), globalPosToView(), gMapScale, gSavedSettings, gTrackColor, indra::ipc::xml_rpc::handle(), LLAvatarTracker::instance(), LLVector3d::isExactlyZero(), LLViewerImage::isMissingAsset(), LLPointer< Type >::isNull(), LLAgent::isTeen(), LLWorldMapLayer::LayerExtents, LLWorldMapLayer::LayerImage, LLFontGL::LEFT, lerp(), LLVertexBuffer::LINES, llfloor(), llround(), lltrunc(), LLSimInfo::mAccess, LLSimInfo::mAgentsUpdateTime, LLSimInfo::mAlpha, MAP_ITEM_AGENT_LOCATIONS, MAX_STRING, mBackgroundColor, LLRectBase< Type >::mBottom, LLSimInfo::mCurrentImage, LLWorldMap::mCurrentMap, LLVector3d::mdV, LLSimInfo::mHandle, MIPMAP_TRUE, LLRectBase< Type >::mLeft, LLSimInfo::mMapImageID, LLWorldMap::mMapLayers, LLSimInfo::mName, LLSimInfo::mOverlayImage, LLSimInfo::mRegionFlags, LLSimInfo::mShowAgentLocations, LLWorldMap::mSimInfoMap, LLVector3::mV, LLColor4::mV, mVisibleRegions, LLUUID::notNull(), LLColor4::orange, LLView::pointInView(), LLVertexBuffer::QUADS, REGION_FLAGS_NULL_LAYER, REGION_WIDTH_METERS, LLFontGL::renderUTF8(), S32, sAvatarLargeImage, sClassifiedsImage, LLWorldMap::sendItemRequest(), LLViewerImage::setBoostLevel(), LLViewerImage::setKnownDrawSize(), sForSaleImage, LLUI::sGLScaleFactor, sHomeImage, SIM_ACCESS_DOWN, SIM_ACCESS_PG, SIM_MAP_AGENT_SCALE, SIM_MAP_SCALE, SIM_NULL_MAP_SCALE, sInfohubImage, sPanX, sPanY, LLFontGL::sSansSerifSmall, sTargetPanX, sTargetPanY, sTelehubImage, sThresholdA, sThresholdB, LLGLImmediate::texCoord2f(), LLTracker::TRACKING_AVATAR, LLTracker::TRACKING_LANDMARK, LLTracker::TRACKING_LOCATION, TRUE, updateDirections(), updateVisibleBlocks(), LLGLImmediate::vertex2f(), LLGLImmediate::vertex3f(), VX, VY, LLColor4::white, and LLColor4::yellow.

void LLWorldMapView::drawGenericItems ( const LLWorldMap::item_info_list_t items,
LLUIImagePtr  image 
)

Definition at line 816 of file llworldmapview.cpp.

References drawGenericItem().

Referenced by draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawGenericItem ( const LLItemInfo item,
LLUIImagePtr  image 
)

Definition at line 825 of file llworldmapview.cpp.

References drawImage(), and LLItemInfo::mPosGlobal.

Referenced by drawEvents(), and drawGenericItems().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawImage ( const LLVector3d global_pos,
LLUIImagePtr  image,
const LLColor4 color = LLColor4::white 
)

Definition at line 831 of file llworldmapview.cpp.

References globalPosToView(), llround(), LLVector3::mV, VX, and VY.

Referenced by draw(), drawGenericItem(), and drawTracking().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawImageStack ( const LLVector3d global_pos,
LLUIImagePtr  image,
U32  count,
F32  offset,
const LLColor4 color 
)

Definition at line 839 of file llworldmapview.cpp.

References globalPosToView(), i, llround(), LLVector3::mV, VX, and VY.

Referenced by drawAgents().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawAgents (  ) 

void LLWorldMapView::drawEvents (  ) 

Definition at line 899 of file llworldmapview.cpp.

References drawGenericItem(), LLControlGroup::getBOOL(), LLSingleton< LLWorldMap >::getInstance(), gSavedSettings, LLWorldMap::mMatureEvents, LLWorldMap::mPGEvents, sEventImage, and sEventMatureImage.

Referenced by draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawFrustum (  ) 

void LLWorldMapView::cleanupTextures (  )  [static]

Definition at line 216 of file llworldmapview.cpp.

Referenced by LLViewerWindow::~LLViewerWindow(), and ~LLWorldMapView().

Here is the caller graph for this function:

void LLWorldMapView::drawTracking ( const LLVector3d pos_global,
const LLColor4 color,
BOOL  draw_arrow = TRUE,
LLString  label = LLString(),
LLString  tooltip = "",
S32  vert_offset = 0 
)

void LLWorldMapView::drawTrackingArrow ( const LLRect view_rect,
S32  x,
S32  y,
const LLColor4 color,
S32  arrow_size = DEFAULT_TRACKING_ARROW_SIZE 
) [static]

Definition at line 1359 of file llworldmapview.cpp.

References LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gl_draw_scaled_rotated_image(), llabs(), llclamp(), llfloor(), RAD_TO_DEG, S32, sTrackArrowImage, sTrackingArrowX, and sTrackingArrowY.

Referenced by drawTracking(), and LLNetMap::drawTracking().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawTrackingDot ( F32  x_pixels,
F32  y_pixels,
const LLColor4 color,
F32  relative_z = 0.f,
F32  dot_radius = 3.f 
) [static]

Definition at line 1214 of file llworldmapview.cpp.

References drawDot(), and sTrackCircleImage.

Referenced by LLNetMap::drawTracking().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawTrackingCircle ( const LLRect rect,
S32  x,
S32  y,
const LLColor4 color,
S32  min_thickness,
S32  overlap 
) [static]

Definition at line 1261 of file llworldmapview.cpp.

References F_PI, F_PI_BY_TWO, F_TWO_PI, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gGL, gl_washer_segment_2d(), llmax(), llmin(), LLGLImmediate::popMatrix(), LLGLImmediate::pushMatrix(), sqrtf, and LLGLImmediate::translatef().

Referenced by drawTracking(), and LLNetMap::drawTracking().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawAvatar ( F32  x_pixels,
F32  y_pixels,
const LLColor4 color,
F32  relative_z = 0.f,
F32  dot_radius = 3.f 
) [static]

Definition at line 1190 of file llworldmapview.cpp.

References llround(), sAvatarAboveImage, sAvatarBelowImage, and sAvatarSmallImage.

Referenced by LLNetMap::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::drawIconName ( F32  x_pixels,
F32  y_pixels,
const LLColor4 color,
const std::string &  first_line,
const std::string &  second_line 
) [static]

Definition at line 1226 of file llworldmapview.cpp.

References BIG_DOT_RADIUS, LLFontGL::DROP_SHADOW, LLFontGL::HCENTER, llround(), LLFontGL::renderUTF8(), S32, LLFontGL::sSansSerif, and LLFontGL::TOP.

Here is the call graph for this function:

static void LLWorldMapView::clearLastClick (  )  [inline, static]

Definition at line 126 of file llworldmapview.h.

References FALSE, and sHandledLastClick.

Referenced by LLWorldMapView(), and LLFloaterWorldMap::show().

Here is the caller graph for this function:

void LLWorldMapView::updateBlock ( S32  block_x,
S32  block_y 
)

Definition at line 1666 of file llworldmapview.cpp.

References LLSingleton< LLWorldMap >::getInstance(), MAP_BLOCK_RES, LLWorldMap::mCurrentMap, LLWorldMap::mMapBlockLoaded, S32, LLWorldMap::sendMapBlockRequest(), and TRUE.

Referenced by updateVisibleBlocks().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::updateVisibleBlocks (  ) 

Definition at line 1677 of file llworldmapview.cpp.

References gAgent, LLAgent::getCameraPositionGlobal(), gMapScale, llmax(), llmin(), MAP_BLOCK_RES, LLVector3d::mdV, REGION_WIDTH_METERS, S32, SIM_MAP_SCALE, sPanX, sPanY, and updateBlock().

Referenced by draw(), and LLFloaterWorldMap::show().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLWorldMapView::setDirectionPos ( LLTextBox text_box,
F32  rotation 
) [protected]

Definition at line 1407 of file llworldmapview.cpp.

References LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), llmin(), llround(), and LLView::setOrigin().

Here is the call graph for this function:

void LLWorldMapView::updateDirections (  )  [protected]

Definition at line 1425 of file llworldmapview.cpp.

References LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), mTextBoxEast, mTextBoxNorth, mTextBoxNorthEast, mTextBoxNorthWest, mTextBoxSouth, mTextBoxSouthEast, mTextBoxSouthWest, mTextBoxWest, S32, and LLView::setOrigin().

Referenced by draw().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 137 of file llworldmapview.h.

Referenced by draw().

Definition at line 139 of file llworldmapview.h.

Referenced by cleanupClass(), LLNetMap::draw(), and initClass().

Definition at line 140 of file llworldmapview.h.

Referenced by cleanupClass(), drawAgents(), drawAvatar(), and initClass().

Definition at line 141 of file llworldmapview.h.

Referenced by cleanupClass(), draw(), and initClass().

Definition at line 142 of file llworldmapview.h.

Referenced by cleanupClass(), drawAvatar(), and initClass().

Definition at line 143 of file llworldmapview.h.

Referenced by cleanupClass(), drawAvatar(), and initClass().

Definition at line 144 of file llworldmapview.h.

Referenced by cleanupClass(), draw(), and initClass().

Definition at line 145 of file llworldmapview.h.

Referenced by cleanupClass(), draw(), and initClass().

Definition at line 146 of file llworldmapview.h.

Referenced by cleanupClass(), draw(), and initClass().

Definition at line 147 of file llworldmapview.h.

Referenced by cleanupClass(), drawEvents(), and initClass().

Definition at line 148 of file llworldmapview.h.

Referenced by cleanupClass(), drawEvents(), and initClass().

Definition at line 149 of file llworldmapview.h.

Referenced by cleanupClass(), drawTracking(), drawTrackingDot(), and initClass().

Definition at line 151 of file llworldmapview.h.

Referenced by cleanupClass(), draw(), and initClass().

Definition at line 152 of file llworldmapview.h.

Referenced by cleanupClass(), draw(), and initClass().

Definition at line 154 of file llworldmapview.h.

Referenced by draw().

Definition at line 155 of file llworldmapview.h.

Referenced by draw().

Definition at line 158 of file llworldmapview.h.

Referenced by handleClick().

F32 LLWorldMapView::sPanX = 0.f [static]

F32 LLWorldMapView::sPanY = 0.f [static]

Definition at line 162 of file llworldmapview.h.

Referenced by draw(), handleHover(), setPan(), setScale(), and translatePan().

Definition at line 163 of file llworldmapview.h.

Referenced by draw(), handleHover(), setPan(), setScale(), and translatePan().

Definition at line 164 of file llworldmapview.h.

Referenced by drawTracking(), and drawTrackingArrow().

Definition at line 165 of file llworldmapview.h.

Referenced by drawTracking(), and drawTrackingArrow().

Definition at line 168 of file llworldmapview.h.

Referenced by handleHover(), and handleMouseUp().

Definition at line 169 of file llworldmapview.h.

Referenced by handleMouseDown(), and handleMouseUp().

Definition at line 170 of file llworldmapview.h.

Referenced by handleMouseDown(), and handleMouseUp().

Definition at line 171 of file llworldmapview.h.

Referenced by handleHover(), handleMouseDown(), and handleMouseUp().

Definition at line 172 of file llworldmapview.h.

Referenced by handleHover(), handleMouseDown(), and handleMouseUp().

Definition at line 174 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 175 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 176 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 177 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 179 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 180 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 181 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 182 of file llworldmapview.h.

Referenced by LLWorldMapView(), and updateDirections().

Definition at line 183 of file llworldmapview.h.

Definition at line 185 of file llworldmapview.h.

Referenced by clearLastClick(), handleDoubleClick(), and handleMouseDown().

Definition at line 186 of file llworldmapview.h.

Definition at line 189 of file llworldmapview.h.

Referenced by draw(), and drawAgents().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:40:36 2008 for SecondLife by  doxygen 1.5.5