|
|
(75 intermediate revisions by 40 users not shown) |
Line 1: |
Line 1: |
| [http://rhysvineyards.com/backup/wines/1/cache/bapvce.html luxury bedding] [http://bowling900.com/wp-content/themes/classic/cache/eseddi.html cheap prom shoes] [http://catloversportal.com/wp-content/themes/default/img/pfnktq.html kodak digital cameras] [http://chess-tutor.com/blog/wp-content/uploads/image/jsbdpw.html delta airline flight] [http://wordofgodonline.com/wp-content/themes/default/cache/okweva.html ford tractor for sale] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/mrrhvp.html free slot] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/thitqw.html rado] [http://bowling900.com/wp-content/themes/classic/cache/quvarg.html cheap air fare] [http://californiacd.net/phpbb/images/smiles/icon/pbiniu.html personality test] [http://wordofgodonline.com/wp-content/themes/default/cache/fuufaj.html nebraska cornhuskers] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/xaornh.html wheelchairs] [http://theviolinreviews.com/yg/CSS/data/guitar/nusrfo.html bahamas cruise] [http://preciousmetalinvestment.com/gems/data/xfactor/spanob.html bvlgari] [http://cutbeach.com/images/moved/1/cache/bhprfa.html energy drinks] [http://articlecash.net/content/wp-content/themes/default/cache/xwsfjm.html usa jobs] [http://cutbeach.com/images/moved/1/cache/lpqdco.html jaguar xkr] [http://cutbeach.com/images/moved/1/cache/qsbcgl.html drapery] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/ucthfu.html loan calculator] [http://articlecash.net/content/wp-content/themes/default/cache/cqivgf.html us airway] [http://theviolinreviews.com/yg/CSS/data/guitar/irfkkd.html ejaculation] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/utphts.html water softners] [http://chess-tutor.com/blog/wp-content/uploads/image/mabtci.html download porn movie] [http://associatedarts.org/images/misc/pic/avatars/gjlnnn.html yasmin] [http://rhysvineyards.com/backup/wines/1/cache/soeeup.html online casino game] [http://rhysvineyards.com/backup/wines/1/cache/qexsuf.html cheap airline ticket last minute] [http://wordofgodonline.com/wp-content/themes/default/cache/tqngio.html personal care] [http://villa-les-roches.com/english/dining_files/tmp/cache/ghajpt.html adult gay sex] [http://catloversportal.com/wp-content/themes/default/img/crgsqb.html rattan furniture] [http://wordofgodonline.com/wp-content/themes/default/cache/cteaew.html motorcycle accessory] [http://windriders.org/images/MAW06/MAW/cache/looinn.html greeting cards] [http://bqwm.com/studentloans/wp-content/themes/default/cache/gmitst.html live chat] [http://preciousmetalinvestment.com/gems/data/xfactor/kgqqiu.html samsung phone] [http://catloversportal.com/wp-content/themes/default/img/vnixug.html topiary] [http://articlecash.net/content/wp-content/themes/default/cache/hfrrft.html recliner] [http://bowling900.com/wp-content/themes/classic/cache/jwegwk.html birthday invitations] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/mpougr.html cash] [http://catloversportal.com/wp-content/themes/default/img/pvtnpj.html dodge parts] [http://bowling900.com/wp-content/themes/classic/cache/etmmuf.html breast enlargements] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/telrsr.html designer checks] [http://preciousmetalinvestment.com/gems/data/xfactor/upnbmo.html outdoor fireplaces] [http://catloversportal.com/wp-content/themes/default/img/gbdgip.html cellular phone] [http://rhysvineyards.com/backup/wines/1/cache/cpiocg.html nokia ringtones] [http://bqwm.com/studentloans/wp-content/themes/default/cache/sorkrt.html motorola ringtone] [http://rhysvineyards.com/backup/wines/1/cache/ntxoot.html free mp3 music downloads] [http://cutbeach.com/images/moved/1/cache/bljfnx.html home buying] [http://windriders.org/images/MAW06/MAW/cache/gxebck.html halloween sexy costumes] [http://chess-tutor.com/blog/wp-content/uploads/image/sahxpd.html army] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/vxqrrf.html facials] [http://articlecash.net/content/wp-content/themes/default/cache/pojciw.html vicodin] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/fiqxwt.html wolverine] [http://bowling900.com/wp-content/themes/classic/cache/ifcmvv.html local swinger] [http://wordofgodonline.com/wp-content/themes/default/cache/wnwxir.html drug testing] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/abjook.html shakira] [http://catloversportal.com/wp-content/themes/default/img/agqkao.html bear share] [http://preciousmetalinvestment.com/gems/data/xfactor/fgvmpx.html job] [http://cutbeach.com/images/moved/1/cache/imlkdn.html chrysler 300c] [http://villa-les-roches.com/english/dining_files/tmp/cache/kxnhth.html sportsbook] [http://californiacd.net/phpbb/images/smiles/icon/uibsmr.html disney land] [http://californiacd.net/phpbb/images/smiles/icon/dntcpf.html gem stones] [http://cutbeach.com/images/moved/1/cache/tdfpts.html picture personal] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/fkhuen.html berlin] [http://preciousmetalinvestment.com/gems/data/xfactor/uakbad.html buy xenical] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/akbqge.html free t-mobile ringtones] [http://theviolinreviews.com/yg/CSS/data/guitar/javvhe.html kitchen table with bench] [http://preciousmetalinvestment.com/gems/data/xfactor/ptbbja.html alexandria minnesota real estate] [http://cutbeach.com/images/moved/1/cache/kturdp.html friend] [http://associatedarts.org/images/misc/pic/avatars/egrbvi.html christian ringtones] [http://articlecash.net/content/wp-content/themes/default/cache/qibqtg.html bars] [http://bowling900.com/wp-content/themes/classic/cache/qlvdjt.html female orgasm] [http://chess-tutor.com/blog/wp-content/uploads/image/uvcrhx.html solar outdoor lighting] [http://theviolinreviews.com/yg/CSS/data/guitar/dtcohw.html us cellular ringtones] [http://catloversportal.com/wp-content/themes/default/img/wmqtfh.html panda] [http://thepackagingsite.com/blog/wp-content/themes/classic/cache/ftuphv.html buy xanax online] [http://associatedarts.org/images/misc/pic/avatars/rjcsrx.html college scholarships] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/bngett.html brazil] [http://bqwm.com/studentloans/wp-content/themes/default/cache/xxlkln.html coupon] [http://theviolinreviews.com/yg/CSS/data/guitar/ejklsm.html movies download] [http://wordofgodonline.com/wp-content/themes/default/cache/qpetee.html bipolar disorder] [http://rhysvineyards.com/backup/wines/1/cache/qgcgxh.html norton security] [http://associatedarts.org/images/misc/pic/avatars/bqnfmg.html engine] [http://chess-tutor.com/blog/wp-content/uploads/image/nxsmmf.html bmw z8] [http://wordofgodonline.com/wp-content/themes/default/cache/iejdqp.html pool tables] [http://chess-tutor.com/blog/wp-content/uploads/image/tvoknb.html wholesale clothing] [http://bowling900.com/wp-content/themes/classic/cache/bmhbof.html motor homes] [http://preciousmetalinvestment.com/gems/data/xfactor/oojchw.html gas scooters] [http://articlecash.net/content/wp-content/themes/default/cache/omxowx.html volvo xc90 2005] [http://preciousmetalinvestment.com/gems/data/xfactor/atsvfx.html best replica watch] [http://thechowchowrevealed.com/careforchows/wp-content/themes/default/cache/cxixpx.html malaysia airline] [http://webfoxmedia.com/blog/wp-content/themes/default/tmp/jvkvff.html jet ski insurance] [http://bqwm.com/studentloans/wp-content/themes/default/cache/jsegav.html washington mutual bank home page] [http://windriders.org/images/MAW06/MAW/cache/fptfvk.html auto part] [http://articlecash.net/content/wp-content/themes/default/cache/qplunk.html dozer] [http://rhysvineyards.com/backup/wines/1/cache/eumiun.html propane generator] [http://conceptualpolymer.com/photogallery/photo7930/tmp/1/jbcjgt.html zippo] [http://windriders.org/images/MAW06/MAW/cache/axehmc.html sony] [http://cutbeach.com/images/moved/1/cache/nbauwo.html botox] [http://wordofgodonline.com/wp-content/themes/default/cache/fhhscx.html singles holiday] [http://bowling900.com/wp-content/themes/classic/cache/vvltkt.html autism aspergers] [http://villa-les-roches.com/english/dining_files/tmp/cache/bprlws.html sprint pcs] [http://windriders.org/images/MAW06/MAW/cache/qnawqf.html ford mustang gt 500] | | {{LanguageBar|title = QAngle}} |
| {| style="text-align:center"
| | |
| ! Description || Name || Value || Image || Code
| | {{toc-right}} |
| |-
| | |
| |rowspan="3"| An angular world<br />orientation in degrees. || Pitch || Y
| | '''QAngle''' is a C++ class in [[Source]] that represents a three-dimensional [[Wikipedia: Extrinsic rotations|extrinsic Tait-Bryan rotations]] following the [[Wikipedia: Right-hand rule|right-hand rule]], offset from the cardinal [[Coordinates|Z axis]]. Each QAngle contains three [[vec t]] rotation values: |
| |rowspan="3"| [[Image:Roll_pitch_yaw.gif]]
| | == == |
| |rowspan="3"| <code>QAngle(y, z, x)</code>
| | === X === |
| |-
| | '''X''' pitch +down/-up |
| | Yaw || Z
| | === Y === |
| |-
| | '''Y''' yaw +left/-right |
| | Roll || X
| | === Z === |
| |}
| | '''Z''' roll +right/-left |
| [[Category:Glossary]] [[Category:Helpers]] [[Category:Level Design]] | | |
| | <code>(-45,10,0)</code> means 45° up, 10° left and 0° roll. |
| | |
| | {{tip|The axes are sometimes called rX, rY and rZ to distinguish them from [[vector]] axes.}} |
| | |
| | {{note|Z is clamped to +/-50 for player viewangles.}} |
| | |
| | == Declaration == |
| | |
| | QAngle angMyAngle = QAngle(-45,10,0); |
| | |
| | * You could also assign to the X, Y and Z member variables separately. |
| | * The prefix <code>ang</code> (or sometimes just <code>a</code>) identifies the variable as an angle. |
| | |
| | == Orientation == |
| | |
| | To get a feeling for how a <code>QAngle([X], [Y], [Z])</code> works, imagine a first-person perspective: |
| | |
| | * Looking down or up corresponds to positive or negative [X] |
| | * Looking left or right corresponds to positive or negative [Y] |
| | * Tilting your head so your right or left ear faces the ground corresponds to positive or negative [Z] |
| | |
| | To relate this back to vectors and coordinates: The values of [X], [Y], and [Z] correspond to a clockwise rotation (in degrees) around the [[Coordinates|absolute axes]]{{confirm}} y, z, and x, respectively. |
| | |
| | "Clockwise rotation" in an axis assumes the viewer is located at the origin looking in the positive direction of said axis. |
| | |
| | === Naming Conventions === |
| | |
| | Different fields use different naming conventions to describe these angles. To clear up any conflicting terms, short explanations are included below. Source Engine seems to draw its lingo from Aerospace Engineering. |
| | |
| | '''Aerospace Engineering''' |
| | |
| | {{Expand|When imagining a plane, pitch moves the nose up and down, yaw moves the nose left and right, and roll causes one wing to move up and the other wing to move down. |
| | [[Wikipedia: Aircraft principal axes|In Aerospace Engineering]], this system is also referred to as Euler angles if — unlike QAngles — the axes rotate along. See "Mathematics" for clarification.}} |
| | |
| | '''Mathematics''' |
| | |
| | {{Expand| Strictly speaking, QAngles would be defined as [[Wikipedia: Extrinsic rotations|extrinsic Tait-Bryan rotations]] following the [[Wikipedia: Right-hand rule|right-hand rule]]. The terms "Tait-Bryan angles" and "Euler angles" are sometimes used interchangeably however. Breaking down this name into digestible chunks: |
| | |
| | * The difference between [[Wikipedia: Extrinsic rotations|intrinsic and extrinsic rotations]], is that with the former, each rotation shifts the axes along with it |
| | * The difference between [[Wikipedia: Euler angles|proper Euler angles and Tait-Bryan angles]], is that the former rotates twice around one axis and once around another (alternatingly), while the latter rotates once around all three axes |
| | * The [[Wikipedia: right-hand rule|right-hand rule]] states that if the thumb of one's right hand is pointing along the positive direction of an axis, their other fingers will curl in the positive direction of rotation |
| | |
| | {{tip|Since many conflicting definitions are used in rotation, being explicit when it comes to naming can help avoid confusion}} }} |
| | |
| | == Converting from Vector == |
| | |
| | As there is no specific [[Data Descriptions#DEFINE FIELD|datadesc keyfield]] for angles, one chosen in Hammer will arrive as a [[vector]]. Its ordinates will represent degrees of rotation and not coordinates so it must be fixed up before use: |
| | |
| | <source lang=cpp> |
| | QAngle angMyAngle = QAngle(vecFromHammer.x, vecFromHammer.y, vecFromHammer.z); |
| | |
| | // Conversion back to a vector, if required |
| | AngleVectors(angMyAngle, &vecFromHammer);</source> |
| | |
| | == Presence == |
| | |
| | * SP 2013 ([https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/public/mathlib/vector.h#L1661 blob] [https://github.com/ValveSoftware/source-sdk-2013/blob/master/sp/src/public/mathlib/vector.h#L1661 master]) |
| | * MP 2013 ([https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/public/mathlib/vector.h#L1661 blob] [https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/public/mathlib/vector.h#L1661 master]) |
| | |
| | == See also == |
| | |
| | * [[Wikipedia:Yaw, pitch, and roll]] |
| | * [[getpos]] |
| | * [[Vector]] and [[Coordinates]] |
| | * [[AngleVectors()|<code>AngleVectors()</code> / <code>VectorAngles()</code>]] |
| | |
| | [[Category:Source class]] |
| | [[Category:Glossary]] |
| | [[Category:Variables]] |
QAngle is a C++ class in Source that represents a three-dimensional extrinsic Tait-Bryan rotations following the right-hand rule, offset from the cardinal Z axis. Each QAngle contains three vec t rotation values:
X
X pitch +down/-up
Y
Y yaw +left/-right
Z
Z roll +right/-left
(-45,10,0)
means 45° up, 10° left and 0° roll.
Tip:The axes are sometimes called rX, rY and rZ to distinguish them from vector axes.
Note:Z is clamped to +/-50 for player viewangles.
Declaration
QAngle angMyAngle = QAngle(-45,10,0);
- You could also assign to the X, Y and Z member variables separately.
- The prefix
ang
(or sometimes just a
) identifies the variable as an angle.
Orientation
To get a feeling for how a QAngle([X], [Y], [Z])
works, imagine a first-person perspective:
- Looking down or up corresponds to positive or negative [X]
- Looking left or right corresponds to positive or negative [Y]
- Tilting your head so your right or left ear faces the ground corresponds to positive or negative [Z]
To relate this back to vectors and coordinates: The values of [X], [Y], and [Z] correspond to a clockwise rotation (in degrees) around the absolute axes[confirm] y, z, and x, respectively.
"Clockwise rotation" in an axis assumes the viewer is located at the origin looking in the positive direction of said axis.
Naming Conventions
Different fields use different naming conventions to describe these angles. To clear up any conflicting terms, short explanations are included below. Source Engine seems to draw its lingo from Aerospace Engineering.
Aerospace Engineering
When imagining a plane, pitch moves the nose up and down, yaw moves the nose left and right, and roll causes one wing to move up and the other wing to move down.
In Aerospace Engineering, this system is also referred to as Euler angles if — unlike QAngles — the axes rotate along. See "Mathematics" for clarification.
|
Mathematics
Strictly speaking, QAngles would be defined as extrinsic Tait-Bryan rotations following the right-hand rule. The terms "Tait-Bryan angles" and "Euler angles" are sometimes used interchangeably however. Breaking down this name into digestible chunks:
- The difference between intrinsic and extrinsic rotations, is that with the former, each rotation shifts the axes along with it
- The difference between proper Euler angles and Tait-Bryan angles, is that the former rotates twice around one axis and once around another (alternatingly), while the latter rotates once around all three axes
- The right-hand rule states that if the thumb of one's right hand is pointing along the positive direction of an axis, their other fingers will curl in the positive direction of rotation
Tip:Since many conflicting definitions are used in rotation, being explicit when it comes to naming can help avoid confusion
|
Converting from Vector
As there is no specific datadesc keyfield for angles, one chosen in Hammer will arrive as a vector. Its ordinates will represent degrees of rotation and not coordinates so it must be fixed up before use:
QAngle angMyAngle = QAngle(vecFromHammer.x, vecFromHammer.y, vecFromHammer.z);
// Conversion back to a vector, if required
AngleVectors(angMyAngle, &vecFromHammer);
Presence
See also