LLVector3d Class Reference

#include <v3dmath.h>

Collaboration diagram for LLVector3d:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLVector3d ()
 LLVector3d (const F64 x, const F64 y, const F64 z)
 LLVector3d (const F64 *vec)
 LLVector3d (const LLVector3 &vec)
 LLVector3d (const LLSD &sd)
void setValue (const LLSD &sd)
const LLVector3doperator= (const LLSD &sd)
LLSD getValue () const
BOOL isFinite () const
BOOL clamp (const F64 min, const F64 max)
BOOL abs ()
const LLVector3dclearVec ()
const LLVector3dzeroVec ()
const LLVector3dsetVec (const F64 x, const F64 y, const F64 z)
const LLVector3dsetVec (const LLVector3d &vec)
const LLVector3dsetVec (const F64 *vec)
const LLVector3dsetVec (const LLVector3 &vec)
F64 magVec () const
F64 magVecSquared () const
F64 normVec ()
const LLVector3drotVec (const F64 angle, const LLVector3d &vec)
const LLVector3drotVec (const F64 angle, const F64 x, const F64 y, const F64 z)
const LLVector3drotVec (const LLMatrix3 &mat)
const LLVector3drotVec (const LLQuaternion &q)
BOOL isNull () const
BOOL isExactlyZero () const
const LLVector3doperator= (const LLVector4 &a)
F64 operator[] (int idx) const
F64operator[] (int idx)

Static Public Member Functions

static BOOL parseVector3d (const char *buf, LLVector3d *value)

Public Attributes

F64 mdV [3]

Static Public Attributes

static const LLVector3d zero
static const LLVector3d x_axis
static const LLVector3d y_axis
static const LLVector3d z_axis
static const LLVector3d x_axis_neg
static const LLVector3d y_axis_neg
static const LLVector3d z_axis_neg

Friends

LLVector3d operator+ (const LLVector3d &a, const LLVector3d &b)
LLVector3d operator- (const LLVector3d &a, const LLVector3d &b)
F64 operator * (const LLVector3d &a, const LLVector3d &b)
LLVector3d operator% (const LLVector3d &a, const LLVector3d &b)
LLVector3d operator * (const LLVector3d &a, const F64 k)
LLVector3d operator/ (const LLVector3d &a, const F64 k)
LLVector3d operator * (const F64 k, const LLVector3d &a)
bool operator== (const LLVector3d &a, const LLVector3d &b)
bool operator!= (const LLVector3d &a, const LLVector3d &b)
const LLVector3doperator+= (LLVector3d &a, const LLVector3d &b)
const LLVector3doperator-= (LLVector3d &a, const LLVector3d &b)
const LLVector3doperator%= (LLVector3d &a, const LLVector3d &b)
const LLVector3doperator *= (LLVector3d &a, const F64 k)
const LLVector3doperator/= (LLVector3d &a, const F64 k)
LLVector3d operator- (const LLVector3d &a)
std::ostream & operator<< (std::ostream &s, const LLVector3d &a)

Detailed Description

Definition at line 38 of file v3dmath.h.


Constructor & Destructor Documentation

LLVector3d::LLVector3d (  )  [inline]

Definition at line 145 of file v3dmath.h.

References mdV.

LLVector3d::LLVector3d ( const F64  x,
const F64  y,
const F64  z 
) [inline]

Definition at line 152 of file v3dmath.h.

References mdV, VX, VY, and VZ.

LLVector3d::LLVector3d ( const F64 vec  )  [inline, explicit]

Definition at line 159 of file v3dmath.h.

References mdV, VX, VY, and VZ.

LLVector3d::LLVector3d ( const LLVector3 vec  )  [inline, explicit]

Definition at line 166 of file v3dmath.h.

References mdV, LLVector3::mV, VX, VY, and VZ.

LLVector3d::LLVector3d ( const LLSD sd  )  [inline]

Definition at line 55 of file v3dmath.h.

References tut::sd(), and setValue().


Member Function Documentation

BOOL LLVector3d::abs (  ) 

Definition at line 78 of file v3dmath.cpp.

References FALSE, mdV, and TRUE.

Referenced by LLWorld::clipToVisibleRegions().

