llquaternion.cpp File Reference

LLQuaternion class implementation. More...

#include "linden_common.h"
#include "llquaternion.h"
#include "llmath.h"
#include "v3math.h"
#include "v3dmath.h"
#include "v4math.h"
#include "m4math.h"
#include "m3math.h"
#include "llquantize.h"

Include dependency graph for llquaternion.cpp:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, const LLQuaternion &a)
LLQuaternion operator * (const LLQuaternion &a, const LLQuaternion &b)
LLVector4 operator * (const LLVector4 &a, const LLQuaternion &rot)
LLVector3 operator * (const LLVector3 &a, const LLQuaternion &rot)
LLVector3d operator * (const LLVector3d &a, const LLQuaternion &rot)
F32 dot (const LLQuaternion &a, const LLQuaternion &b)
LLQuaternion lerp (F32 t, const LLQuaternion &q)
LLQuaternion lerp (F32 t, const LLQuaternion &p, const LLQuaternion &q)
LLQuaternion slerp (F32 u, const LLQuaternion &a, const LLQuaternion &b)
LLQuaternion nlerp (F32 t, const LLQuaternion &a, const LLQuaternion &b)
LLQuaternion nlerp (F32 t, const LLQuaternion &q)
LLQuaternion slerp (F32 t, const LLQuaternion &q)
LLQuaternion mayaQ (F32 xRot, F32 yRot, F32 zRot, LLQuaternion::Order order)
const char * OrderToString (const LLQuaternion::Order order)
LLQuaternion::Order StringToOrder (const char *str)


Detailed Description

LLQuaternion class implementation.

LicenseInfo
firstyear=2000&license=viewergpl

Copyright (c) 2000-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llquaternion.cpp.


Function Documentation

F32 dot ( const LLQuaternion a,
const LLQuaternion b 
)

Definition at line 503 of file llquaternion.cpp.

References a, b, VW, VX, VY, and VZ.

Referenced by are_parallel(), LLAgent::calcCameraPositionTargetGlobal(), LLManipRotate::dragConstrained(), LLManipRotate::intersectRayWithSphere(), nlerp(), LLSnapshotLivePreview::onIdle(), LLKeyframeStandMotion::onUpdate(), LLEditingMotion::onUpdate(), ray_cylinder(), ray_sphere(), LLManipRotate::renderSnapGuides(), send_agent_update(), LLVOAvatar::updateCharacter(), LLSprite::updateFace(), and LLDrawable::updateXform().

LLQuaternion lerp ( F32  t,
const LLQuaternion p,
const LLQuaternion q 
)

Definition at line 536 of file llquaternion.cpp.

References LLQuaternion::mQ, p, r, VW, VX, VY, and VZ.

LLQuaternion lerp ( F32  t,
const LLQuaternion q 
)

Definition at line 525 of file llquaternion.cpp.

References f, LLQuaternion::mQ, r, VW, VX, VY, and VZ.

LLQuaternion mayaQ ( F32  xRot,
F32  yRot,
F32  zRot,
LLQuaternion::Order  order 
)

Definition at line 664 of file llquaternion.cpp.

References DEG_TO_RAD, f, LLQuaternion::XYZ, LLQuaternion::XZY, LLQuaternion::YXZ, LLQuaternion::YZX, LLQuaternion::ZXY, and LLQuaternion::ZYX.

Referenced by LLKeyframeMotion::deserialize(), LLPolyMeshSharedData::loadMesh(), LLBVHLoader::optimize(), LLBVHLoader::serialize(), and LLVOAvatar::setupBone().

LLQuaternion nlerp ( F32  t,
const LLQuaternion q 
)

Definition at line 611 of file llquaternion.cpp.

References lerp(), LLQuaternion::mQ, slerp(), and VW.

LLQuaternion nlerp ( F32  t,
const LLQuaternion a,
const LLQuaternion b 
)

Definition at line 599 of file llquaternion.cpp.

References a, b, dot(), f, lerp(), and slerp().

Referenced by LLKeyframeMotion::applyConstraint(), LLJointStateBlender::blendJointStates(), LLKeyframeMotion::RotationCurve::interp(), LLJointStateBlender::interpolate(), LLTargetingMotion::onUpdate(), LLHeadRotMotion::onUpdate(), LLViewerJoystick::updateCamera(), and LLDrawable::updateXform().

LLVector3d operator * ( const LLVector3d a,
const LLQuaternion rot 
)

Definition at line 489 of file llquaternion.cpp.

References a, LLQuaternion::mQ, nx, ny, nz, VW, VX, VY, and VZ.

LLVector3 operator * ( const LLVector3 a,
const LLQuaternion rot 
)

Definition at line 475 of file llquaternion.cpp.

References a, LLQuaternion::mQ, nx, ny, nz, VW, VX, VY, and VZ.

LLVector4 operator * ( const LLVector4 a,
const LLQuaternion rot 
)

Definition at line 461 of file llquaternion.cpp.

References a, LLQuaternion::mQ, nx, ny, nz, VW, VX, VY, and VZ.

LLQuaternion operator * ( const LLQuaternion a,
const LLQuaternion b 
)

Definition at line 438 of file llquaternion.cpp.

References a, and b.

std::ostream& operator<< ( std::ostream &  s,
const LLQuaternion a 
)

Definition at line 428 of file llquaternion.cpp.

References a, VW, VX, VY, and VZ.

const char* OrderToString ( const LLQuaternion::Order  order  ) 

Definition at line 694 of file llquaternion.cpp.

References NULL, p, LLQuaternion::XYZ, LLQuaternion::XZY, LLQuaternion::YXZ, LLQuaternion::YZX, LLQuaternion::ZXY, and LLQuaternion::ZYX.

LLQuaternion slerp ( F32  t,
const LLQuaternion q 
)

Definition at line 624 of file llquaternion.cpp.

References angle, c, f, LLQuaternion::mQ, r, s, VW, VX, VY, and VZ.

LLQuaternion slerp ( F32  u,
const LLQuaternion a,
const LLQuaternion b 
)

Definition at line 553 of file llquaternion.cpp.

References a, acosf, b, f, FALSE, LLQuaternion::mQ, sinf, and TRUE.

Referenced by nlerp(), LLKeyframeFallMotion::onUpdate(), LLEditingMotion::onUpdate(), LLVolumeImplFlexible::remapSections(), LLFollowCam::updateBehindnessConstraint(), and LLVOAvatar::updateCharacter().

LLQuaternion::Order StringToOrder ( const char *  str  ) 

Definition at line 722 of file llquaternion.cpp.

References LLQuaternion::XYZ, LLQuaternion::XZY, LLQuaternion::YXZ, LLQuaternion::YZX, LLQuaternion::ZXY, and LLQuaternion::ZYX.

Referenced by bvhStringToOrder(), and LLKeyframeMotion::deserialize().


Generated on Thu Jul 1 06:10:38 2010 for Second Life Viewer by  doxygen 1.4.7