LLVolumeImplFlexible Class Reference

#include <llflexibleobject.h>

Inheritance diagram for LLVolumeImplFlexible:

Inheritance graph
[legend]
Collaboration diagram for LLVolumeImplFlexible:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLVolumeImplFlexible (LLViewerObject *volume, LLFlexibleObjectData *attributes)
U32 getID () const
LLVector3 getFramePosition () const
LLQuaternion getFrameRotation () const
LLVolumeInterfaceType getInterfaceType () const
BOOL doIdleUpdate (LLAgent &agent, LLWorld &world, const F64 &time)
BOOL doUpdateGeometry (LLDrawable *drawable)
LLVector3 getPivotPosition () const
void onSetVolume (const LLVolumeParams &volume_params, const S32 detail)
void onSetScale (const LLVector3 &scale, BOOL damped)
void onParameterChanged (U16 param_type, LLNetworkData *data, BOOL in_use, bool local_origin)
void onShift (const LLVector3 &shift_vector)
bool isVolumeUnique () const
bool isVolumeGlobal () const
bool isActive () const
const LLMatrix4getWorldMatrix (LLXformMatrix *xform) const
void updateRelativeXform ()
void doFlexibleUpdate ()
void doFlexibleRebuild ()
void setParentPositionAndRotationDirectly (LLVector3 p, LLQuaternion r)
void setUsingCollisionSphere (bool u)
void setCollisionSphere (LLVector3 position, F32 radius)
void setRenderingCollisionSphere (bool r)
LLVector3 getEndPosition ()
LLQuaternion getEndRotation ()
LLVector3 getNodePosition (int nodeIndex)
LLVector3 getAnchorPosition () const

Static Public Attributes

static F32 sUpdateFactor = 1.0f

Private Member Functions

void setAttributesOfAllSections ()
void remapSections (LLFlexibleObjectSection *source, S32 source_sections, LLFlexibleObjectSection *dest, S32 dest_sections)

Private Attributes

LLViewerObjectmVO
LLTimer mTimer
LLVector3 mAnchorPosition
LLVector3 mParentPosition
LLQuaternion mParentRotation
LLQuaternion mLastFrameRotation
LLQuaternion mLastSegmentRotation
BOOL mInitialized
BOOL mUpdated
LLFlexibleObjectDatamAttributes
LLFlexibleObjectSection mSection [(1<< FLEXIBLE_OBJECT_MAX_SECTIONS)+1]
S32 mInitializedRes
S32 mSimulateRes
S32 mRenderRes
U32 mFrameNum
LLVector3 mCollisionSpherePosition
F32 mCollisionSphereRadius
U32 mID

Detailed Description

Definition at line 77 of file llflexibleobject.h.


Constructor & Destructor Documentation

LLVolumeImplFlexible::LLVolumeImplFlexible ( LLViewerObject volume,
LLFlexibleObjectData attributes 
)

Definition at line 58 of file llflexibleobject.cpp.

References FALSE, mFrameNum, mID, mInitialized, mInitializedRes, mRenderRes, mSimulateRes, and mUpdated.


Member Function Documentation

void LLVolumeImplFlexible::doFlexibleRebuild (  ) 

Definition at line 617 of file llflexibleobject.cpp.

References LLPrimitive::getVolume(), mUpdated, mVO, LLVolume::regen(), and TRUE.

Referenced by doUpdateGeometry().

void LLVolumeImplFlexible::doFlexibleUpdate (  ) 

Definition at line 349 of file llflexibleobject.cpp.

References a, angle, b, doIdleUpdate(), f, F_PI, FALSE, FLEXIBLE_OBJECT_MAX_INTERNAL_TENSION_FORCE, FLEXIBLE_OBJECT_MAX_SECTIONS, gAgent, LLFlexibleObjectData::getAirFriction(), LLQuaternion::getAngleAxis(), LLTimer::getElapsedTimeAndResetF32(), getFramePosition(), getFrameRotation(), LLFlexibleObjectData::getGravity(), LLVolume::getPath(), LLAgent::getRegion(), LLFlexibleObjectData::getTension(), LLFlexibleObjectData::getUserForce(), LLWind::getVelocity(), LLPrimitive::getVolume(), LLFlexibleObjectData::getWindSensitivity(), gWorldp, i, LLMatrix4::initRows(), llassert_always, LLViewerObject::markForUpdate(), mAttributes, LLFlexibleObjectSection::mAxisRotation, LLFlexibleObjectSection::mDirection, LLFlexibleObjectSection::mdPosition, LLViewerObject::mDrawable, mInitialized, mLastSegmentRotation, LLPath::mPath, LLPath::PathPt::mPos, LLFlexibleObjectSection::mPosition, mRenderRes, LLPath::PathPt::mRot, LLFlexibleObjectSection::mRotation, LLPath::PathPt::mScale, mSection, mSimulateRes, LLPath::PathPt::mTexT, mTimer, mUpdated, LLVector3::mV, LLFlexibleObjectSection::mVelocity, mVO, LLViewerRegion::mWind, LLVector3::normVec(), remapSections(), LLPath::resizePath(), S32, LLQuaternion::setQuat(), LLQuaternion::shortestArc(), TRUE, VX, VY, VZ, and LLVector3::z_axis.