BOOL LLVector3d::clamp ( const F64  min,
const F64  max 
)

Definition at line 61 of file v3dmath.cpp.

References FALSE, mdV, and TRUE.

Referenced by LLWorld::clipToVisibleRegions().

const LLVector3d & LLVector3d::clearVec (  )  [inline]

Definition at line 193 of file v3dmath.h.

References mdV.

Referenced by LLAgent::calcCameraPositionTargetGlobal(), LLFloaterWorldMap::centerOnTarget(), LLHUDEffectLookAt::clearLookAtTarget(), LLHUDEffectPointAt::clearPointAtTarget(), LLSelectMgr::deselectAll(), LLHoverView::LLHoverView(), LLSelectMgr::LLSelectMgr(), LLViewerParcelMgr::processParcelProperties(), LLPanelPick::reset(), LLPanelClassified::reset(), LLPanelPlace::resetLocation(), and LLSelectMgr::updateSelectionCenter().

LLSD LLVector3d::getValue (  )  const [inline]

Definition at line 73 of file v3dmath.h.

References mdV.

Referenced by LLControlGroup::declareVec3d(), LLControlGroup::loadFromFile(), LLControlGroup::loadFromFileLegacy(), LLFloaterSettingsDebug::onCommitSettings(), LLFloaterPostcard::sendPostcard(), and LLControlGroup::setVector3d().

BOOL LLVector3d::isExactlyZero (  )  const [inline]

Definition at line 103 of file v3dmath.h.

References mdV, VX, VY, and VZ.

Referenced by LLFloaterWorldMap::centerOnTarget(), LLSelectMgr::deselectAllIfTooFar(), LLPanelPlace::displayParcelInfo(), LLWorldMapView::draw(), LLFloaterWorldMap::fly(), LLToolPie::handleDoubleClick(), LLWorldMapView::handleHover(), LLHoverView::isHoveringLand(), LLHUDEffectSpiral::packData(), LLToolPie::pickAndShowMenu(), LLToolCamera::pickCallback(), raycast_for_new_obj_pos(), rotVec(), LLAgent::setFocusGlobal(), LLFloaterWorldMap::teleport(), LLHUDEffectSpiral::triggerLocal(), LLAudioEngine::triggerSound(), LLViewerPartSourceBeam::update(), LLAgent::updateCamera(), and LLFloaterWorldMap::updateLocation().

BOOL LLVector3d::isFinite (  )  const [inline]

Definition at line 185 of file v3dmath.h.

References llfinite, mdV, VX, VY, and VZ.

BOOL LLVector3d::isNull (  )  const [inline]

Definition at line 396 of file v3dmath.h.

References F_APPROXIMATELY_ZERO, FALSE, mdV, TRUE, VX, VY, and VZ.

F64 LLVector3d::magVec (  )  const [inline]

Definition at line 257 of file v3dmath.h.

References fsqrtf, and mdV.

Referenced by LLAgent::calcCameraPositionTargetGlobal(), LLViewerWindow::clickPointInWorldGlobal(), LLVoiceClient::enforceTether(), LLAgent::getCameraZoomFraction(), LLAgent::getCurrentCameraBuildOffset(), LLFloaterWorldMap::getDistanceToDestination(), LLAgent::handleScrollWheel(), LLViewerWindow::mousePointOnPlaneGlobal(), LLFloaterAvatarList::refreshAvatarList(), LLTracker::renderBeacon(), LLPanelObject::sendPosition(), LLAgent::startAutoPilotGlobal(), LLAgent::updateCamera(), and LLSpatialGroup::updateDistance().

F64 LLVector3d::magVecSquared (  )  const [inline]

Definition at line 262 of file v3dmath.h.

References mdV.

Referenced by LLHUDEffectLookAt::calcTargetPosition(), LLSelectMgr::deselectAllIfTooFar(), LLManipTranslate::handleHover(), LLSpatialPartition::put(), and LLSelectMgr::updateSelectionCenter().

F64 LLVector3d::normVec (  )  [inline]

Definition at line 233 of file v3dmath.h.

References FP_MAG_THRESHOLD, fsqrtf, and mdV.

