LLXform Class Reference

#include <xform.h>

Inheritance diagram for LLXform:

Inheritance graph
[legend]
Collaboration diagram for LLXform:

Collaboration graph
[legend]
List of all members.

Public Types

typedef enum LLXform::e_changed_flags EChangedFlags
 UNCHANGED = 0x00
 TRANSLATED = 0x01
 ROTATED = 0x02
 SCALED = 0x04
 SHIFTED = 0x08
 GEOMETRY = 0x10
 TEXTURE = 0x20
 MOVED = TRANSLATED|ROTATED|SCALED
 SILHOUETTE = 0x40
 ALL_CHANGED = 0x7f
enum  e_changed_flags {
  UNCHANGED = 0x00, TRANSLATED = 0x01, ROTATED = 0x02, SCALED = 0x04,
  SHIFTED = 0x08, GEOMETRY = 0x10, TEXTURE = 0x20, MOVED = TRANSLATED|ROTATED|SCALED,
  SILHOUETTE = 0x40, ALL_CHANGED = 0x7f
}

Public Member Functions

void init ()
 LLXform ()
virtual ~LLXform ()
void getLocalMat4 (LLMatrix4 &mat) const
BOOL setParent (LLXform *parent)
void setPosition (const LLVector3 &pos)
void setPosition (const F32 x, const F32 y, const F32 z)
void setPositionX (const F32 x)
void setPositionY (const F32 y)
void setPositionZ (const F32 z)
void addPosition (const LLVector3 &pos)
void setScale (const LLVector3 &scale)
void setScale (const F32 x, const F32 y, const F32 z)
void setRotation (const LLQuaternion &rot)
void setRotation (const F32 x, const F32 y, const F32 z)
void setRotation (const F32 x, const F32 y, const F32 z, const F32 s)
void setChanged (const U32 bits)
BOOL isChanged () const
BOOL isChanged (const U32 bits) const
void clearChanged ()
void clearChanged (U32 bits)
void setScaleChildOffset (BOOL scale)
BOOL getScaleChildOffset ()
LLXformgetParent () const
LLXformgetRoot () const
virtual BOOL isRoot () const
virtual BOOL isRootEdit () const
const LLVector3getPosition () const
const LLVector3getScale () const
const LLQuaterniongetRotation () const
const LLVector3getPositionW () const
const LLQuaterniongetWorldRotation () const
const LLVector3getWorldPosition () const

Protected Attributes

LLVector3 mPosition
LLQuaternion mRotation
LLVector3 mScale
LLVector3 mWorldPosition
LLQuaternion mWorldRotation
LLXformmParent
U32 mChanged
BOOL mScaleChildOffset

Detailed Description

Definition at line 43 of file xform.h.


Member Typedef Documentation

typedef enum LLXform::e_changed_flags LLXform::EChangedFlags


Member Enumeration Documentation

enum LLXform::e_changed_flags

Enumerator:
UNCHANGED 
TRANSLATED 
ROTATED 
SCALED 
SHIFTED 
GEOMETRY 
TEXTURE 
MOVED 
SILHOUETTE 
ALL_CHANGED 

Definition at line 61 of file xform.h.


Constructor & Destructor Documentation

LLXform::LLXform (  ) 

Definition at line 35 of file xform.cpp.

References init().

LLXform::~LLXform (  )  [virtual]

Definition at line 40 of file xform.cpp.


Member Function Documentation

void LLXform::addPosition ( const LLVector3 pos  )  [inline]

Definition at line 243 of file xform.h.

References LLVector3::isFinite(), llendl, llwarns, mPosition, setChanged(), and TRANSLATED.

void LLXform::clearChanged ( U32  bits  )  [inline]

Definition at line 112 of file xform.h.

References mChanged.

void LLXform::clearChanged (  )  [inline]

Definition at line 111 of file xform.h.

References mChanged.

