diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-03-29 10:53:22 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-03-29 10:53:22 -0400 |
commit | 783eb286a67e6f9ace5561073a16c9c1b7f1ade5 (patch) | |
tree | 1b4a6d5a81527202860d3cfc217c30d4e1a67880 /indra/newview/llglsandbox.cpp | |
parent | f428d62c93f2cd2817e055fce7db49410e8324d6 (diff) | |
parent | 61657d2e7904ba7274a0ab5d451669d2ee7bb7cc (diff) |
merge
Diffstat (limited to 'indra/newview/llglsandbox.cpp')
-rw-r--r-- | indra/newview/llglsandbox.cpp | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 8569e208eb..2aba0b5c09 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -71,99 +71,6 @@ // Height of the yellow selection highlight posts for land const F32 PARCEL_POST_HEIGHT = 0.666f; -BOOL LLAgent::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) -{ - if(object && object->isAttachment()) - { - LLViewerObject* parent = object; - while(parent) - { - if (parent == mAvatarObject) - { - // looking at an attachment on ourselves, which we don't want to do - object = mAvatarObject; - position.clearVec(); - } - parent = (LLViewerObject*)parent->getParent(); - } - } - if(!mLookAt || mLookAt->isDead()) - { - mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT); - mLookAt->setSourceObject(mAvatarObject); - } - - return mLookAt->setLookAt(target_type, object, position); -} - -BOOL LLAgent::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) -{ - // disallow pointing at attachments and avatars - if (object && (object->isAttachment() || object->isAvatar())) - { - return FALSE; - } - - if(!mPointAt || mPointAt->isDead()) - { - mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT); - mPointAt->setSourceObject(mAvatarObject); - } - - return mPointAt->setPointAt(target_type, object, position); -} - -ELookAtType LLAgent::getLookAtType() -{ - if (mLookAt) - { - return mLookAt->getLookAtType(); - } - - return LOOKAT_TARGET_NONE; -} - -EPointAtType LLAgent::getPointAtType() -{ - if (mPointAt) - { - return mPointAt->getPointAtType(); - } - - return POINTAT_TARGET_NONE; -} - -// Draw a representation of current autopilot target -void LLAgent::renderAutoPilotTarget() -{ - if (mAutoPilot) - { - F32 height_meters; - LLVector3d target_global; - - glMatrixMode(GL_MODELVIEW); - gGL.pushMatrix(); - - // not textured - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - - // lovely green - glColor4f(0.f, 1.f, 1.f, 1.f); - - target_global = mAutoPilotTargetGlobal; - - gGL.translatef((F32)(target_global.mdV[VX]), (F32)(target_global.mdV[VY]), (F32)(target_global.mdV[VZ])); - - height_meters = 1.f; - - glScalef(height_meters, height_meters, height_meters); - - gSphere.render(1500.f); - - gGL.popMatrix(); - } -} - // Returns true if you got at least one object void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) { |