Referenced by angle_between(), are_parallel(), LLAgent::cameraOrbitIn(), LLAgent::cameraZoomIn(), LLToolCamera::handleHover(), LLManipTranslate::handleHover(), LLToolGrab::handleHoverActive(), LLViewerWindow::mousePointOnPlaneGlobal(), projected_vec(), and LLAgent::setCameraZoomFraction().

const LLVector3d & LLVector3d::operator= ( const LLVector4 a  ) 

Definition at line 95 of file v3dmath.cpp.

References a, and mdV.

const LLVector3d& LLVector3d::operator= ( const LLSD sd  )  [inline]

Definition at line 67 of file v3dmath.h.

References tut::sd(), and setValue().

F64& LLVector3d::operator[] ( int  idx  )  [inline]

Definition at line 108 of file v3dmath.h.

References mdV.

F64 LLVector3d::operator[] ( int  idx  )  const [inline]

Definition at line 107 of file v3dmath.h.

References mdV.

BOOL LLVector3d::parseVector3d ( const char *  buf,
LLVector3d value 
) [static]

Definition at line 135 of file v3dmath.cpp.

References count, FALSE, NULL, S32, setVec(), TRUE, and v.

Referenced by LLXmlTreeNode::getFastAttributeVector3d().

const LLVector3d & LLVector3d::rotVec ( const LLQuaternion q  ) 

Definition at line 109 of file v3dmath.cpp.

const LLVector3d & LLVector3d::rotVec ( const LLMatrix3 mat  ) 

Definition at line 103 of file v3dmath.cpp.

const LLVector3d & LLVector3d::rotVec ( const F64  angle,
const F64  x,
const F64  y,
const F64  z 
)

Definition at line 124 of file v3dmath.cpp.

References isExactlyZero().

const LLVector3d & LLVector3d::rotVec ( const F64  angle,
const LLVector3d vec 
)

Definition at line 115 of file v3dmath.cpp.

References isExactlyZero().

Referenced by LLAgent::cameraOrbitAround(), and LLAgent::cameraOrbitOver().

void LLVector3d::setValue ( const LLSD sd  )  [inline]

Definition at line 60 of file v3dmath.h.

References mdV, and tut::sd().

Referenced by LLVector3d(), and operator=().

const LLVector3d & LLVector3d::setVec ( const LLVector3 vec  )  [inline]

Definition at line 136 of file v3dmath.h.

References mdV, and LLVector3::mV.

const LLVector3d & LLVector3d::setVec ( const F64 vec  )  [inline]

Definition at line 225 of file v3dmath.h.

References mdV.

const LLVector3d & LLVector3d::setVec ( const LLVector3d vec  )  [inline]

Definition at line 217 of file v3dmath.h.

References mdV.

const LLVector3d & LLVector3d::setVec ( const F64  x,
const F64  y,
const F64  z 
) [inline]

Definition at line 209 of file v3dmath.h.

References mdV, VX, VY, and VZ.

Referenced by LLAgent::calcCameraPositionTargetGlobal(), LLAgent::calcFocusPositionTargetGlobal(), LLHUDEffectLookAt::calcTargetPosition(), LLAgent::cameraOrbitOver(), LLAgent::cameraPanIn(), LLAgent::cameraPanLeft(), LLAgent::cameraPanUp(), LLViewerWindow::clickPointInWorldGlobal(), LLWorld::clipToVisibleRegions(), LLSurface::create(), LLManipScale::dragCorner(), LLManipScale::dragFace(), LLNetMap::draw(), LLAgent::getHomePosGlobal(), LLHUDEffectPointAt::getPointAtPosGlobal(), LLAgent::getPosGlobalFromAgent(), LLViewerRegion::getPosGlobalFromRegion(), LLRegionPosition::getPositionGlobal(), LLManipTranslate::handleHover(), LLToolGrab::handleHoverActive(), LLFloaterCustomize::initWearablePanels(), LLViewerWindow::mousePointOnLandGlobal(), LLViewerWindow::mousePointOnPlaneGlobal(), parseVector3d(), raycast_for_new_obj_pos(), LLHUDEffectLookAt::setLookAt(), LLHUDEffectPointAt::setPointAt(), LLAgent::setPositionAgent(), LLViewerObject::setPositionGlobal(), LLDrawable::setPositionGroup(), LLCloudGroup::updatePuffs(), LLDrawable::updateSpatialExtents(), LLWorldMapView::viewPosToGlobal(), and LLNetMap::viewPosToGlobal().