Referenced by LLVOGrass::updateDrawable(), LLVOClouds::updateDrawable(), LLStaticViewerObject::updateDrawable(), LLViewerObject::updateDrawable(), and LLSelectMgr::updateSilhouettes().

void LLXform::getLocalMat4 ( LLMatrix4 mat  )  const [inline]

Definition at line 90 of file xform.h.

References LLMatrix4::initAll(), mPosition, mRotation, and mScale.

LLXform* LLXform::getParent (  )  const [inline]

Definition at line 117 of file xform.h.

References mParent.

Referenced by LLPipeline::addObject(), LLSelectionPayable::apply(), complete_give_money(), LLToolDragAndDrop::dad3dRezScript(), LLToolDragAndDrop::dad3dUpdateInventory(), LLToolDragAndDrop::dad3dUpdateInventoryCategory(), LLSelectMgr::deselectObjectAndFamily(), LLVolumeImplFlexible::doIdleUpdate(), LLManipRotate::drag(), LLViewerObject::dump(), enable_detach(), find_avatar(), find_avatar_from_object(), LLVOAvatar::findAvatarFromAttachment(), LLViewerObject::getBoundingBoxAgent(), LLVOAvatar::getOffObject(), LLViewerObject::getPositionAgent(), LLViewerObject::getPositionEdit(), LLViewerObject::getPositionRegion(), LLViewerObject::getRotationEdit(), LLViewerObject::getRotationRegion(), getSelectedParentObject(), LLViewerObject::getSubParent(), LLAttachmentDetach::handleEvent(), LLAttachmentDrop::handleEvent(), LLEnablePayObject::handleEvent(), LLManipTranslate::handleHover(), LLVOAvatar::idleUpdate(), LLViewerObject::idleUpdate(), LLViewerObject::markDead(), LLViewerObjectList::orphanize(), LLViewerWindow::performPick(), LLViewerObject::permAnyOwner(), LLViewerObject::permCopy(), LLViewerObject::permGroupOwner(), LLViewerObject::permModify(), LLViewerObject::permMove(), LLViewerObject::permOwnerModify(), LLViewerObject::permTransfer(), LLViewerObject::permYouOwner(), LLToolPie::pickAndShowMenu(), LLViewerObject::processUpdateMessage(), LLSelectMgr::promoteSelectionToRoot(), renderPhysicalBeacons(), renderScriptedBeacons(), renderScriptedTouchBeacons(), LLSelectMgr::saveSelectedObjectTransform(), LLSelectMgr::selectObjectAndFamily(), LLViewerObject::setPositionAbsoluteGlobal(), LLViewerObject::setPositionEdit(), LLViewerObject::setPositionGlobal(), LLViewerObject::setPositionRegion(), LLVOAvatar::updateCharacter(), LLViewerObject::updateDrawable(), LLViewerObject::updatePositionCaches(), LLSelectMgr::updateSilhouettes(), and LLHoverView::updateText().

const LLVector3& LLXform::getPosition ( void   )  const [inline]

Definition at line 122 of file xform.h.

References mPosition.

Referenced by LLViewerJointAttachment::clampObjectPosition(), LLManipScale::drag(), LLManipRotate::drag(), LLSelectMgr::dump(), LLJoint::getPosition(), LLDrawable::getPosition(), LLViewerObject::getPositionAgent(), LLViewerObject::getPositionEdit(), LLViewerObject::getPositionRegion(), LLViewerObject::getRenderPosition(), LLManipTranslate::handleHover(), LLViewerObject::idleUpdate(), notify_cautioned_script_question(), LLSelectMgr::packMultipleUpdate(), LLViewerObject::processUpdateMessage(), LLSelectMgr::saveSelectedObjectTransform(), LLViewerObject::setPosition(), LLViewerObject::setPositionEdit(), LLViewerObject::setPositionGlobal(), LLVOAvatar::sitOnObject(), LLViewerObject::updatePositionCaches(), LLVOVolume::updateRelativeXform(), LLDrawable::updateXform(), LLVOVolume::writeCAL3D(), and LLViewerJoint::writeCAL3D().

