LLNetMap Class Reference

#include <llnetmap.h>

Inheritance diagram for LLNetMap:

Inheritance graph
[legend]
Collaboration diagram for LLNetMap:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLNetMap (const std::string &name, const LLRect &rect, const LLColor4 &bg_color)
virtual ~LLNetMap ()
virtual EWidgetType getWidgetType () const
virtual LLString getWidgetTag () const
virtual void draw ()
virtual BOOL handleDoubleClick (S32 x, S32 y, MASK mask)
virtual BOOL handleRightMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleScrollWheel (S32 x, S32 y, S32 clicks)
virtual BOOL handleToolTip (S32 x, S32 y, LLString &msg, LLRect *sticky_rect_screen)
void setScale (F32 scale)
void translatePan (F32 delta_x, F32 delta_y)
void setPan (F32 x, F32 y)
const LLVector3dgetObjectImageCenterGlobal ()
void renderPoint (const LLVector3 &pos, const LLColor4U &color, S32 diameter, S32 relative_height=0)
void renderScaledPointGlobal (const LLVector3d &pos, const LLColor4U &color, F32 radius)
LLVector3 globalPosToView (const LLVector3d &global_pos)
LLVector3d viewPosToGlobal (S32 x, S32 y)
void drawTracking (const LLVector3d &pos_global, const LLColor4 &color, BOOL draw_arrow=TRUE)

Static Public Member Functions

static void setRotateMap (BOOL b)
static void handleZoomLevel (void *which)

Public Attributes

LLViewHandle mPopupMenuHandle
LLColor4 mBackgroundColor
F32 mScale
F32 mPixelsPerMeter
F32 mObjectMapTPM
F32 mObjectMapPixels
F32 mTargetPanX
F32 mTargetPanY
F32 mCurPanX
F32 mCurPanY
BOOL mUpdateNow
LLVector3d mObjectImageCenterGlobal
LLPointer< LLImageRawmObjectRawImagep
LLPointer< LLImageGLmObjectImagep
LLTextBoxmTextBoxEast
LLTextBoxmTextBoxNorth
LLTextBoxmTextBoxWest
LLTextBoxmTextBoxSouth
LLTextBoxmTextBoxSouthEast
LLTextBoxmTextBoxNorthEast
LLTextBoxmTextBoxNorthWest
LLTextBoxmTextBoxSouthWest
LLRotateNetMapListener mNetMapListener

Static Public Attributes

static BOOL sRotateMap = FALSE
static LLNetMapsInstance = NULL

Protected Member Functions

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

Static Protected Member Functions

static void teleport (const LLVector3d &destination)
static void fly (const LLVector3d &destination)

Detailed Description

Definition at line 54 of file llnetmap.h.


Constructor & Destructor Documentation

LLNetMap::LLNetMap ( const std::string &  name,
const LLRect rect,
const LLColor4 bg_color 
)

Definition at line 83 of file llnetmap.cpp.

References LLView::addChild(), LLObservable::addListener(), LLMenuGL::append(), LLMenuGL::appendSeparator(), LLFontGL::DROP_SHADOW_SOFT, f, FALSE, gAgent, LLControlGroup::getBOOL(), LLAgent::getCameraPositionGlobal(), LLControlGroup::getControl(), gMiniMapScale, gSavedSettings, handleZoomLevel(), LLTracker::isTracking(), mNetMapListener, mObjectImageCenterGlobal, mPixelsPerMeter, mPopupMenuHandle, mTextBoxEast, mTextBoxNorth, mTextBoxNorthEast, mTextBoxNorthWest, mTextBoxSouth, mTextBoxSouthEast, mTextBoxSouthWest, mTextBoxWest, LLView::mViewHandle, NULL, REGION_WIDTH_METERS, S32, LLMenuGL::setCanTearOff(), LLTextBox::setColor(), LLTextBox::setFontStyle(), LLMenuGL::setVisible(), sInstance, sRotateMap, and LLTracker::stopTracking().

LLNetMap::~LLNetMap (  )  [virtual]

Definition at line 168 of file llnetmap.cpp.

