LLManipScale Class Reference

#include <llmanipscale.h>

Inheritance diagram for LLManipScale:

Inheritance graph
[legend]
Collaboration diagram for LLManipScale:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLManipScale (LLToolComposite *composite)
 ~LLManipScale ()
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void render ()
virtual void handleSelect ()
virtual void handleDeselect ()
virtual BOOL handleMouseDownOnPart (S32 x, S32 y, MASK mask)
virtual void highlightManipulators (S32 x, S32 y)
virtual BOOL canAffectSelection ()

Static Public Member Functions

static void setUniform (BOOL b)
static BOOL getUniform ()
static void setStretchTextures (BOOL b)
static BOOL getStretchTextures ()
static void setShowAxes (BOOL b)
static BOOL getShowAxes ()

Private Types

typedef std::set
< ManipulatorHandle
*, compare_manipulators
minpulator_list_t

Private Member Functions

void renderCorners (const LLBBox &local_bbox)
void renderFaces (const LLBBox &local_bbox)
void renderEdges (const LLBBox &local_bbox)
void renderBoxHandle (F32 x, F32 y, F32 z)
void renderAxisHandle (const LLVector3 &start, const LLVector3 &end)
void renderGuidelinesPart (const LLBBox &local_bbox)
void renderSnapGuides (const LLBBox &local_bbox)
void revert ()
void conditionalHighlight (U32 part, const LLColor4 *highlight=NULL, const LLColor4 *normal=NULL)
void drag (S32 x, S32 y)
void dragFace (S32 x, S32 y)
void dragCorner (S32 x, S32 y)
void sendUpdates (BOOL send_position_update, BOOL send_scale_update, BOOL corner=FALSE)
LLVector3 faceToUnitVector (S32 part) const
LLVector3 cornerToUnitVector (S32 part) const
LLVector3 edgeToUnitVector (S32 part) const
LLVector3 partToUnitVector (S32 part) const
LLVector3 unitVectorToLocalBBoxExtent (const LLVector3 &v, const LLBBox &bbox) const
F32 partToMaxScale (S32 part, const LLBBox &bbox) const
F32 partToMinScale (S32 part, const LLBBox &bbox) const
LLVector3 nearestAxis (const LLVector3 &v) const
void stretchFace (const LLVector3 &drag_start_agent, const LLVector3 &drag_delta_agent)
void adjustTextureRepeats ()
void updateSnapGuides (const LLBBox &bbox)

Private Attributes

F32 mBoxHandleSize
F32 mScaledBoxHandleSize
EManipPart mManipPart
LLVector3d mDragStartPointGlobal
LLVector3d mDragStartCenterGlobal
LLVector3d mDragPointGlobal
LLVector3d mDragFarHitGlobal
S32 mLastMouseX
S32 mLastMouseY
BOOL mSendUpdateOnMouseUp
U32 mLastUpdateFlags
minpulator_list_t mProjectedManipulators
LLVector4 mManipulatorVertices [14]
F32 mScaleSnapUnit1
F32 mScaleSnapUnit2
LLVector3 mScalePlaneNormal1
LLVector3 mScalePlaneNormal2
LLVector3 mSnapGuideDir1
LLVector3 mSnapGuideDir2
LLVector3 mSnapDir1
LLVector3 mSnapDir2
F32 mSnapRegimeOffset
F32 mSnapGuideLength
LLVector3 mScaleCenter
LLVector3 mScaleDir
F32 mScaleSnapValue
BOOL mInSnapRegime
F32mManipulatorScales

Classes

struct  compare_manipulators
class  ManipulatorHandle


Detailed Description

Definition at line 57 of file llmanipscale.h.


Member Typedef Documentation

Definition at line 152 of file llmanipscale.h.


Constructor & Destructor Documentation

LLManipScale::LLManipScale ( LLToolComposite composite  ) 

Definition at line 176 of file llmanipscale.cpp.

References i, mManipulatorScales, NUM_MANIPULATORS, and S32.

LLManipScale::~LLManipScale (  ) 

Definition at line 199 of file llmanipscale.cpp.

References mManipulatorScales, and mProjectedManipulators.


Member Function Documentation

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

Reimplemented from LLTool.

Definition at line 315 of file llmanipscale.cpp.