const LLVector3& LLXform::getPositionW (  )  const [inline]

Definition at line 125 of file xform.h.

References mWorldPosition.

Referenced by LLDrawable::getBounds(), LLDrawable::getWorldPosition(), LLDrawable::moveUpdatePipeline(), and LLDrawable::shiftPos().

LLXform * LLXform::getRoot (  )  const

Definition at line 45 of file xform.cpp.

References mParent.

Referenced by LLSelectMgr::deselectHighlightedObjects(), LLSelectMgr::deselectObjectAndFamily(), LLFloaterReporter::getObjectInfo(), LLToolGrab::handleHoverActive(), LLSelectMgr::highlightObjectAndFamily(), LLVOAvatar::idleUpdate(), process_avatar_sit_response(), sitting_on_selection(), LLSelectMgr::unhighlightObjectAndFamily(), and LLSelectMgr::updateSilhouettes().

const LLQuaternion& LLXform::getRotation (  )  const [inline]

Definition at line 124 of file xform.h.

References mRotation.

Referenced by LLViewerObject::applyAngularVelocity(), LLManipRotate::drag(), LLVOAvatar::getCharacterRotation(), LLViewerObject::getPositionAgent(), LLViewerObject::getPositionRegion(), LLViewerObject::getRenderRotation(), LLJoint::getRotation(), LLDrawable::getRotation(), LLViewerObject::getRotationEdit(), LLViewerObject::getRotationRegion(), LLLandSit::handleEvent(), LLManipTranslate::handleHover(), LLVOAvatar::idleUpdate(), LLViewerObject::idleUpdate(), LLSelectMgr::packMultipleUpdate(), LLSelectMgr::packObjectIDAndRotation(), process_avatar_sit_response(), LLDrawPoolTree::renderTree(), LLSelectMgr::saveSelectedObjectTransform(), LLAgent::setPositionAgent(), LLViewerObject::setPositionEdit(), LLViewerObject::setPositionGlobal(), LLToolGrab::startGrab(), LLToolGrab::startSpin(), LLSpatialBridge::transformCamera(), LLVOAvatar::updateCharacter(), LLViewerObject::updatePositionCaches(), LLVOVolume::updateRelativeXform(), LLDrawable::updateXform(), and LLVOVolume::writeCAL3D().

const LLVector3& LLXform::getScale (  )  const [inline]

Definition at line 123 of file xform.h.

References mScale.

Referenced by LLSelectMgr::adjustTexturesByScale(), LLVOVolume::agentPositionToVolume(), LLPipeline::allocDrawable(), LLAgent::calcFocusOffset(), LLVOVolume::calcLOD(), LLVolumeImplFlexible::doIdleUpdate(), LLManipScale::drag(), LLVOVolume::generateSilhouette(), LLVOVolume::getBinRadius(), LLViewerObject::getBinRadius(), LLViewerObject::getBoundingBoxAgent(), LLVOTextBubble::getGeometry(), LLDrawable::getIntensity(), LLViewerObject::getMaxScale(), LLViewerObject::getMidScale(), LLWorld::getMinAllowedZ(), LLViewerObject::getMinScale(), LLJoint::getScale(), LLPanelObject::getState(), LLPanelFace::getState(), LLSelectMgr::packMultipleUpdate(), process_kill_object(), LLViewerObject::processUpdateMessage(), LLDrawPoolTree::renderTree(), LLSelectMgr::saveSelectedObjectTransform(), LLSelectMgr::selectionTexScaleAutofit(), LLViewerObject::sendScaleUpdate(), LLVOAvatar::setPixelAreaAndAngle(), LLVOVolume::setScale(), LLManipScale::stretchFace(), LLXformMatrix::update(), LLVOWater::updateGeometry(), LLVOVolume::updateRadius(), LLVOVolume::updateRelativeXform(), LLVOWater::updateSpatialExtents(), LLVOTree::updateSpatialExtents(), LLVOSurfacePatch::updateSpatialExtents(), LLVOAvatar::updateSpatialExtents(), LLViewerObject::updateSpatialExtents(), LLViewerObject::updateText(), LLVOVolume::volumePositionToAgent(), and LLVOVolume::writeCAL3D().