Referenced by doUpdateGeometry().

BOOL LLVolumeImplFlexible::doIdleUpdate ( LLAgent agent,
LLWorld world,
const F64 time 
) [virtual]

Implements LLVolumeInterface.

Definition at line 256 of file llflexibleobject.cpp.

References DEG_TO_RAD, f, FALSE, FLEXIBLE_OBJECT_MAX_SECTIONS, LLFastTimer::FTM_FLEXIBLE_UPDATE, gCamera, LLDrawable::getCurrentFrame(), LLXform::getParent(), LLViewerObject::getPixelArea(), LLXform::getScale(), LLViewerCamera::getScreenPixelArea(), LLFlexibleObjectData::getSimulateLOD(), LLCamera::getView(), LLVOVolume::getVolumeInterfaceID(), gPipeline, LLPipeline::hasRenderDebugFeatureMask(), LLDrawable::IN_REBUILD_Q1, LLPointer< Type >::isNull(), LLXform::isRootEdit(), llround(), LLPipeline::markRebuild(), mAttributes, LLViewerObject::mDrawable, mID, mInitialized, mRenderRes, mSimulateRes, LLVector3::mV, mVO, RAD_TO_DEG, LLDrawable::REBUILD_POSITION, LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE, S32, setAttributesOfAllSections(), sUpdateFactor, and TRUE.

Referenced by doFlexibleUpdate().

BOOL LLVolumeImplFlexible::doUpdateGeometry ( LLDrawable drawable  )  [virtual]

Implements LLVolumeInterface.

Definition at line 630 of file llflexibleobject.cpp.

References LLDrawable::clearState(), doFlexibleRebuild(), doFlexibleUpdate(), FALSE, LLVOVolume::genBBoxes(), getFrameRotation(), LLVolume::getParams(), LLPrimitive::getVolume(), LLPointer< Type >::isNull(), isVolumeGlobal(), LLViewerObject::mDrawable, LLVOVolume::mFaceMappingChanged, mLastFrameRotation, LLVOVolume::mLODChanged, mUpdated, mVO, LLVOVolume::mVolumeChanged, LLDrawable::REBUILD_VOLUME, LLVOVolume::regenFaces(), LLVOVolume::setVolume(), TRUE, LLVOVolume::updateRelativeXform(), and LLDrawable::UV.

LLVector3 LLVolumeImplFlexible::getAnchorPosition (  )  const

Definition at line 734 of file llflexibleobject.cpp.

References getFramePosition(), getFrameRotation(), LLViewerObject::mDrawable, LLVector3::mV, mVO, VZ, and LLVector3::z_axis.

Referenced by getPivotPosition(), LLVOCloth::render(), and setAttributesOfAllSections().

LLVector3 LLVolumeImplFlexible::getEndPosition (  ) 

Definition at line 703 of file llflexibleobject.cpp.

References LLFlexibleObjectData::getSimulateLOD(), mAttributes, LLFlexibleObjectSection::mPosition, mSection, and S32.

LLQuaternion LLVolumeImplFlexible::getEndRotation (  ) 

Definition at line 746 of file llflexibleobject.cpp.

References mLastSegmentRotation.

LLVector3 LLVolumeImplFlexible::getFramePosition (  )  const

Definition at line 71 of file llflexibleobject.cpp.

References LLViewerObject::getRenderPosition(), and mVO.

Referenced by doFlexibleUpdate(), and getAnchorPosition().

LLQuaternion LLVolumeImplFlexible::getFrameRotation (  )  const

Definition at line 76 of file llflexibleobject.cpp.

References LLViewerObject::getRenderRotation(), and mVO.

Referenced by doFlexibleUpdate(), doUpdateGeometry(), getAnchorPosition(), and setAttributesOfAllSections().

U32 LLVolumeImplFlexible::getID (  )  const [inline, virtual]

Implements LLVolumeInterface.

Definition at line 83 of file llflexibleobject.h.

References mID.

LLVolumeInterfaceType LLVolumeImplFlexible::getInterfaceType (  )  const [inline, virtual]

Implements LLVolumeInterface.

Definition at line 86 of file llflexibleobject.h.

References INTERFACE_FLEXIBLE.

LLVector3 LLVolumeImplFlexible::getNodePosition ( int  nodeIndex  ) 

