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 -
LIVE
BubbaMatt
10 hours agoMafia Definitive Edition Playthrough - Part 5
181 watching -
51:25
Donald Trump Jr.
2 hours agoAmerica First in Action, All the Latest News | TRIGGERED Ep.278
94.1K94 -
1:02:48
BonginoReport
4 hours agoChristianity Is Under Attack - Nightly Scroll w/ Hayley Caronia (Ep.144)
39.1K42 -
LIVE
JdaDelete
1 hour agoHollow Knight: Silksong - Steel Soul [Permadeath]
36 watching -
LIVE
FLRG
1 hour agoFLRG LIVE ROAD TO 2015 FOLLOWERS
4 watching -
1:05:10
The Nick DiPaolo Show Channel
4 hours agoKirk Assassination Theories Abound! | The Nick Di Paolo Show #1795
27.4K27 -
LIVE
Focus_Up
47 minutes agoGrinding resurgence ranked!! Playing with Subscribers!! Lets have some fun!!!
253 watching -
LIVE
Chrono
1 hour agoSplat-Tasks 2 - Splatoon but with more Rules
252 watching -
41:09
Katie Miller Pod
17 hours ago $0.95 earnedEpisode 8 - Adena Friedman | The Katie Miller Podcast
16.8K