#include <lltoolplacer.h>
Public Member Functions | |
LLToolPlacer () | |
virtual BOOL | placeObject (S32 x, S32 y, MASK mask) |
virtual BOOL | handleHover (S32 x, S32 y, MASK mask) |
virtual void | handleSelect () |
virtual void | handleDeselect () |
Static Public Member Functions | |
static void | setObjectType (LLPCode type) |
static LLPCode | getObjectType () |
Static Protected Attributes | |
static LLPCode | sObjectType = LL_PCODE_CUBE |
Private Member Functions | |
BOOL | addObject (LLPCode pcode, S32 x, S32 y, U8 use_physics) |
BOOL | raycastForNewObjPos (S32 x, S32 y, LLViewerObject **hit_obj, S32 *hit_face, BOOL *b_hit_land, LLVector3 *ray_start_region, LLVector3 *ray_end_region, LLViewerRegion **region) |
BOOL | addDuplicate (S32 x, S32 y) |
Definition at line 45 of file lltoolplacer.h.
LLToolPlacer::LLToolPlacer | ( | ) |
Definition at line 72 of file lltoolplacer.cpp.
Definition at line 490 of file lltoolplacer.cpp.
References addDuplicate(), addObject(), FALSE, LLControlGroup::getBOOL(), LLToolMgr::getCurrentToolset(), LLSingleton< LLToolCompTranslate >::getInstance(), LLSingleton< LLToolMgr >::getInstance(), gSavedSettings, LLToolset::selectTool(), sObjectType, and TRUE.
Referenced by LLToolCompCreate::handleMouseDown(), and LLToolCompCreate::handleMouseUp().
Reimplemented from LLTool.
Definition at line 512 of file lltoolplacer.cpp.
References LLViewerWindow::getWindow(), gViewerWindow, lldebugst, llendl, LLWindow::setCursor(), TRUE, and UI_CURSOR_TOOLCREATE.
void LLToolPlacer::handleSelect | ( | ) | [virtual] |
Reimplemented from LLTool.
Definition at line 519 of file lltoolplacer.cpp.
References gFloaterTools, and LLFloaterTools::setStatusText().
void LLToolPlacer::handleDeselect | ( | ) | [virtual] |
static void LLToolPlacer::setObjectType | ( | LLPCode | type | ) | [inline, static] |
Definition at line 56 of file lltoolplacer.h.
References sObjectType.
Referenced by LLToolPlacerPanel::setObjectType(), and LLFloaterTools::setObjectType().
static LLPCode LLToolPlacer::getObjectType | ( | ) | [inline, static] |
Definition at line 57 of file lltoolplacer.h.
References sObjectType.
Referenced by LLFloaterTools::updatePopup().
Definition at line 151 of file lltoolplacer.cpp.
References _PREHASH_AddFlags, _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_BypassRaycast, _PREHASH_GroupID, _PREHASH_Material, _PREHASH_ObjectAdd, _PREHASH_ObjectData, _PREHASH_PCode, _PREHASH_RayEnd, _PREHASH_RayEndIsIntersection, _PREHASH_RayStart, _PREHASH_RayTargetID, _PREHASH_Rotation, _PREHASH_Scale, _PREHASH_SessionID, _PREHASH_State, LLMessageSystem::addQuatFast(), LLMessageSystem::addU32Fast(), LLMessageSystem::addU8Fast(), LLMessageSystem::addUUIDFast(), LLMessageSystem::addVector3Fast(), LLHUDManager::createViewerEffect(), DEFAULT_OBJECT_SCALE, DEG_TO_RAD, LLSelectMgr::deselectAll(), FALSE, FLAGS_CREATE_SELECTED, FLAGS_USE_PHYSICS, gAgent, gAudiop, LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLAgent::getEffectColor(), LLControlGroup::getF32(), LLAgent::getGroupID(), LLViewerRegion::getHost(), LLViewerObject::getID(), LLAgent::getID(), LLSingleton< LLViewerStats >::getInstance(), LLSingleton< LLHUDManager >::getInstance(), LLSingleton< LLSelectMgr >::getInstance(), LLViewerRegion::getPosGlobalFromRegion(), LLViewerRegion::getRegionFlags(), LLAgent::getSessionID(), LLControlGroup::getString(), LLViewerWindow::getWindow(), gMessageSystem, gSavedSettings, gViewerWindow, LLWindow::incBusyCount(), LLViewerStats::incStat(), LLViewerObject::isAttachment(), LLPrimitive::isAvatar(), ll_frand(), LL_HUD_DUR_SHORT, LLHUDObject::LL_HUD_EFFECT_BEAM, LL_MCODE_WOOD, LL_PCODE_CONE, LL_PCODE_CONE_HEMI, LL_PCODE_CUBE, LL_PCODE_CYLINDER, LL_PCODE_CYLINDER_HEMI, LL_PCODE_LEGACY_GRASS, LL_PCODE_LEGACY_TREE, LL_PCODE_PATH_CIRCLE, LL_PCODE_PATH_LINE, LL_PCODE_PRISM, LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PROFILE_CIRCLE_HALF, LL_PCODE_PROFILE_EQUALTRI, LL_PCODE_PROFILE_SQUARE, LL_PCODE_PYRAMID, LL_PCODE_SPHERE, LL_PCODE_SPHERE_HEMI, LL_PCODE_TETRAHEDRON, LL_PCODE_TORUS, LL_PCODE_TREE_NEW, LL_PCODE_VOLUME, LLViewerObject::LL_VO_SQUARE_TORUS, LLViewerObject::LL_VO_TRIANGLE_TORUS, llendl, llwarns, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), NULL, LLVolumeMessage::packVolumeParams(), raycastForNewObjPos(), REGION_FLAGS_SANDBOX, S32, LLMessageSystem::sendReliable(), LLVolumeParams::setBeginAndEndS(), LLVolumeParams::setBeginAndEndT(), LLHUDEffect::setColor(), LLHUDEffect::setDuration(), LLUUID::setNull(), LLHUDObject::setPositionGlobal(), LLQuaternion::setQuat(), LLVolumeParams::setRatio(), LLVolumeParams::setShear(), LLHUDObject::setSourceObject(), LLVolumeParams::setType(), LLVector3::setVec(), LLVOGrass::sMaxGrassSpecies, LLVOTree::sMaxTreeSpecies, LLViewerStats::ST_CREATE_COUNT, LLAudioEngine::triggerSound(), TRUE, LLFirstUse::useSandbox(), and LLVector3::y_axis.
Referenced by placeObject().
BOOL LLToolPlacer::raycastForNewObjPos | ( | S32 | x, | |
S32 | y, | |||
LLViewerObject ** | hit_obj, | |||
S32 * | hit_face, | |||
BOOL * | b_hit_land, | |||
LLVector3 * | ray_start_region, | |||
LLVector3 * | ray_end_region, | |||
LLViewerRegion ** | region | |||
) | [private] |
Definition at line 77 of file lltoolplacer.cpp.
References FALSE, LLViewerObjectList::findObject(), gAgent, LLCoordFrame::getAtAxis(), LLAgent::getCameraPositionGlobal(), LLControlGroup::getF32(), LLSingleton< LLViewerCamera >::getInstance(), LLSingleton< LLWorld >::getInstance(), LLCamera::getNear(), LLViewerRegion::getPosRegionFromGlobal(), LLWorld::getRegionFromPosGlobal(), gLastHitNonFloraObjectFace, gLastHitNonFloraObjectID, gLastHitNonFloraPosGlobal, gObjectList, gSavedSettings, gViewerWindow, LLViewerWindow::hitObjectOrLandGlobalImmediate(), LLVector3d::isExactlyZero(), llendl, llwarns, LLViewerWindow::mouseDirectionGlobal(), NULL, LLVector3d::setVec(), and TRUE.
Referenced by addDuplicate(), and addObject().
Definition at line 436 of file lltoolplacer.cpp.
References FALSE, LLControlGroup::getBOOL(), LLViewerObject::getID(), LLSingleton< LLSelectMgr >::getInstance(), LLViewerRegion::getRegionFlags(), gSavedSettings, LLViewerObject::isAttachment(), LLPrimitive::isAvatar(), make_ui_sound(), NULL, raycastForNewObjPos(), REGION_FLAGS_SANDBOX, S32, LLSelectMgr::selectDuplicateOnRay(), LLUUID::setNull(), TRUE, and LLFirstUse::useSandbox().
Referenced by placeObject().
LLPCode LLToolPlacer::sObjectType = LL_PCODE_CUBE [static, protected] |
Definition at line 60 of file lltoolplacer.h.
Referenced by getObjectType(), placeObject(), and setObjectType().