|
|
(89 intermediate revisions by 42 users not shown) |
Line 1: |
Line 1: |
| [http://fnor.22web.net/text/traduire-francais/ traduire francais anglais] [http://jazzyjoe.byethost13.com/content/sweating-foot.html sweating foot] [http://jazzyjoe.byethost13.com/content/thai-shop.html thai shop] [http://antimil.uv.ro/small/speed.html speed] [http://kinkyjedi.byethost13.com/blog/futures-broker.html futures broker] [http://thedrea.uv.ro/text/satellite-broadband/ satellite broadband] [http://bervera.talk4fun.net/description/this-is/ this is my daily bread lyrics] [http://urockworld.marte.ro/countrywide-mortgage.html countrywide mortgage] [http://nymphatacita.talk4fun.net/young-katie/ young katie] [http://shadowfallen.totalh.com/data/is-in/ is in search of] [http://fnor.22web.net/text/japan-model/ japan model myspacecom site] [http://kinkyjedi.byethost13.com/blog/download-phone.html download phone ringtones] [http://urockworld.marte.ro/hand.html hand] [http://astw56.uv.ro/styles/free-weight/ free weight loss diet] [http://chuchundramc.marte.ro/view/download-drive.html download drive driver flash usb] [http://chuchundramc.marte.ro/view/amateur-teen.html amateur teen sex] [http://fnor.22web.net/text/alberta-tree/ alberta tree farms] [http://antimil.uv.ro/small/weekend-breaks.html weekend breaks] [http://kasumikawaii.byethost13.com/articles/ps-to/ ps to pdf converter free] [http://urockworld.marte.ro/days-of.html days of our lives] [http://robotqueen.uv.ro/library/yugioh-cards/ yugioh cards] [http://copperwise.byethost13.com/html/diamond-engagement.html diamond engagement rings] [http://astw56.uv.ro/styles/karaoke-downloads/ karaoke downloads mp3] [http://urockworld.marte.ro/coverletter-sample.html coverletter sample] [http://arguas.pluto.ro/lib/chaussures.html chaussures] [http://nymphatacita.talk4fun.net/wood-real/ wood real estate] [http://astw56.uv.ro/styles/wood-display/ wood display cabinet] [http://astw56.uv.ro/styles/goldwing-honda/ goldwing honda] [http://arguas.pluto.ro/lib/free-xxx.html free xxx movies] [http://arguas.pluto.ro/lib/fake-money.html fake money] [http://radicaldreamerr.byethost13.com/new/valley-ford.html valley ford st louis mo] [http://astw56.uv.ro/styles/city-furniture/ city furniture] [http://thedrea.uv.ro/text/increase-ejaculation/ increase ejaculation] [http://shadowfallen.totalh.com/data/europe-snow/ europe snow reports] [http://thedrea.uv.ro/text/woman-boot/ woman boot] [http://robotqueen.uv.ro/library/rack-room/ rack room shoes] [http://arguas.pluto.ro/lib/kitchen-island.html kitchen island design idea] [http://cykeout.byethost13.com/resources/the-moths.html the moths] [http://antimil.uv.ro/small/download-free.html download free games] [http://thedrea.uv.ro/text/texas-rangers/ texas rangers] [http://thedrea.uv.ro/text/satellite/ satellite] [http://shadowfallen.totalh.com/data/austin-real/ austin real world] [http://kinkyjedi.byethost13.com/blog/philips-ringtones.html philips ringtones] [http://uncloudedwindow.sapte.ro/data/swinger-story.html swinger story] [http://fnor.22web.net/text/zap-pro/ zap pro] [http://robotqueen.uv.ro/library/dog/ dog] [http://theeblog.22web.net/data/muscle-hunks/ muscle hunks gallery] [http://robotqueen.uv.ro/library/activex/ activex] [http://urockworld.marte.ro/local-free.html local free phone chat line] [http://theeblog.22web.net/data/pride-u/ pride u2] [http://fnor.22web.net/text/vcd-players/ vcd players downloads] [http://astw56.uv.ro/styles/lingerie-sexy/ lingerie sexy] [http://antimil.uv.ro/small/security-guard.html security guard jobs] [http://kinkyjedi.byethost13.com/blog/credit-counselors.html credit counselors] [http://astw56.uv.ro/styles/ash/ ash] [http://thedrea.uv.ro/text/topamax/ topamax] [http://copperwise.byethost13.com/html/casino-online.html casino online] [http://jazzyjoe.byethost13.com/content/lord-of.html lord of the rings sound files] [http://chuchundramc.marte.ro/view/jessica-alba.html jessica alba] [http://arguas.pluto.ro/lib/treo-ringtones.html treo ringtones] [http://robotqueen.uv.ro/library/nick-lachey/ nick lachey] [http://nymphatacita.talk4fun.net/jobs-for/ jobs for chartered accountants in uk] [http://nymphatacita.talk4fun.net/equipment-joe/ equipment joe johnson] [http://antimil.uv.ro/small/free-norton.html free norton antivirus update] [http://nymphatacita.talk4fun.net/opening-ceremony/ opening ceremony new york] [http://nymphatacita.talk4fun.net/making-flower/ making flower bouquets] [http://oktagudent.totalh.com/view/sweet-chilli/ sweet chilli sauce recipes] [http://fnor.22web.net/text/american-alpine/ american alpine club] [http://antimil.uv.ro/small/zodiac-signs.html zodiac signs] [http://shadowfallen.totalh.com/data/technical-translation/ technical translation services] [http://cykeout.byethost13.com/resources/property-damage.html property damage attorney] [http://oktagudent.totalh.com/view/iq-scales/ iq scales] [http://oktagudent.totalh.com/view/administratif/ administratif] [http://kinkyjedi.byethost13.com/blog/oxycontin.html oxycontin] [http://cykeout.byethost13.com/resources/pampering-spa.html pampering spa day] [http://oktagudent.totalh.com/view/mp-player/ mp3 player top] [http://robotqueen.uv.ro/library/download-free/ download free mp3 music] [http://astw56.uv.ro/styles/bag-chanel/ bag chanel] [http://astw56.uv.ro/styles/hair/ hair] [http://uncloudedwindow.sapte.ro/data/sex-kits.html sex kits] [http://radicaldreamerr.byethost13.com/new/las-vegas.html las vegas construction contractor] [http://radicaldreamerr.byethost13.com/new/national-organization.html national organization of black county official] [http://oktagudent.totalh.com/view/welcome-to/ welcome to peoples first] [http://nymphatacita.talk4fun.net/paper-dolls/ paper dolls dress ups] [http://chuchundramc.marte.ro/view/no-deposit.html no deposit casino] [http://astw56.uv.ro/styles/united-airline/ united airline reservations] [http://antimil.uv.ro/small/whitney-houston.html whitney houston] [http://antimil.uv.ro/small/games-free.html games free download] [http://cykeout.byethost13.com/resources/the-way.html the way to trade by john piper] [http://astw56.uv.ro/styles/vancouver-airport/ vancouver airport] [http://antimil.uv.ro/small/key-bank.html key bank] [http://copperwise.byethost13.com/html/custom-tshirts.html custom tshirts] [http://ariavaswen.22web.net/description/telegraph-forum/ telegraph forum] [http://thedrea.uv.ro/text/dr-scholls/ dr scholls] [http://antimil.uv.ro/small/disneyland-paris.html disneyland paris] [http://uncloudedwindow.sapte.ro/data/all-sex.html all sex] [http://fnor.22web.net/text/as-the/ as the grove turns] [http://kinkyjedi.byethost13.com/blog/amitriptyline-online.html amitriptyline online] [http://thedrea.uv.ro/text/mitsubishi-galant/ mitsubishi galant] [http://thedrea.uv.ro/text/relationship/ relationship] | | {{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