References NULL, and sInstance.


Member Function Documentation

void LLNetMap::createObjectImage (  )  [protected]

Definition at line 763 of file llnetmap.cpp.

References FALSE, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gMiniMapScale, LLPointer< Type >::isNull(), MAX_SIZE, mObjectImagep, mObjectRawImagep, LLView::mRect, mUpdateNow, S32, setScale(), and TRUE.

Referenced by draw().

void LLNetMap::draw (  )  [virtual]

Reimplemented from LLView.

Definition at line 230 of file llnetmap.cpp.

References ABOVE_WATERLINE_ALPHA, LLViewerImage::bindTexture(), bottom, count, createObjectImage(), LLView::draw(), LLWorldMapView::drawAvatar(), drawTracking(), f, F_PI, F_PI_BY_TWO, FALSE, gAgent, gAvatarMapColor, gCamera, LLCamera::getAspect(), LLCoordFrame::getAtAxis(), LLAgent::getAutoPilot(), LLAgent::getAutoPilotTargetGlobal(), LLAgent::getCameraPositionAgent(), LLAgent::getCameraPositionGlobal(), LLFrameTimer::getElapsedTimeF32(), LLCamera::getFar(), LLRectBase< Type >::getHeight(), LLCriticalDamp::getInterpolant(), LLView::getLocalRect(), LLAgent::getPosAgentFromGlobal(), LLAgent::getPositionGlobal(), LLAgent::getRegion(), LLTracker::getTrackedPositionGlobal(), LLTracker::getTrackingStatus(), LLCamera::getView(), LLView::getVisible(), LLRectBase< Type >::getWidth(), gFriendMapColor, gFrustumMapColor, gl_draw_image(), gl_rect_2d(), glBegin, glColor4f, glColor4fv, glEnd, globalPosToView(), glPopMatrix, glRotatef, glTranslatef, glVertex2f, gMiniMapScale, gObjectList, gRotatingFrustumMapColor, gTrackColor, gWorldp, gWorldPointer, i, LLAvatarTracker::instance(), is_agent_friend(), LLPointer< Type >::isNull(), left, lerp(), llfloor(), llround(), LLWorld::mActiveRegionList, mBackgroundColor, mCurPanX, mCurPanY, LLVector3d::mdV, mObjectImageCenterGlobal, mObjectImagep, mObjectMapPixels, mObjectMapTPM, mObjectRawImagep, LLView::mRect, mTargetPanX, mTargetPanY, mTextBoxEast, mTextBoxNorth, mTextBoxNorthEast, mTextBoxNorthWest, mTextBoxSouth, mTextBoxSouthEast, mTextBoxSouthWest, mTextBoxWest, mUpdateNow, LLVector3::mV, LLColor4::mV, RAD_TO_DEG, LLViewerObjectList::renderObjectsForMap(), LLFrameTimer::reset(), right, S32, LLWorldMapView::sAvatarYouSmallImage, setDirectionPos(), LLVector3d::setVec(), sRotateMap, top, LLTracker::TRACKING_AVATAR, LLTracker::TRACKING_LANDMARK, LLTracker::TRACKING_LOCATION, VX, VY, VZ, and LLColor4::white.

void LLNetMap::drawTracking ( const LLVector3d pos_global,
const LLColor4 color,
BOOL  draw_arrow = TRUE 
)

Definition at line 551 of file llnetmap.cpp.

References LLWorldMapView::drawTrackingArrow(), LLWorldMapView::drawTrackingCircle(), LLWorldMapView::drawTrackingDot(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), globalPosToView(), llround(), LLView::mRect, LLVector3::mV, S32, VX, VY, VZ, x, and y.

Referenced by draw().

static void LLNetMap::fly ( const LLVector3d destination  )  [static, protected]

const LLVector3d& LLNetMap::getObjectImageCenterGlobal (  )  [inline]

Definition at line 73 of file llnetmap.h.

References mObjectImageCenterGlobal.

LLString LLNetMap::getWidgetTag (  )  const [virtual]

Implements LLView.

Definition at line 178 of file llnetmap.cpp.