const LLVector3d & LLVector3d::zeroVec (  )  [inline]

Definition at line 201 of file v3dmath.h.

References mdV.

Referenced by LLViewerWindow::hitObjectOrLandGlobalAsync(), LLTracker::stopTrackingLandmark(), and LLTracker::stopTrackingLocation().


Friends And Related Function Documentation

LLVector3d operator * ( const F64  k,
const LLVector3d a 
) [friend]

Definition at line 300 of file v3dmath.h.

LLVector3d operator * ( const LLVector3d a,
const F64  k 
) [friend]

Definition at line 295 of file v3dmath.h.

F64 operator * ( const LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 279 of file v3dmath.h.

const LLVector3d& operator *= ( LLVector3d a,
const F64  k 
) [friend]

Definition at line 342 of file v3dmath.h.

bool operator!= ( const LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 312 of file v3dmath.h.

LLVector3d operator% ( const LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 284 of file v3dmath.h.

const LLVector3d& operator%= ( LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 335 of file v3dmath.h.

LLVector3d operator+ ( const LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 267 of file v3dmath.h.

const LLVector3d& operator+= ( LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 319 of file v3dmath.h.

LLVector3d operator- ( const LLVector3d a  )  [friend]

Definition at line 359 of file v3dmath.h.

LLVector3d operator- ( const LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 273 of file v3dmath.h.

const LLVector3d& operator-= ( LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 327 of file v3dmath.h.

LLVector3d operator/ ( const LLVector3d a,
const F64  k 
) [friend]

Definition at line 289 of file v3dmath.h.

const LLVector3d& operator/= ( LLVector3d a,
const F64  k 
) [friend]

Definition at line 350 of file v3dmath.h.

std::ostream& operator<< ( std::ostream &  s,
const LLVector3d a 
) [friend]

Definition at line 89 of file v3dmath.cpp.

bool operator== ( const LLVector3d a,
const LLVector3d b 
) [friend]

Definition at line 305 of file v3dmath.h.


Member Data Documentation

F64 LLVector3d::mdV[3]

Definition at line 41 of file v3dmath.h.

Referenced by abs(), LLTemplateMessageBuilder::addVector3d(), LLAgent::autoPilot(), LLToolBrushLand::brush(), LLFloaterLandHoldings::buttonCore(), LLAgent::calcCameraPositionTargetGlobal(), LLViewerRegion::calculateCenterGlobal(), LLAgent::cameraZoomIn(), LLFloaterWorldMap::centerOnTarget(), clamp(), clearVec(), LLWorld::clipToVisibleRegions(), LLLandmark::constructFromString(), LLOctreeNode< T >::contains(), LLSurface::createPatchData(), LLToolBrushLand::determineAffectedRegions(), LLWorldMapView::draw(), LLNetMap::draw(), LLHoverView::draw(), LLTracker::drawHUDArrow(), LLSurfacePatch::eval(), LLVLComposition::generateHeights(), LLXMLNode::getAttributeVector3d(), LLAvatarTracker::getDegreesAndDist(), LLFloaterWorldMap::getDistanceToDestination(), LLSimInfo::getGlobalPos(), LLLandmark::getGlobalPos(), LLAvatarTracker::getGlobalPos(), LLViewerParcelMgr::getHoverParcelHeight(), LLViewerParcelMgr::getHoverParcelWidth(), LLOctreeState< T >::getNodeAt(), LLOctreeNode< T >::getOctant(), LLViewerParcelMgr::getSelectedArea(), LLViewerParcelMgr::getSelectionHeight(), LLViewerParcelMgr::getSelectionWidth(), getValue(), handle_go_to(), LLWorldMapView::handleClick(), LLManipTranslate::handleHover(), LLToolGrab::handleHoverActive(), LLToolBrushLand::handleMouseDown(), LLViewerWindow::handlePaint(), LLOctreeRoot< T >::insert(), LLOctreeState< T >::insert(), isExactlyZero(), isFinite(), LLOctreeNode< T >::isInside(), isNull(), ll_sd_from_vector3d(), ll_vector3d_from_sd(), LLFloaterAbout::LLFloaterAbout(), LLOctreeNode< T >::LLOctreeNode(), LLVector3::LLVector3(), LLVector3d(), LLEventNotification::load(), LLAgentPilot::load(), magVec(), magVecSquared(), LLToolBrushLand::modifyLandInSelectionGlobal(), normVec(), LLFloaterWorldMap::onCommitLocation(), LLFloaterWorldMap::onCommitSearchResult(), LLFloaterSettingsDebug::onCommitSettings(), LLPanelGroupLandMoney::impl::onMapButton(), operator=(), operator[](), LLHUDEffectSpiral::packData(), LLHUDEffectPointAt::packData(), LLHUDEffectLookAt::packData(), LLHUDEffectBeam::packData(), process_agent_movement_complete(), process_sound_trigger(), LLAvatarTracker::processAgentFound(), LLPanelClassified::processClassifiedInfoReply(), LLWorldMap::processMapBlockReply(), LLWorldMap::processMapItemReply(), LLPanelPick::processPickInfoReply(), LLFloaterGodTools::processRegionInfo(), LLOctreeNode< T >::pushCenter(), LLToolBrushLand::render(), LLAgent::renderAutoPilotTarget(), LLDrawPoolTerrain::renderFull2TU(), LLDrawPoolTerrain::renderFull4TU(), LLDrawPoolTerrain::renderFull4TUShader(), LLViewerObjectList::renderObjectsForMap(), LLSurface::resolveNormalGlobal(), LLWorld::resolveStepHeightGlobal(), LLMapLayerResponder::result(), LLToolSelectLand::roundXY(), sanitize_corners(), LLViewerParcelMgr::selectLand(), LLViewerParcelMgr::selectParcelAt(), LLViewerParcelMgr::sendParcelGodForceOwner(), LLSurface::setOriginGlobal(), LLViewerParcelMgr::setupParcelBuy(), setValue(), LLVector3::setVec(), setVec(), LLAgent::startAutoPilotGlobal(), LLFloaterWorldMap::teleport(), LLAgent::teleportViaLocation(), to_region_handle(), LLFloaterWorldMap::trackLocation(), LLHUDEffectSpiral::unpackData(), LLHUDEffectPointAt::unpackData(), LLHUDEffectLookAt::unpackData(), LLHUDEffectBeam::unpackData(), LLDebugText::update(), LLSpatialBridge::updateBinRadius(), LLVOAvatar::updateCharacter(), LLViewerRegion::updateCoarseLocations(), LLSpatialGroup::updateInGroup(), LLFloaterWorldMap::updateLocation(), LLOctreeNode< T >::updateMinMax(), LLSurfacePatch::updateTexture(), LLWorldMapView::updateVisibleBlocks(), LLManipRotate::updateVisiblity(), LLWorldMapView::viewPosToGlobal(), and zeroVec().

const LLVector3d LLVector3d::x_axis [static]

Definition at line 44 of file v3dmath.h.

const LLVector3d LLVector3d::x_axis_neg [static]

Definition at line 47 of file v3dmath.h.

const LLVector3d LLVector3d::y_axis [static]

Definition at line 45 of file v3dmath.h.

const LLVector3d LLVector3d::y_axis_neg [static]

Definition at line 48 of file v3dmath.h.

const LLVector3d LLVector3d::z_axis [static]

Definition at line 46 of file v3dmath.h.

Referenced by LLToolGrab::handleHoverActive().

const LLVector3d LLVector3d::z_axis_neg [static]

Definition at line 49 of file v3dmath.h.

const LLVector3d LLVector3d::zero [static]

Definition at line 43 of file v3dmath.h.

Referenced by LLViewerWindow::analyzeHit(), LLAgent::calcCameraPositionTargetGlobal(), LLAgent::changeCameraToCustomizeAvatar(), LLAgent::getCameraPositionGlobal(), LLControlGroup::getVector3d(), LLHoverView::pickCallback(), LLAgent::setFocusOnAvatar(), LLAgent::unlockView(), and LLHoverView::updateText().


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