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
792 -
8:38
MattMorseTV
12 hours ago $4.49 earnedThis is CATASTROPHIC for the Dems.
11.2K10 -
19:54
Forrest Galante
2 days agoPrivate Tour Of America's Best Marine Animal Facility
69.7K9 -
2:59:11
Side Scrollers Podcast
18 hours agoDEI’s FINAL BOSS EXPOSED + Book Publisher REVERSES Cancel Attempt + More | Side Scrollers
49.8K18 -
23:00
The Pascal Show
9 hours ago $0.93 earnedCANDACE EXPOSES TEXTS! Candace Owens Shows Proof Charlie Kirk Was B*llied By Donors Before His Death
4.08K -
1:31:37
The HotSeat
13 hours agoBondi On The Hill + Equitable Grading? We Are Failing Our KIDS!
26.2K5 -
6:05
Spooky Grandpa's Scary Stories
1 month agoTHE HARVEST MAN (Halloween, Horror, Folklore, Supernatural, Paranormal)
5.5K7 -
LIVE
Lofi Girl
2 years agoSynthwave Radio 🌌 - beats to chill/game to
232 watching -
1:02:11
DeVory Darkins
12 hours ago $35.50 earnedDemocrats suffers ANNIHILATION during heated hearing with Bondi as Jack Smith bombshell drops
157K107 -
3:00:07
Price of Reason
12 hours agoJoe Rogan & Theo Von TURN on Trump? Hollywood to STOP Lecturing Viewers? Ghost of Yotei FIASCO!
60.8K8