References LL_NET_MAP_TAG.

EWidgetType LLNetMap::getWidgetType (  )  const [virtual]

Implements LLView.

Definition at line 173 of file llnetmap.cpp.

References WIDGET_TYPE_NET_MAP.

LLVector3 LLNetMap::globalPosToView ( const LLVector3d global_pos  ) 

Definition at line 528 of file llnetmap.cpp.

References f, gAgent, gCamera, LLCoordFrame::getAtAxis(), LLAgent::getCameraPositionGlobal(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), mCurPanX, mCurPanY, mPixelsPerMeter, LLView::mRect, LLVector3::mV, LLVector3::rotVec(), LLVector3::setVec(), sRotateMap, VX, and VY.

Referenced by draw(), and drawTracking().

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

Reimplemented from LLView.

Definition at line 793 of file llnetmap.cpp.

References FALSE, NULL, LLFloaterWorldMap::show(), and TRUE.

BOOL LLNetMap::handleRightMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 799 of file llnetmap.cpp.

References LLMenuGL::buildDrawLabels(), LLView::getViewByHandle(), mPopupMenuHandle, LLMenuGL::showPopup(), LLMenuGL::sMenuContainer, TRUE, and LLMenuGL::updateParent().

BOOL LLNetMap::handleScrollWheel ( S32  x,
S32  y,
S32  clicks 
) [virtual]

Reimplemented from LLView.

Definition at line 601 of file llnetmap.cpp.

References gMiniMapScale, llclamp(), MAP_SCALE_INCREMENT, MAP_SCALE_MAX, MAP_SCALE_MIN, setScale(), and TRUE.

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

Reimplemented from LLView.

Definition at line 608 of file llnetmap.cpp.

References FALSE, gDisconnected, LLViewerRegion::getHost(), LLHost::getHostName(), LLViewerRegion::getName(), LLHost::getString(), LLView::getVisible(), gWorldPointer, LLView::localPointToScreen(), MAX_STRING, LLRectBase< Type >::mBottom, LLRectBase< Type >::mLeft, LLRectBase< Type >::mRight, LLRectBase< Type >::mTop, LLView::pointInView(), S32, TRUE, and viewPosToGlobal().

void LLNetMap::handleZoomLevel ( void which  )  [static]

Definition at line 813 of file llnetmap.cpp.

References level, MAP_SCALE_MAX, MAP_SCALE_MID, MAP_SCALE_MIN, setScale(), and sInstance.

Referenced by LLNetMap().

void LLNetMap::renderPoint ( const LLVector3 pos,
const LLColor4U color,
S32  diameter,
S32  relative_height = 0 
)

Definition at line 678 of file llnetmap.cpp.

References llround(), LLColor4U::mAll, mObjectImagep, mObjectMapTPM, mObjectRawImagep, LLVector3::mV, S32, VX, VY, x, and y.

Referenced by renderScaledPointGlobal().

void LLNetMap::renderScaledPointGlobal ( const LLVector3d pos,
const LLColor4U color,
F32  radius 
)

Definition at line 668 of file llnetmap.cpp.

References llround(), mObjectImageCenterGlobal, mObjectMapTPM, renderPoint(), S32, and LLVector3::setVec().

Referenced by LLViewerObjectList::renderObjectsForMap().

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

Definition at line 648 of file llnetmap.cpp.

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

Referenced by draw().

void LLNetMap::setPan ( F32  x,
F32  y 
) [inline]

Definition at line 71 of file llnetmap.h.

References mTargetPanX, and mTargetPanY.

static void LLNetMap::setRotateMap ( BOOL  b  )  [inline, static]

Definition at line 81 of file llnetmap.h.

References sRotateMap.

Referenced by LLRotateNetMapListener::handleEvent().

void LLNetMap::setScale ( F32  scale  ) 

Definition at line 184 of file llnetmap.cpp.

References f, LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gMiniMapScale, gWorldPointer, mObjectImagep, mObjectMapPixels, mObjectMapTPM, mPixelsPerMeter, LLView::mRect, mUpdateNow, LLPointer< Type >::notNull(), REGION_WIDTH_METERS, and TRUE.

