LLVector2 Class Reference

#include <v2math.h>

Collaboration diagram for LLVector2:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLVector2 ()
 LLVector2 (F32 x, F32 y)
 LLVector2 (const F32 *vec)
void clearVec ()
void zeroVec ()
void setVec (F32 x, F32 y)
void setVec (const LLVector2 &vec)
void setVec (const F32 *vec)
F32 magVec () const
F32 magVecSquared () const
F32 normVec ()
BOOL abs ()
const LLVector2scaleVec (const LLVector2 &vec)
BOOL isNull ()
BOOL isExactlyZero () const
F32 operator[] (int idx) const
F32operator[] (int idx)

Public Attributes

F32 mV [LENGTHOFVECTOR2]

Static Public Attributes

static LLVector2 zero

Friends

bool operator< (const LLVector2 &a, const LLVector2 &b)
LLVector2 operator+ (const LLVector2 &a, const LLVector2 &b)
LLVector2 operator- (const LLVector2 &a, const LLVector2 &b)
F32 operator * (const LLVector2 &a, const LLVector2 &b)
LLVector2 operator% (const LLVector2 &a, const LLVector2 &b)
LLVector2 operator/ (const LLVector2 &a, F32 k)
LLVector2 operator * (const LLVector2 &a, F32 k)
LLVector2 operator * (F32 k, const LLVector2 &a)
bool operator== (const LLVector2 &a, const LLVector2 &b)
bool operator!= (const LLVector2 &a, const LLVector2 &b)
const LLVector2operator+= (LLVector2 &a, const LLVector2 &b)
const LLVector2operator-= (LLVector2 &a, const LLVector2 &b)
const LLVector2operator%= (LLVector2 &a, const LLVector2 &b)
const LLVector2operator *= (LLVector2 &a, F32 k)
const LLVector2operator/= (LLVector2 &a, F32 k)
LLVector2 operator- (const LLVector2 &a)
std::ostream & operator<< (std::ostream &s, const LLVector2 &a)

Detailed Description

Definition at line 45 of file v2math.h.


Constructor & Destructor Documentation

LLVector2::LLVector2 (  )  [inline]

Definition at line 114 of file v2math.h.

References mV, VX, and VY.

LLVector2::LLVector2 ( F32  x,
F32  y 
) [inline]

Definition at line 120 of file v2math.h.

References mV, VX, and VY.

LLVector2::LLVector2 ( const F32 vec  )  [inline]

Definition at line 126 of file v2math.h.

References mV, VX, and VY.


Member Function Documentation

BOOL LLVector2::abs (  ) 

Definition at line 50 of file v2math.cpp.

References f, FALSE, mV, and TRUE.

void LLVector2::clearVec (  )  [inline]

Definition at line 135 of file v2math.h.

References mV, VX, and VY.

BOOL LLVector2::isExactlyZero (  )  const [inline]

Definition at line 75 of file v2math.h.

References mV, VX, and VY.

BOOL LLVector2::isNull (  )  [inline]

Definition at line 205 of file v2math.h.

References F_APPROXIMATELY_ZERO, FALSE, mV, TRUE, VX, and VY.

F32 LLVector2::magVec (  )  const [inline]

Definition at line 167 of file v2math.h.

References fsqrtf, and mV.

Referenced by calc_desired_size(), LLParticleEvent::getScore(), and LLViewerWindow::handlePerFrameHover().

F32 LLVector2::magVecSquared (  )  const [inline]

Definition at line 172 of file v2math.h.

References mV.

Referenced by LLManipTranslate::highlightManipulators(), LLManipScale::highlightManipulators(), and move_vec().

F32 LLVector2::normVec (  )  [inline]

Definition at line 177 of file v2math.h.

References FP_MAG_THRESHOLD, fsqrtf, and mV.

Referenced by angle_between(), are_parallel(), LLVOPartGroup::getGeometry(), LLMenuGL::handleHover(), LLManipTranslate::highlightManipulators(), LLManipTranslate::renderSnapGuides(), LLManipScale::renderSnapGuides(), LLHUDText::updateAll(), and LLHUDText::updateScreenPos().

F32& LLVector2::operator[] ( int  idx  )  [inline]

Definition at line 78 of file v2math.h.

References mV.

F32 LLVector2::operator[] ( int  idx  )  const [inline]

Definition at line 77 of file v2math.h.

References mV.

const LLVector2 & LLVector2::scaleVec ( const LLVector2 vec  )  [inline]

Definition at line 197 of file v2math.h.

References mV, VX, and VY.

void LLVector2::setVec ( const F32 vec  )  [inline]

Definition at line 159 of file v2math.h.

References mV, VX, and VY.

void LLVector2::setVec ( const LLVector2 vec  )  [inline]

Definition at line 153 of file v2math.h.

References mV, VX, and VY.

void LLVector2::setVec ( F32  x,
F32  y 
) [inline]

Definition at line 147 of file v2math.h.

References mV, VX, and VY.

Referenced by LLViewerWindow::calcDisplayScale(), LLProfile::genNormals(), LLVOClouds::getGeometry(), LLFace::getGeometryVolume(), LLViewerWindow::handlePerFrameHover(), LLManipTranslate::highlightManipulators(), LLManipScale::highlightManipulators(), LLPathParams::LLPathParams(), LLViewerWindow::LLViewerWindow(), LLPath::PathPt::PathPt(), LLPipeline::renderBloom(), LLSnapshotLivePreview::savePostcard(), LLVolumeImplFlexible::setAttributesOfAllSections(), LLPathParams::setScale(), LLPathParams::setShear(), LLPathParams::setTaper(), LLHUDText::updateAll(), LLVOWater::updateGeometry(), LLViewerPartGroup::updateParticles(), and LLHUDText::updateScreenPos().