Definition at line 712 of file llflexibleobject.cpp.

References LLFlexibleObjectData::getSimulateLOD(), mAttributes, LLFlexibleObjectSection::mPosition, mSection, and S32.

Referenced by LLVOCloth::render().

LLVector3 LLVolumeImplFlexible::getPivotPosition (  )  const [virtual]

Implements LLVolumeInterface.

Definition at line 728 of file llflexibleobject.cpp.

References getAnchorPosition().

const LLMatrix4 & LLVolumeImplFlexible::getWorldMatrix ( LLXformMatrix xform  )  const [virtual]

Implements LLVolumeInterface.

Definition at line 781 of file llflexibleobject.cpp.

References xform().

bool LLVolumeImplFlexible::isActive ( void   )  const [inline, virtual]

Implements LLVolumeInterface.

Definition at line 96 of file llflexibleobject.h.

bool LLVolumeImplFlexible::isVolumeGlobal (  )  const [inline, virtual]

Implements LLVolumeInterface.

Definition at line 95 of file llflexibleobject.h.

Referenced by doUpdateGeometry().

bool LLVolumeImplFlexible::isVolumeUnique (  )  const [inline, virtual]

Implements LLVolumeInterface.

Definition at line 94 of file llflexibleobject.h.

void LLVolumeImplFlexible::onParameterChanged ( U16  param_type,
LLNetworkData data,
BOOL  in_use,
bool  local_origin 
) [virtual]

Implements LLVolumeInterface.

Definition at line 81 of file llflexibleobject.cpp.

References mAttributes, LLNetworkData::PARAMS_FLEXIBLE, and setAttributesOfAllSections().

void LLVolumeImplFlexible::onSetScale ( const LLVector3 scale,
BOOL  damped 
) [virtual]

Implements LLVolumeInterface.

Definition at line 625 of file llflexibleobject.cpp.

References setAttributesOfAllSections().

void LLVolumeImplFlexible::onSetVolume ( const LLVolumeParams volume_params,
const S32  detail 
) [virtual]

Implements LLVolumeInterface.

Definition at line 241 of file llflexibleobject.cpp.

void LLVolumeImplFlexible::onShift ( const LLVector3 shift_vector  )  [virtual]

Implements LLVolumeInterface.

Definition at line 90 of file llflexibleobject.cpp.

References FLEXIBLE_OBJECT_MAX_SECTIONS, and mSection.

void LLVolumeImplFlexible::remapSections ( LLFlexibleObjectSection source,
S32  source_sections,
LLFlexibleObjectSection dest,
S32  dest_sections 
) [private]

Definition at line 106 of file llflexibleobject.cpp.

References B, lerp(), LLFlexibleObjectSection::mAxisRotation, LLFlexibleObjectSection::mDirection, LLFlexibleObjectSection::mdPosition, LLViewerObject::mDrawable, LLFlexibleObjectSection::mPosition, LLFlexibleObjectSection::mRotation, LLFlexibleObjectSection::mScale, LLVector3::mV, LLFlexibleObjectSection::mVelocity, mVO, S32, LLVector3::setVec(), slerp(), t, VZ, and LLVector3::zero.

Referenced by doFlexibleUpdate(), and setAttributesOfAllSections().

void LLVolumeImplFlexible::setAttributesOfAllSections (  )  [private]

Definition at line 192 of file llflexibleobject.cpp.

References F_PI, getAnchorPosition(), getFrameRotation(), LLVolume::getParams(), LLVolumeParams::getPathParams(), LLPrimitive::getVolume(), i, lerp(), LLFlexibleObjectSection::mAxisRotation, LLFlexibleObjectSection::mDirection, LLFlexibleObjectSection::mdPosition, LLViewerObject::mDrawable, mInitializedRes, LLFlexibleObjectSection::mPosition, LLFlexibleObjectSection::mScale, mSection, mSimulateRes, LLVector2::mV, LLVector3::mV, LLFlexibleObjectSection::mVelocity, mVO, params, remapSections(), S32, LLQuaternion::setQuat(), LLVector3::setVec(), LLVector2::setVec(), t, VX, VY, and LLVector3::z_axis.

Referenced by doIdleUpdate(), onParameterChanged(), and onSetScale().

void LLVolumeImplFlexible::setCollisionSphere ( LLVector3  position,
F32  radius 
)

Definition at line 683 of file llflexibleobject.cpp.

References mCollisionSpherePosition, mCollisionSphereRadius, and p.

void LLVolumeImplFlexible::setParentPositionAndRotationDirectly ( LLVector3  p,
LLQuaternion  r 
)

Definition at line 99 of file llflexibleobject.cpp.

References mParentPosition, mParentRotation, p, and r.

void LLVolumeImplFlexible::setRenderingCollisionSphere ( bool  r  ) 