References FALSE, gViewerWindow, handleMouseDownOnPart(), LLViewerWindow::lastObjectHit(), LLManip::LL_NO_PART, and LLManip::mHighlightedPart.

Here is the call graph for this function:

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

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

void LLManipScale::render (  )  [virtual]

void LLManipScale::handleSelect (  )  [virtual]

void LLManipScale::handleDeselect (  )  [virtual]

Reimplemented from LLManip.

Definition at line 169 of file llmanipscale.cpp.

References LLManip::handleDeselect(), LLManip::LL_NO_PART, LLManip::mHighlightedPart, and mManipPart.

Here is the call graph for this function:

BOOL LLManipScale::handleMouseDownOnPart ( S32  x,
S32  y,
MASK  mask 
) [virtual]

void LLManipScale::highlightManipulators ( S32  x,
S32  y 
) [virtual]

BOOL LLManipScale::canAffectSelection (  )  [virtual]

Implements LLManip.

Definition at line 2043 of file llmanipscale.cpp.

References LLViewerObject::isSeat(), LLManip::mObjectSelection, LLViewerObject::permModify(), and LLViewerObject::permMove().

Referenced by handleMouseDownOnPart(), highlightManipulators(), and render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::setUniform ( BOOL  b  )  [static]

Definition at line 94 of file llmanipscale.cpp.

References gSavedSettings, and LLControlGroup::setBOOL().

Here is the call graph for this function:

BOOL LLManipScale::getUniform (  )  [static]

Definition at line 112 of file llmanipscale.cpp.

References LLControlGroup::getBOOL(), and gSavedSettings.

Referenced by dragCorner(), dragFace(), partToMaxScale(), partToMinScale(), renderGuidelinesPart(), renderSnapGuides(), stretchFace(), and updateSnapGuides().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::setStretchTextures ( BOOL  b  )  [static]

Definition at line 106 of file llmanipscale.cpp.

References gSavedSettings, and LLControlGroup::setBOOL().

Here is the call graph for this function:

BOOL LLManipScale::getStretchTextures (  )  [static]

Definition at line 124 of file llmanipscale.cpp.

References LLControlGroup::getBOOL(), and gSavedSettings.

Referenced by handleHover(), handleMouseUp(), and LLPanelObject::sendScale().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::setShowAxes ( BOOL  b  )  [static]

Definition at line 100 of file llmanipscale.cpp.

References gSavedSettings, and LLControlGroup::setBOOL().

Here is the call graph for this function:

BOOL LLManipScale::getShowAxes (  )  [static]

Definition at line 118 of file llmanipscale.cpp.

References LLControlGroup::getBOOL(), and gSavedSettings.

Referenced by renderAxisHandle().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::renderCorners ( const LLBBox local_bbox  )  [private]

Definition at line 735 of file llmanipscale.cpp.

References conditionalHighlight(), LLBBox::getMaxLocal(), LLBBox::getMinLocal(), i, j, LLManip::LL_CORNER_NNN, LLVector3::mV, renderBoxHandle(), S32, VX, VY, and VZ.

Referenced by render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::renderFaces ( const LLBBox local_bbox  )  [private]

void LLManipScale::renderEdges ( const LLBBox local_bbox  )  [private]

void LLManipScale::renderBoxHandle ( F32  x,
F32  y,
F32  z 
) [private]

Definition at line 762 of file llmanipscale.cpp.

References gBox, mScaledBoxHandleSize, LLBox::render(), and LLImageGL::unbindTexture().

Referenced by renderAxisHandle(), and renderCorners().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::renderAxisHandle ( const LLVector3 start,
const LLVector3 end 
) [private]

Definition at line 777 of file llmanipscale.cpp.

References gBox, getShowAxes(), llabs(), mBoxHandleSize, LLVector3::mV, LLVector3::normVec(), LLBox::render(), renderBoxHandle(), VX, VY, and VZ.

Referenced by renderFaces().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::renderGuidelinesPart ( const LLBBox local_bbox  )  [private]

Definition at line 1330 of file llmanipscale.cpp.

References LLBBox::getCenterLocal(), LLSingleton< LLWorld >::getInstance(), LLWorld::getRegionWidthInMeters(), getUniform(), gl_stippled_line_3d(), mManipPart, LLVector3::normVec(), partToUnitVector(), and unitVectorToLocalBBoxExtent().