void LLVector2::zeroVec (  )  [inline]

Definition at line 141 of file v2math.h.

References mV, VX, and VY.


Friends And Related Function Documentation

LLVector2 operator * ( F32  k,
const LLVector2 a 
) [friend]

Definition at line 264 of file v2math.h.

LLVector2 operator * ( const LLVector2 a,
F32  k 
) [friend]

Definition at line 259 of file v2math.h.

F32 operator * ( const LLVector2 a,
const LLVector2 b 
) [friend]

Definition at line 243 of file v2math.h.

const LLVector2& operator *= ( LLVector2 a,
F32  k 
) [friend]

Definition at line 302 of file v2math.h.

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

Definition at line 275 of file v2math.h.

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

Definition at line 248 of file v2math.h.

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

Definition at line 295 of file v2math.h.

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

Definition at line 231 of file v2math.h.

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

Definition at line 281 of file v2math.h.

LLVector2 operator- ( const LLVector2 a  )  [friend]

Definition at line 317 of file v2math.h.

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

Definition at line 237 of file v2math.h.

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

Definition at line 288 of file v2math.h.

LLVector2 operator/ ( const LLVector2 a,
F32  k 
) [friend]

Definition at line 253 of file v2math.h.

const LLVector2& operator/= ( LLVector2 a,
F32  k 
) [friend]

Definition at line 309 of file v2math.h.

bool operator< ( const LLVector2 a,
const LLVector2 b 
) [friend]

Definition at line 218 of file v2math.h.

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

Definition at line 337 of file v2math.h.

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

Definition at line 269 of file v2math.h.


Member Data Documentation

F32 LLVector2::mV[LENGTHOFVECTOR2]

Definition at line 48 of file v2math.h.

Referenced by abs(), LLViewerPartGroup::addPart(), LLViewerWindow::analyzeHit(), LLPipeline::bindScreenToTexture(), calc_binormal_from_triangle(), LLViewerWindow::calcDisplayScale(), LLModalDialog::centerOnScreen(), clearVec(), LLVolumeFace::createUnCutCubeCap(), LLViewerWindow::draw(), LLLineEditor::draw(), LLFloaterPostcard::draw(), LLButton::draw(), LLTextEditor::drawCursor(), LLViewerWindow::drawPickBuffer(), LLSurfacePatch::eval(), LLVolume::generate(), LLPath::generate(), LLPolyVertexMask::generateMask(), LLPath::genNGon(), LLPathParams::getBeginScale(), LLPathParams::getEndScale(), LLVOPartGroup::getGeometry(), LLViewerCamera::getPixelVectors(), LLPathParams::getScaleX(), LLPathParams::getScaleY(), LLPathParams::getShearX(), LLPathParams::getShearY(), LLPathParams::getTaperX(), LLPathParams::getTaperY(), LLUI::getWindowSize(), gl_segmented_rect_2d_fragment_tex(), gl_segmented_rect_2d_tex(), gl_segmented_rect_3d_tex(), LLViewerWindow::handleDoubleClick(), LLViewerWindow::handleMouseDown(), LLViewerWindow::handleMouseMove(), LLViewerWindow::handleMouseUp(), LLViewerWindow::handlePerFrameHover(), LLViewerWindow::handleRightMouseDown(), LLViewerWindow::handleRightMouseUp(), LLViewerWindow::hitObjectOrLandGlobalAsync(), LLViewerWindow::hitUIElementAsync(), LLViewerWindow::initFonts(), isExactlyZero(), isNull(), ll_sd_from_vector2(), ll_vector2_from_sd(), LLVector2(), LLViewerWindow::LLViewerWindow(), magVec(), magVecSquared(), move_vec(), normVec(), operator[](), LLPartData::pack(), LLDataPackerAsciiFile::packVector2(), LLDataPackerAsciiBuffer::packVector2(), LLDataPackerBinaryBuffer::packVector2(), LLViewerWindow::performPick(), LLViewerCamera::projectPosAgentToScreen(), LLViewerCamera::projectPosAgentToScreenEdge(), LLViewerPartSim::put(), render_disconnected_background(), LLPipeline::renderBloom(), LLHUDText::renderText(), LLManip::renderXYZ(), LLViewerWindow::reshape(), scaleVec(), LLVolumeImplFlexible::setAttributesOfAllSections(), LLUI::setCursorPositionScreen(), LLPartData::setEndScale(), LLUI::setLineWidth(), LLPathParams::setScaleX(), LLPathParams::setScaleY(), LLUI::setScissorRegionLocal(), LLUI::setScissorRegionScreen(), LLPathParams::setShearX(), LLPathParams::setShearY(), LLPartData::setStartScale(), LLPathParams::setTaperX(), LLPathParams::setTaperY(), setVec(), LLDrawPoolWater::shade(), LLComboBox::showList(), LLPartData::unpack(), LLDataPackerAsciiFile::unpackVector2(), LLDataPackerAsciiBuffer::unpackVector2(), LLDataPackerBinaryBuffer::unpackVector2(), update_min_max(), LLHUDText::updateAll(), LLHUDText::updateScreenPos(), LLFloaterEventLog::updateSelectedEventInfo(), LLHUDText::updateVisibility(), LLVOVolume::writeCAL3D(), xform(), and zeroVec().

LLVector2 LLVector2::zero [static]

Definition at line 50 of file v2math.h.

Referenced by gl_segmented_rect_2d_fragment_tex(), gl_segmented_rect_2d_tex(), and LLHUDText::updateAll().


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