BOOL LLXform::getScaleChildOffset (  )  [inline]

Definition at line 115 of file xform.h.

References mScaleChildOffset.

Referenced by LLXformMatrix::update().

const LLVector3& LLXform::getWorldPosition (  )  const [inline]

Definition at line 127 of file xform.h.

References mWorldPosition.

Referenced by LLSelectMgr::getGrid(), LLJoint::getLastWorldPosition(), LLJoint::getWorldPosition(), LLSelectMgr::saveSelectedObjectTransform(), LLXformMatrix::update(), and LLVOAvatar::updateCharacter().

const LLQuaternion& LLXform::getWorldRotation (  )  const [inline]

Definition at line 126 of file xform.h.

References mWorldRotation.

Referenced by LLHUDEffectPointAt::calcTargetPosition(), LLHUDEffectLookAt::calcTargetPosition(), LLSelectMgr::getGrid(), LLJoint::getLastWorldRotation(), LLJoint::getWorldRotation(), LLDrawable::getWorldRotation(), LLSelectMgr::saveSelectedObjectTransform(), LLManipScale::stretchFace(), and LLXformMatrix::update().

void LLXform::init ( void   )  [inline]

Reimplemented in LLXformMatrix, and LLVOSky.

Definition at line 75 of file xform.h.

References LLVector3::clearVec(), FALSE, LLQuaternion::loadIdentity(), mChanged, mParent, mPosition, mRotation, mScale, mScaleChildOffset, mWorldPosition, mWorldRotation, NULL, LLVector3::setVec(), and UNCHANGED.

Referenced by LLXformMatrix::init(), LLViewerObject::LLViewerObject(), and LLXform().

BOOL LLXform::isChanged ( const U32  bits  )  const [inline]

Definition at line 110 of file xform.h.

References mChanged.

BOOL LLXform::isChanged (  )  const [inline]

Definition at line 109 of file xform.h.

References mChanged.

Referenced by LLViewerObject::updateDrawable(), and LLSelectMgr::updateSilhouettes().

BOOL LLXform::isRoot (  )  const [virtual]

Definition at line 55 of file xform.cpp.

References mParent.

Referenced by LLSelectMgrApplyFlags::apply(), LLViewerObject::getPositionRegion(), LLViewerObject::getRenderPosition(), LLViewerObject::getRotationRegion(), LLSelectMgr::renderSilhouettes(), LLViewerObject::setPosition(), LLViewerObject::setPositionAbsoluteGlobal(), LLViewerObject::setPositionGlobal(), LLViewerObject::setPositionParent(), LLViewerObject::updatePositionCaches(), LLSelectMgr::updateSilhouettes(), and LLDrawable::updateXform().

BOOL LLXform::isRootEdit (  )  const [virtual]

Reimplemented in LLVOVolume.

Definition at line 60 of file xform.cpp.

References mParent.

Referenced by LLVolumeImplFlexible::doIdleUpdate(), LLManipRotate::drag(), LLManipScale::dragCorner(), LLViewerObject::getPositionEdit(), LLViewerObject::getRotationEdit(), LLManipTranslate::handleHover(), LLObjectSelection::is_root_object::operator()(), LLObjectSelection::is_valid_root::operator()(), LLObjectSelection::is_root::operator()(), LLViewerObject::permAnyOwner(), LLViewerObject::permCopy(), LLViewerObject::permGroupOwner(), LLViewerObject::permModify(), LLViewerObject::permMove(), LLViewerObject::permOwnerModify(), LLViewerObject::permTransfer(), LLViewerObject::permYouOwner(), LLSelectMgr::promoteSelectionToRoot(), LLSelectMgr::renderSilhouettes(), LLSelectMgr::saveSelectedObjectTransform(), LLSelectMgr::selectHighlightedObjects(), LLSelectMgr::sendListToRegions(), LLViewerObject::setPositionAbsoluteGlobal(), LLViewerObject::setPositionEdit(), LLViewerObject::setPositionGlobal(), LLViewerObject::setPositionRegion(), LLManipScale::stretchFace(), and LLSelectMgr::updateSilhouettes().