Referenced by render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::renderSnapGuides ( const LLBBox local_bbox  )  [private]

Definition at line 1517 of file llmanipscale.cpp.

References LLGLImmediate::begin(), clamp_rescale(), LLGLImmediate::color4f(), LLGLImmediate::color4fv(), LLGLImmediate::end(), gAgent, LLControlGroup::getBOOL(), LLBBox::getCenterAgent(), LLFrameTimer::getElapsedTimeF32(), LLControlGroup::getF32(), LLSelectMgr::getGridMode(), LLSingleton< LLSelectMgr >::getInstance(), LLSingleton< LLViewerCamera >::getInstance(), LLAgent::getPosAgentFromGlobal(), LLSelectMgr::getSavedBBoxOfSelection(), LLManip::getSubdivisionLevel(), getUniform(), LLCoordFrame::getUpAxis(), gGL, GRID_MODE_WORLD, gSavedSettings, hud_render_utf8text(), i, is_approx_equal(), LLVertexBuffer::LINES, llabs(), llceil(), llclamp(), llmax(), llmin(), llround(), lltrunc(), mBoxHandleSize, mDragPointGlobal, LLManip::mHelpTextTimer, mInSnapRegime, mManipPart, LLManip::mObjectSelection, mScaleCenter, mScaleDir, mScaleSnapUnit1, mScaleSnapUnit2, mScaleSnapValue, mSnapGuideDir1, mSnapGuideDir2, mSnapGuideLength, mSnapRegimeOffset, LLVector3::mV, LLColor4::mV, LLFontGL::NORMAL, LLVector2::normVec(), LLVector3::normVec(), partToMaxScale(), LLManip::renderTickValue(), S32, SELECT_TYPE_HUD, LLManip::setupSnapGuideRenderPass(), LLManip::sGridMaxSubdivisionLevel, LLManip::sGridMinSubdivisionLevel, LLManip::sHelpTextFadeTime, LLManip::sHelpTextVisibleTime, LLManip::sMaxTimesShowHelpText, LLManip::sNumTimesHelpTextShown, LLFontGL::sSansSerif, LLManip::sTickLabelSpacing, LLVertexBuffer::TRIANGLES, LLManip::updateGridSettings(), VALPHA, VBLUE, LLGLImmediate::vertex3fv(), VGREEN, VRED, and LLColor4::white.

Referenced by render().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::revert (  )  [private]

void LLManipScale::conditionalHighlight ( U32  part,
const LLColor4 highlight = NULL,
const LLColor4 normal = NULL 
) [inline, private]

Definition at line 129 of file llmanipscale.cpp.

References LLGLImmediate::color4fv(), gGL, i, LLManip::LL_NO_PART, MANIPULATOR_IDS, mBoxHandleSize, LLManip::mHighlightedPart, mManipPart, mManipulatorScales, mScaledBoxHandleSize, LLColor4::mV, NUM_MANIPULATORS, and S32.

Referenced by renderCorners(), renderEdges(), and renderFaces().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::drag ( S32  x,
S32  y 
) [private]

void LLManipScale::dragFace ( S32  x,
S32  y 
) [private]

void LLManipScale::dragCorner ( S32  x,
S32  y 
) [private]

Definition at line 839 of file llmanipscale.cpp.

References LLWorld::clipToVisibleRegions(), DEFAULT_MAX_PRIM_SCALE, dist_vec(), FALSE, gAgent, LLSelectMgr::getBBoxOfSelection(), LLControlGroup::getBOOL(), LLSingleton< LLWorld >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLManip::getMousePointOnPlaneAgent(), LLSelectNode::getObject(), LLAgent::getPosAgentFromGlobal(), LLXform::getPosition(), LLViewerObject::getPositionEdit(), LLViewerObject::getPositionGlobal(), LLViewerObject::getRotationEdit(), LLManip::getSubdivisionLevel(), getUniform(), gSavedSettings, LLViewerObject::isAttachment(), LLPrimitive::isAvatar(), LLXform::isRootEdit(), llclamp(), llmax(), llmin(), LLViewerObject::mChildList, mDragFarHitGlobal, mDragPointGlobal, mDragStartCenterGlobal, mDragStartPointGlobal, MIN_PRIM_SCALE, LLSelectNode::mIndividualSelection, mInSnapRegime, mLastMouseX, mLastMouseY, mManipPart, LLManip::mObjectSelection, LLSelectNode::mSavedPositionGlobal, LLSelectNode::mSavedPositionLocal, LLSelectNode::mSavedScale, mScaleCenter, mScaleDir, mScalePlaneNormal1, mScalePlaneNormal2, mScaleSnapUnit1, mScaleSnapUnit2, mScaleSnapValue, mSnapGuideDir1, mSnapGuideDir2, mSnapRegimeOffset, LLVector3::mV, LLManip::nearestPointOnLineFromMouse(), LLVector3::normVec(), partToMaxScale(), partToMinScale(), LLViewerObject::permModify(), LLViewerObject::permMove(), projected_vec(), LLManip::rebuild(), LLViewerObject::setPosition(), LLViewerObject::setPositionAbsoluteGlobal(), LLViewerObject::setScale(), LLVector3::setVec(), LLVector3d::setVec(), LLManip::sGridMaxSubdivisionLevel, LLManip::sGridMinSubdivisionLevel, TRUE, VX, VY, and VZ.

