Premium Only Content
Operator Overloading (Custom Vector Class) - C++ in 2021
In this lesson, we create an implementation of our own Vector class! We do so in the context of learning operator overloading including:
Vector Addition
Vector Subtraction
Vector * Scalar
Vector / Scalar
Comparison Operators
Conversion Operators
OStream operator
Type wrapping builtin functions
In the end, we'll have a class implementation that will be usable in your own game projects!
Professional C++ by Marc Gregoire: https://amzn.to/3eVMlaU
Chapters:
0:00 Intro
0:35 Follow ups from last lesson
2:50 Code Cleanup
3:55 Create Vector3 class
5:18 THEORY - Operator Overloading
16:50 +(addition) Operator
19:00 - (substraction) Operator
19:50 ostream operator
22:37 First usage / test
25:08 Vector * Scalar (Multiplication) operator (RHS)
26:05 Vector / Scalar (Division) operator (RHS)
27:37 Changing your Left Hand Operand (Multiplication)
29:50 Comparison Operator Overloads
35:00 (BONUS) Type wrapping for overloading builtin types
-
1:37:39
Ozzadar - Game Development
3 years agoVulkan Vertex + Index Buffers | Cross Platform Game Engine Development
832 -
2:14:08
Barry Cunningham
8 hours agoLIVE BREAKING NEWS: President Trump Addresses The Nation! And More News!
58.8K24 -
5:15:27
ThatStarWarsGirl
10 hours agoTSWG LIVE: Discussing STAR WARS News with Special Guest Star Wars Theory!
41.1K4 -
2:42:40
Laura Loomer
8 hours agoEP162: LIVE: President Trump Addresses The Nation
59.6K29 -
1:32:05
Adam Does Movies
13 hours ago $9.19 earnedRob Reiner Films + Movie News + AMA - Live!
37K1 -
47:57
Professor Nez
12 hours ago🚨LIVE NOW: President Trump Addresses the Nation from the Oval Office
39.8K39 -
28:17
The White House
8 hours agoPresident Trump Delivers an Address to the Nation
97K148 -
4:44:53
Drew Hernandez
1 day agoTRUMP ADDRESSES THE NATION & BONGINO ANNOUNCES FBI DEPARTURE?
70.9K27 -
2:37:30
Badlands Media
19 hours agoBadlands Media Special Coverage - MY FELLOW AMERICANS the Alpha Warrior Show & Redpill Project
74.7K41 -
22:54
Jasmin Laine
14 hours agoMedia MELTS DOWN as Poilievre Surges—Ottawa Loses Control of the Narrative
35.5K20