void LLXform::setChanged ( const U32  bits  )  [inline]

Definition at line 108 of file xform.h.

References mChanged.

Referenced by addPosition(), LLViewerObject::applyAngularVelocity(), LLViewerObjectList::findOrphans(), LLViewerObject::idleUpdate(), LLViewerObject::processUpdateMessage(), LLViewerObject::setMaterial(), LLViewerObject::setNumTEs(), setPosition(), LLViewerObject::setPosition(), LLViewerObject::setPositionGlobal(), setPositionX(), setPositionY(), setPositionZ(), LLViewerObject::setRegion(), setRotation(), LLViewerObject::setRotation(), setScale(), LLViewerObject::setTEBumpmap(), LLViewerObject::setTEColor(), LLViewerObject::setTEFullbright(), LLViewerObject::setTEImage(), LLViewerObject::setTEMediaFlags(), LLViewerObject::setTEScale(), LLViewerObject::setTEShiny(), LLViewerObject::setTETexGen(), LLViewerObject::setTETextureCore(), LLPrimitive::setVolume(), and LLVOAvatar::slamPosition().

BOOL LLXform::setParent ( LLXform parent  )  [inline]

Definition at line 159 of file xform.h.

References FALSE, llendl, llwarns, mParent, and TRUE.

Referenced by LLJoint::addChild(), LLVOAvatar::getOffObject(), LLJoint::removeAllChildren(), LLJoint::removeChild(), LLViewerObject::setParent(), LLViewerJointAttachment::setupDrawable(), and LLVOAvatar::sitOnObject().

void LLXform::setPosition ( const F32  x,
const F32  y,
const F32  z 
) [inline]

Definition at line 195 of file xform.h.

References LLVector3::clearVec(), llendl, llfinite, llwarns, mPosition, setChanged(), LLVector3::setVec(), and TRANSLATED.

void LLXform::setPosition ( const LLVector3 pos  )  [inline]

Definition at line 183 of file xform.h.

References LLVector3::clearVec(), LLVector3::isFinite(), llendl, llwarns, mPosition, setChanged(), and TRANSLATED.

Referenced by LLViewerObject::setPosition(), LLJoint::setPosition(), LLViewerJointAttachment::setupDrawable(), LLDrawable::shiftPos(), and LLDrawable::updateXform().

void LLXform::setPositionX ( const F32  x  )  [inline]

Definition at line 207 of file xform.h.

References llendl, llfinite, llwarns, mPosition, LLVector3::mV, setChanged(), TRANSLATED, and VX.

void LLXform::setPositionY ( const F32  y  )  [inline]

Definition at line 219 of file xform.h.

References llendl, llfinite, llwarns, mPosition, LLVector3::mV, setChanged(), TRANSLATED, and VY.

void LLXform::setPositionZ ( const F32  z  )  [inline]

Definition at line 231 of file xform.h.

References llendl, llfinite, llwarns, mPosition, LLVector3::mV, setChanged(), TRANSLATED, and VZ.

void LLXform::setRotation ( const F32  x,
const F32  y,
const F32  z,
const F32  s 
) [inline]

Definition at line 298 of file xform.h.

References llendl, llfinite, llwarns, LLQuaternion::loadIdentity(), LLQuaternion::mQ, mRotation, ROTATED, setChanged(), VS, VX, VY, and VZ.

void LLXform::setRotation ( const F32  x,
const F32  y,
const F32  z 
) [inline]

Definition at line 285 of file xform.h.