Definition at line 698 of file llflexibleobject.cpp.

void LLVolumeImplFlexible::setUsingCollisionSphere ( bool  u  ) 

Definition at line 692 of file llflexibleobject.cpp.

void LLVolumeImplFlexible::updateRelativeXform (  )  [virtual]

Implements LLVolumeInterface.

Definition at line 753 of file llflexibleobject.cpp.

References f, LLMatrix4::initRows(), LLViewerObject::mDrawable, LLVOVolume::mRelativeXform, LLVOVolume::mRelativeXformInvTrans, LLVector3::mV, mVO, LLVector3::normVec(), LLMatrix3::setRows(), VX, VY, and VZ.


Member Data Documentation

LLVector3 LLVolumeImplFlexible::mAnchorPosition [private]

Definition at line 120 of file llflexibleobject.h.

LLFlexibleObjectData* LLVolumeImplFlexible::mAttributes [private]

Definition at line 127 of file llflexibleobject.h.

Referenced by doFlexibleUpdate(), doIdleUpdate(), getEndPosition(), getNodePosition(), and onParameterChanged().

LLVector3 LLVolumeImplFlexible::mCollisionSpherePosition [private]

Definition at line 133 of file llflexibleobject.h.

Referenced by setCollisionSphere().

F32 LLVolumeImplFlexible::mCollisionSphereRadius [private]

Definition at line 134 of file llflexibleobject.h.

Referenced by setCollisionSphere().

U32 LLVolumeImplFlexible::mFrameNum [private]

Definition at line 132 of file llflexibleobject.h.

Referenced by LLVolumeImplFlexible().

U32 LLVolumeImplFlexible::mID [private]

Definition at line 135 of file llflexibleobject.h.

Referenced by doIdleUpdate(), getID(), and LLVolumeImplFlexible().

BOOL LLVolumeImplFlexible::mInitialized [private]

Definition at line 125 of file llflexibleobject.h.

Referenced by doFlexibleUpdate(), doIdleUpdate(), and LLVolumeImplFlexible().

S32 LLVolumeImplFlexible::mInitializedRes [private]

Definition at line 129 of file llflexibleobject.h.

Referenced by LLVolumeImplFlexible(), and setAttributesOfAllSections().

LLQuaternion LLVolumeImplFlexible::mLastFrameRotation [private]

Definition at line 123 of file llflexibleobject.h.

Referenced by doUpdateGeometry().

LLQuaternion LLVolumeImplFlexible::mLastSegmentRotation [private]

Definition at line 124 of file llflexibleobject.h.

Referenced by doFlexibleUpdate(), and getEndRotation().

LLVector3 LLVolumeImplFlexible::mParentPosition [private]

Definition at line 121 of file llflexibleobject.h.

Referenced by setParentPositionAndRotationDirectly().

LLQuaternion LLVolumeImplFlexible::mParentRotation [private]

Definition at line 122 of file llflexibleobject.h.

Referenced by setParentPositionAndRotationDirectly().

S32 LLVolumeImplFlexible::mRenderRes [private]

Definition at line 131 of file llflexibleobject.h.

Referenced by doFlexibleUpdate(), doIdleUpdate(), and LLVolumeImplFlexible().

LLFlexibleObjectSection LLVolumeImplFlexible::mSection[(1<< FLEXIBLE_OBJECT_MAX_SECTIONS)+1] [private]

Definition at line 128 of file llflexibleobject.h.

Referenced by doFlexibleUpdate(), getEndPosition(), getNodePosition(), onShift(), and setAttributesOfAllSections().

S32 LLVolumeImplFlexible::mSimulateRes [private]

Definition at line 130 of file llflexibleobject.h.

Referenced by doFlexibleUpdate(), doIdleUpdate(), LLVolumeImplFlexible(), and setAttributesOfAllSections().

LLTimer LLVolumeImplFlexible::mTimer [private]

Definition at line 119 of file llflexibleobject.h.

Referenced by doFlexibleUpdate().

BOOL LLVolumeImplFlexible::mUpdated [private]

Definition at line 126 of file llflexibleobject.h.

Referenced by doFlexibleRebuild(), doFlexibleUpdate(), doUpdateGeometry(), and LLVolumeImplFlexible().

LLViewerObject* LLVolumeImplFlexible::mVO [private]

Definition at line 118 of file llflexibleobject.h.

Referenced by doFlexibleRebuild(), doFlexibleUpdate(), doIdleUpdate(), doUpdateGeometry(), getAnchorPosition(), getFramePosition(), getFrameRotation(), remapSections(), setAttributesOfAllSections(), and updateRelativeXform().

F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f [static]

Definition at line 147 of file llflexibleobject.h.

Referenced by doIdleUpdate(), LLFlexLODListener::handleEvent(), and saved_settings_to_globals().


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