|
|
(79 intermediate revisions by 40 users not shown) |
Line 1: |
Line 1: |
| [http://asie-voyages.com/upload/images/lens/lhwqca.html ase prep test] [http://tarsierfoundation.org/content/license/dukeiu.html relay 711] [http://www.hdac.org/hdfaq/faq/htfoaq.html miami detective services] [http://www.biblored.org.co/agenda_actividades/programas/images/rixddb.html madrid centro] [http://www.sedbogota.edu.co/FINANCIERA/temp/tmp/mtfcwc.html make residual income online] [http://coastguard.gov.ph/content.old/license/lhqfnm.html ipod access] [http://smallbizbohol.com/democatalog/images/baner/bwudir.html jessicas shoes] [http://coastguard.gov.ph/content.old/license/phpknk.html thai shop] [http://tch-voyages.com/documents/prague/896/llqfop.html pictures of black holes in space] [http://www.redacademica.edu.co/manejocorreo/Cliente/cache/pwxlsv.html wife upskirt] [http://tch-voyages.com/documents/prague/896/nknvsv.html kurtz matt] [http://panties-pictures.com/free/lib/temp/xcpqmj.html recipe for cooking a turkey] [http://roycemotor.com/carpics/cache/uudvdc.html trailer park boys dvd cover] [http://ankelia-nature.com/catalogues/catalogues/nerelg.html 4 day cruise hawaii honolulu] [http://talentmodeles.com/mannequin/images/cache/wbcpnr.html australasian tour] [http://cvscaft-tcc.edu.ph/gallery/uploads/cache/gafelv.html online brain puzzles] [http://www.sedbogota.edu.co/FINANCIERA/temp/tmp/rwnnmf.html jessica conner] [http://indianaoutfitters.com/s/info/tmp/rrgrse.html instead said use words] [http://ankelia-nature.com/catalogues/catalogues/soxjvh.html quorum international ltd] [http://asie-voyages.com/upload/images/lens/esrehn.html museum internship new york city] [http://smallbizbohol.com/democatalog/images/baner/qlwocc.html aol fantasy game] [http://www.sedbogota.edu.co/FINANCIERA/temp/tmp/gfxuak.html state of the union issue] [http://cvscaft-tcc.edu.ph/gallery/uploads/cache/qipgqc.html religious items wholesale] [http://bluespringsbmx.com/4IMAGES/data/media/10/tmp/qqhwtu.html receiving online credit card payment] [http://tarsierfoundation.org/content/license/dxporh.html pictures of brken hearts] [http://asie-voyages.com/upload/images/lens/khogqh.html activites kid pritable] [http://panties-pictures.com/free/lib/temp/awxvek.html mark dunning] [http://panties-pictures.com/free/lib/temp/ddnnkf.html south jersey used car dealer] [http://asie-voyages.com/upload/images/lens/hkicjn.html okc news channel 4] [http://cvscaft-tcc.edu.ph/gallery/uploads/cache/bskpwn.html 15 pic pregnancy week] [http://roycemotor.com/carpics/cache/mxhxho.html 55 gallon container] [http://tarsierfoundation.org/content/license/tdcljl.html what is rainforest] [http://talentmodeles.com/mannequin/images/cache/cvsswi.html rocking into the night lyrics] [http://ankelia-nature.com/catalogues/catalogues/bmftao.html american picture revolution soldier] [http://asie-voyages.com/upload/images/lens/mnhdcd.html apples green little] [http://www.sedbogota.edu.co/FINANCIERA/temp/tmp/aqqkpq.html personal school statement] [http://hoosierfishing.com/phpBB/images/avatars/avatar/jkudaj.html ssl enabled] [http://coastguard.gov.ph/content.old/license/kkpqun.html pearson canada airport] [http://tarsierfoundation.org/content/license/sfbndf.html international society for political psychology] [http://smallbizbohol.com/democatalog/images/baner/qxgbnl.html porsche 911 part] [http://asie-voyages.com/upload/images/lens/jujwie.html new york city gay bath house] [http://tarsierfoundation.org/content/license/gkcbua.html les deux gros] [http://tarsierfoundation.org/content/license/etogmb.html type 1 propane tank] [http://cvscaft-tcc.edu.ph/gallery/uploads/cache/bisnqm.html love to grab] [http://indianaoutfitters.com/s/info/tmp/ggkmsx.html abstract arlington search services title] [http://smallbizbohol.com/democatalog/images/baner/gqogbq.html raymond new hampshire] [http://hoosierfishing.com/phpBB/images/avatars/avatar/khgeeh.html new york state auto inspection rules] [http://hoosierfishing.com/phpBB/images/avatars/avatar/lpntao.html problem based math] [http://xuccco.org/themes/AT-Green3/jcmvwb.html wdw park ticket] [http://xuccco.org/themes/AT-Green3/vufurn.html aria movie clips] [http://www.lewakins.com/sr/images/csvgin.html optical density scanner] [http://www.biblored.org.co/agenda_actividades/programas/images/kjhrjq.html amazon woman sex] [http://tarsierfoundation.org/content/license/frncaj.html what is abused] [http://hoosierfishing.com/phpBB/images/avatars/avatar/onbods.html mayhem computers] [http://smallbizbohol.com/democatalog/images/baner/sjtnhf.html local and long distance] [http://indianaoutfitters.com/s/info/tmp/pjvitl.html play word searches online] [http://www.sedbogota.edu.co/FINANCIERA/temp/tmp/laefbr.html travel and track flight] [http://panties-pictures.com/free/lib/temp/nxsgvg.html sexual definitions] [http://lumayagrealty.com/catalog/images/pics/iddbop.html eib] [http://www.redacademica.edu.co/manejocorreo/Cliente/cache/hpunis.html mountain board shops] [http://roycemotor.com/carpics/cache/cshkts.html artificial plants australia] [http://ankelia-nature.com/catalogues/catalogues/vskouw.html service software version 4.0] [http://roycemotor.com/carpics/cache/esxbvd.html anaylsis of hamlet] [http://coastguard.gov.ph/content.old/license/whmhbx.html polk county property search] [http://www.youthfitnesssolutions.com/FTP1/page9/ipailf.html elliptical machines review] [http://xuccco.org/themes/AT-Green3/hvqihx.html kinder unterwaesche] [http://xuccco.org/themes/AT-Green3/dnemhn.html moving dot turns to green] [http://talentmodeles.com/mannequin/images/cache/nddgud.html payday advance loan texas] [http://www.youthfitnesssolutions.com/FTP1/page9/xrivaa.html new broad street] [http://asie-voyages.com/upload/images/lens/xpfwdk.html vertigo tour 2005] [http://bluespringsbmx.com/4IMAGES/data/media/10/tmp/jdqtuq.html industrial job mpw services] [http://panties-pictures.com/free/lib/temp/fcepcn.html nokia 9210 softwares] [http://panties-pictures.com/free/lib/temp/omawjo.html robert deniro al pacino movie] [http://www.norcab.com.au/joeavatiforum/templates/cache/qmohbs.html raising baby chicks] [http://bluespringsbmx.com/4IMAGES/data/media/10/tmp/sglctc.html student technology center] [http://panties-pictures.com/free/lib/temp/dvtbva.html in nature pattern] [http://tarsierfoundation.org/content/license/uveflm.html punk band posters] [http://www.biblored.org.co/agenda_actividades/programas/images/qrtbpu.html sixth grade math] [http://roycemotor.com/carpics/cache/lqgdup.html nes emulator for the psp] [http://smallbizbohol.com/democatalog/images/baner/tkhuqf.html insurance liberty life national] [http://roycemotor.com/carpics/cache/sldfce.html process modules definition] [http://indianaoutfitters.com/s/info/tmp/nogkio.html national library of jamaica] [http://coastguard.gov.ph/content.old/license/axusmj.html king juan carlos i of spain] [http://www.lewakins.com/sr/images/ecrstq.html ted turner station] [http://xuccco.org/themes/AT-Green3/bmhisv.html erotic history photograph] [http://coastguard.gov.ph/content.old/license/gqkhhj.html pre med colleges] [http://indianaoutfitters.com/s/info/tmp/hilodn.html planar flat screens] [http://www.lewakins.com/sr/images/expiti.html samba music mp3] [http://tch-voyages.com/documents/prague/896/dwcpqv.html taking off her bikini] [http://smallbizbohol.com/democatalog/images/baner/wfojme.html michael bonner] [http://asie-voyages.com/upload/images/lens/mdwuvr.html post earings] [http://www.lewakins.com/sr/images/gramsx.html rolling stone covers posters] [http://lumayagrealty.com/catalog/images/pics/oxjxno.html mexico city zoo] [http://asie-voyages.com/upload/images/lens/ceumon.html life care centers of america corporate office] [http://talentmodeles.com/mannequin/images/cache/jvecpl.html water fountains for sale] [http://www.lewakins.com/sr/images/ikxavc.html us navy t shirts] [http://smallbizbohol.com/democatalog/images/baner/trevpu.html ragged point] [http://tch-voyages.com/documents/prague/896/wwluqw.html poured concrete wall] [http://talentmodeles.com/mannequin/images/cache/ovcjnw.html rome new york map] [http://tarsierfoundation.org/content/license/hkshci.html insane games. com]
| | {{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