Difference between revisions of "Advanced C++ Programming Tutorial 4"

From Chilipedia
Jump to: navigation, search
(Video Timestamp Index)
Line 25: Line 25:
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==
 
* [https://youtu.be/uHPl5pwAtFE Tutorial 4.1]
 
* [https://youtu.be/uHPl5pwAtFE Tutorial 4.1]
 +
* Proper definition of an angle [https://youtu.be/uHPl5pwAtFE?t=0m55s 0:55]
 +
 
* [https://youtu.be/DLqfgxux-c8 Tutorial 4.2]
 
* [https://youtu.be/DLqfgxux-c8 Tutorial 4.2]
 
* [https://youtu.be/IQ_lT0NSwkk Tutorial 4.3]
 
* [https://youtu.be/IQ_lT0NSwkk Tutorial 4.3]

Revision as of 04:48, 9 April 2020

Why don't you sit on this and rotate? Oh you don't know how? Well allow me to elucidate. Srsly tho, rotation math is pretty damn important shit, so pay attention.

Topics

Part 1

  • Angles, degrees, radians, and π
  • Sine, cosine, and the unit circle
  • Arcsin, arccos
  • SOH-CAH-(TOA)

Part 2

  • Derivation of rotation formula: arcsin/arccos
  • Angle sum theorem (trig identity)
  • Derivation of rotation formula: angle sum theorem
  • Derivation of rotation formula: vector derivation
  • Using rotation to solve A3 homework (rotate to get plank normal)

Part 3

  • Vec2 rotation functions
  • Basic rotation of model
  • Implementing rotation into Drawable pipeline
  • Optimizing pipeline for rotation

Notes / Errata

  • In Tutorial 4.3, on screen the return statement is missing from the star generation code as shown on screen. It is added off screen.
  • The code for the animation (either end of 4.3 or end of homework), there is a member variable for time that is not initialized. This can cause sporatic problems, especially in debug mode (it often works fine in release, just depends on what happens to be in that spot in memory). This is fixed in a future video.

Video Timestamp Index

Links

  • GitHub Repo (advmath)
  • Note that the code for this tutorial can be found on the <starfield> branch of the repo not in <master>

Homework

Implement rotation of the camera in the world using keyboard controls (Q and E keys for rotation).

See also