References llendl, llfinite, llwarns, LLQuaternion::loadIdentity(), mRotation, ROTATED, setChanged(), and LLQuaternion::setQuat().

void LLXform::setRotation ( const LLQuaternion rot  )  [inline]

Definition at line 274 of file xform.h.

References LLQuaternion::isFinite(), llendl, llwarns, LLQuaternion::loadIdentity(), mRotation, ROTATED, and setChanged().

Referenced by LLViewerObject::setRotation(), LLJoint::setRotation(), LLViewerJointAttachment::setupDrawable(), LLDrawable::shiftPos(), and LLDrawable::updateXform().

void LLXform::setScale ( const F32  x,
const F32  y,
const F32  z 
) [inline]

Definition at line 263 of file xform.h.

References f, llendl, llfinite, llwarns, mScale, SCALED, setChanged(), and LLVector3::setVec().

void LLXform::setScale ( const LLVector3 scale  )  [inline]

Definition at line 252 of file xform.h.

References f, LLVector3::isFinite(), llendl, llwarns, mScale, SCALED, setChanged(), and LLVector3::setVec().

Referenced by LLJoint::LLJoint(), LLViewerObject::setScale(), LLJoint::setScale(), LLDrawable::shiftPos(), and LLDrawable::updateXform().

void LLXform::setScaleChildOffset ( BOOL  scale  )  [inline]

Definition at line 114 of file xform.h.

References mScaleChildOffset.

Referenced by LLJoint::LLJoint().


Member Data Documentation

U32 LLXform::mChanged [protected]

Definition at line 56 of file xform.h.

Referenced by clearChanged(), init(), isChanged(), LLPrimitive::LLPrimitive(), setChanged(), and LLXformMatrix::updateMatrix().

LLXform* LLXform::mParent [protected]

Definition at line 55 of file xform.h.

Referenced by getParent(), getRoot(), LLViewerObject::getRootEdit(), init(), isRoot(), isRootEdit(), LLVOVolume::isRootEdit(), LLViewerObject::processUpdateMessage(), setParent(), LLViewerObject::setPositionAbsoluteGlobal(), LLViewerObject::setPositionGlobal(), LLXformMatrix::update(), LLVOCloth::update(), and LLVOVolume::updateRelativeXform().

LLVector3 LLXform::mPosition [protected]

Definition at line 46 of file xform.h.

Referenced by addPosition(), LLVOGrass::getGeometry(), getLocalMat4(), getPosition(), init(), LLPrimitive::LLPrimitive(), LLVOGrass::plantBlades(), setPosition(), setPositionX(), setPositionY(), setPositionZ(), and LLXformMatrix::update().

LLQuaternion LLXform::mRotation [protected]

Definition at line 47 of file xform.h.

Referenced by getLocalMat4(), getRotation(), init(), LLPrimitive::LLPrimitive(), setRotation(), and LLXformMatrix::update().

LLVector3 LLXform::mScale [protected]

Definition at line 48 of file xform.h.

Referenced by LLVOPartGroup::getBinRadius(), LLVOGrass::getGeometry(), getLocalMat4(), getScale(), init(), LLPrimitive::LLPrimitive(), setScale(), LLVOGrass::updateLOD(), LLXformMatrix::updateMatrix(), and LLVOPartGroup::updateSpatialExtents().

BOOL LLXform::mScaleChildOffset [protected]

Definition at line 58 of file xform.h.

Referenced by getScaleChildOffset(), init(), and setScaleChildOffset().

LLVector3 LLXform::mWorldPosition [protected]

Definition at line 52 of file xform.h.

Referenced by getPositionW(), getWorldPosition(), init(), LLXformMatrix::update(), and LLXformMatrix::updateMatrix().

LLQuaternion LLXform::mWorldRotation [protected]

Definition at line 53 of file xform.h.

Referenced by getWorldRotation(), init(), LLXformMatrix::update(), and LLXformMatrix::updateMatrix().


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