Referenced by drag().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLManipScale::sendUpdates ( BOOL  send_position_update,
BOOL  send_scale_update,
BOOL  corner = FALSE 
) [private]

LLVector3 LLManipScale::faceToUnitVector ( S32  part  )  const [private]

LLVector3 LLManipScale::cornerToUnitVector ( S32  part  )  const [private]

LLVector3 LLManipScale::edgeToUnitVector ( S32  part  )  const [private]

Definition at line 1932 of file llmanipscale.cpp.

References F_SQRT2, LLManip::LL_EDGE_MAX, LLManip::LL_EDGE_MIN, llassert, LLVector3::mV, and S32.

Referenced by partToUnitVector(), and renderEdges().

Here is the caller graph for this function:

LLVector3 LLManipScale::partToUnitVector ( S32  part  )  const [private]

LLVector3 LLManipScale::unitVectorToLocalBBoxExtent ( const LLVector3 v,
const LLBBox bbox 
) const [private]

Definition at line 1945 of file llmanipscale.cpp.

References LLBBox::getCenterLocal(), LLBBox::getMaxLocal(), LLBBox::getMinLocal(), and LLVector3::mV.

Referenced by handleMouseDownOnPart(), partToMaxScale(), partToMinScale(), renderEdges(), renderGuidelinesPart(), and updateSnapGuides().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLManipScale::partToMaxScale ( S32  part,
const LLBBox bbox 
) const [private]

Definition at line 1958 of file llmanipscale.cpp.

References LLVector3::abs(), DEFAULT_MAX_PRIM_SCALE, getUniform(), i, LLVector3::magVec(), LLVector3::mV, partToUnitVector(), unitVectorToLocalBBoxExtent(), VX, and VZ.

Referenced by dragCorner(), dragFace(), and renderSnapGuides().

Here is the call graph for this function:

Here is the caller graph for this function:

F32 LLManipScale::partToMinScale ( S32  part,
const LLBBox bbox 
) const [private]

Definition at line 1982 of file llmanipscale.cpp.

References LLVector3::abs(), DEFAULT_MAX_PRIM_SCALE, getUniform(), i, LLVector3::magVec(), MIN_PRIM_SCALE, LLVector3::mV, partToUnitVector(), unitVectorToLocalBBoxExtent(), VX, and VZ.

Referenced by dragCorner(), and dragFace().

Here is the call graph for this function:

Here is the caller graph for this function:

LLVector3 LLManipScale::nearestAxis ( const LLVector3 v  )  const [private]

Definition at line 2005 of file llmanipscale.cpp.

References i, and S32.

Referenced by stretchFace().

Here is the caller graph for this function:

void LLManipScale::stretchFace ( const LLVector3 drag_start_agent,
const LLVector3 drag_delta_agent 
) [private]

void LLManipScale::adjustTextureRepeats (  )  [private]

void LLManipScale::updateSnapGuides ( const LLBBox bbox  )  [private]

Definition at line 1356 of file llmanipscale.cpp.