Referenced by createObjectImage(), handleScrollWheel(), and handleZoomLevel().

static void LLNetMap::teleport ( const LLVector3d destination  )  [static, protected]

void LLNetMap::translatePan ( F32  delta_x,
F32  delta_y 
)

Definition at line 221 of file llnetmap.cpp.

References mTargetPanX, and mTargetPanY.

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

Definition at line 577 of file llnetmap.cpp.

References f, gAgent, gCamera, LLCoordFrame::getAtAxis(), LLAgent::getCameraPositionGlobal(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gMiniMapScale, gWorldPointer, llround(), mCurPanX, mCurPanY, LLView::mRect, LLVector3::mV, LLVector3d::setVec(), sRotateMap, VX, and VY.

Referenced by handleToolTip().


Member Data Documentation

LLColor4 LLNetMap::mBackgroundColor

Definition at line 96 of file llnetmap.h.

Referenced by draw().

F32 LLNetMap::mCurPanX

Definition at line 104 of file llnetmap.h.

Referenced by draw(), globalPosToView(), and viewPosToGlobal().

F32 LLNetMap::mCurPanY

Definition at line 105 of file llnetmap.h.

Referenced by draw(), globalPosToView(), and viewPosToGlobal().

LLRotateNetMapListener LLNetMap::mNetMapListener

Definition at line 120 of file llnetmap.h.

Referenced by LLNetMap().

LLVector3d LLNetMap::mObjectImageCenterGlobal

Definition at line 107 of file llnetmap.h.

Referenced by draw(), getObjectImageCenterGlobal(), LLNetMap(), and renderScaledPointGlobal().

LLPointer<LLImageGL> LLNetMap::mObjectImagep

Definition at line 109 of file llnetmap.h.

Referenced by createObjectImage(), draw(), renderPoint(), and setScale().

F32 LLNetMap::mObjectMapPixels

Definition at line 101 of file llnetmap.h.

Referenced by draw(), and setScale().

F32 LLNetMap::mObjectMapTPM

Definition at line 100 of file llnetmap.h.

Referenced by draw(), renderPoint(), renderScaledPointGlobal(), and setScale().

LLPointer<LLImageRaw> LLNetMap::mObjectRawImagep

Definition at line 108 of file llnetmap.h.

Referenced by createObjectImage(), draw(), and renderPoint().

F32 LLNetMap::mPixelsPerMeter

Definition at line 99 of file llnetmap.h.

Referenced by globalPosToView(), LLNetMap(), and setScale().

LLViewHandle LLNetMap::mPopupMenuHandle

Definition at line 95 of file llnetmap.h.

Referenced by handleRightMouseDown(), and LLNetMap().

F32 LLNetMap::mScale

Definition at line 98 of file llnetmap.h.

F32 LLNetMap::mTargetPanX

Definition at line 102 of file llnetmap.h.

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

F32 LLNetMap::mTargetPanY

Definition at line 103 of file llnetmap.h.

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

LLTextBox* LLNetMap::mTextBoxEast

Definition at line 110 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxNorth

Definition at line 111 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxNorthEast

Definition at line 116 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxNorthWest

Definition at line 117 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxSouth

Definition at line 113 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxSouthEast

Definition at line 115 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxSouthWest

Definition at line 118 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

LLTextBox* LLNetMap::mTextBoxWest

Definition at line 112 of file llnetmap.h.

Referenced by draw(), and LLNetMap().

BOOL LLNetMap::mUpdateNow

Definition at line 106 of file llnetmap.h.

Referenced by createObjectImage(), draw(), and setScale().

LLNetMap * LLNetMap::sInstance = NULL [static]

Definition at line 123 of file llnetmap.h.

Referenced by handleZoomLevel(), LLNetMap(), and ~LLNetMap().

BOOL LLNetMap::sRotateMap = FALSE [static]

Definition at line 122 of file llnetmap.h.

Referenced by draw(), globalPosToView(), LLNetMap(), setRotateMap(), and viewPosToGlobal().


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