References LLVector3::abs(), dist_vec(), gAgent, LLCoordFrame::getAtAxis(), LLAgent::getAvatarObject(), LLBBox::getCenterAgent(), LLSelectMgr::getGrid(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLBBox::getMaxLocal(), LLCoordFrame::getOrigin(), LLViewerCamera::getPixelMeterRatio(), LLBBox::getRotation(), getUniform(), LLCoordFrame::getUpAxis(), LLViewerWindow::getWindowWidth(), gViewerWindow, LLManip::LL_CORNER_MAX, LLManip::LL_CORNER_MIN, LLManip::LL_CORNER_NNN, LLManip::LL_CORNER_NNP, LLManip::LL_CORNER_NPN, LLManip::LL_CORNER_NPP, LLManip::LL_CORNER_PNN, LLManip::LL_CORNER_PNP, LLManip::LL_CORNER_PPN, LLManip::LL_CORNER_PPP, LLManip::LL_FACE_MAX, LLManip::LL_FACE_MIN, llabs(), llmax(), llmin(), LLBBox::localToAgent(), LLVector3::magVec(), LLVOAvatar::mHUDCurZoom, mManipPart, LLManip::mObjectSelection, mScaleCenter, mScaleDir, mScalePlaneNormal1, mScalePlaneNormal2, mScaleSnapUnit1, mScaleSnapUnit2, mSnapDir1, mSnapDir2, mSnapGuideDir1, mSnapGuideDir2, mSnapGuideLength, mSnapRegimeOffset, LLVector3::mV, LLVector3::normVec(), partToUnitVector(), projected_vec(), LLVector3::rotVec(), S32, LLVector3::scaleVec(), SELECT_TYPE_HUD, LLVector3::setVec(), SNAP_GUIDE_SCREEN_LENGTH, SNAP_GUIDE_SCREEN_OFFSET, unitVectorToLocalBBoxExtent(), VX, VY, VZ, LLVector3::x_axis, LLVector3::y_axis, and LLVector3::z_axis.

Referenced by handleMouseDownOnPart(), and handleSelect().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 142 of file llmanipscale.h.

Referenced by conditionalHighlight(), and renderBoxHandle().

Definition at line 144 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), and handleMouseDownOnPart().

Definition at line 145 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), handleMouseDownOnPart(), and stretchFace().

Definition at line 146 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), handleMouseDownOnPart(), and renderSnapGuides().

Definition at line 147 of file llmanipscale.h.

Referenced by dragCorner(), and handleMouseDownOnPart().

Definition at line 148 of file llmanipscale.h.

Referenced by dragCorner(), and dragFace().

Definition at line 149 of file llmanipscale.h.

Referenced by dragCorner(), and dragFace().

Definition at line 150 of file llmanipscale.h.

Referenced by sendUpdates().

Definition at line 151 of file llmanipscale.h.

Referenced by handleMouseUp(), and sendUpdates().

Definition at line 153 of file llmanipscale.h.

Referenced by highlightManipulators(), and ~LLManipScale().

Definition at line 154 of file llmanipscale.h.

Referenced by highlightManipulators().

Definition at line 155 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), renderSnapGuides(), and updateSnapGuides().

Definition at line 156 of file llmanipscale.h.

Referenced by dragCorner(), renderSnapGuides(), and updateSnapGuides().

Definition at line 157 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), and updateSnapGuides().

Definition at line 158 of file llmanipscale.h.

Referenced by dragCorner(), and updateSnapGuides().

Definition at line 159 of file llmanipscale.h.

Referenced by dragCorner(), renderSnapGuides(), and updateSnapGuides().

Definition at line 160 of file llmanipscale.h.

Referenced by dragCorner(), renderSnapGuides(), and updateSnapGuides().

Definition at line 161 of file llmanipscale.h.

Referenced by updateSnapGuides().

Definition at line 162 of file llmanipscale.h.

Referenced by updateSnapGuides().

Definition at line 163 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), renderSnapGuides(), and updateSnapGuides().

Definition at line 164 of file llmanipscale.h.

Referenced by renderSnapGuides(), and updateSnapGuides().

Definition at line 165 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), renderSnapGuides(), and updateSnapGuides().

Definition at line 166 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), renderSnapGuides(), and updateSnapGuides().

Definition at line 167 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), and renderSnapGuides().

Reimplemented from LLManip.

Definition at line 168 of file llmanipscale.h.

Referenced by dragCorner(), dragFace(), handleHover(), and renderSnapGuides().


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

Generated on Fri May 16 08:52:07 2008 for SecondLife by  doxygen 1.5.5