Skip to main content
00:00/00:00
Lecture 30 of 192

Concluding our JavaScript Vector Class

Download Course (Free)

Course Content

0 / 192 completed
Section 1: Course Curriculum192 videos

How to Take this Course

2m

A Quick Review of Vector Math

3m

Introduction & Learning Outcomes

21m

What is Game Physics

12m

Using the P5js Web Editor

6m

Visualizing Errors in the Web Editor

1m

Coding a Vec2 Class

7m

Vector & Scalar Quantities

31m

Vector Magnitude

20m

Vector Equality

6m

Vector Addition & Subtraction

22m

Scaling Vectors

7m

Methods for Vector Addition & Subtraction

7m

Static Methods

4m

Applications of Vector Addition & Subtraction

15m

Is the Dot Product Commutative

7m

Dot Product

27m

Cross Product

24m

Coding the Cross Product Method

6m

Exercise Perpendicular 2D Vector

8m

Perpendicular 2D Vector

5m

Vec3 Methods

5m

Exercise Vec3 Methods

4m

Coding the Normalization Method

3m

Vector Normalization

16m

Scaling, Translating, and Rotating Vectors

20m

Quick Review of Sine & Cosine

19m

Vector Rotation Proof (y-component)

16m

Coding the Vec2 Rotate Method

11m

Concluding our JavaScript Vector Class

5mNow Playing

Vector Rotation Proof (x-component)

45m

Vec2 C++ Header File

7m

Vec2 Operator Overloading

15m

A Quick Look at C++ Vec2 Syntax

19m

Technologies & Dependencies

18m

Folder Structure

31m

Compiling using GCC & Linux

9m

Makefile

4m

Initial Project Files

20m

Configuring Visual Studio on Windows

15m

Particle Class

11m

Particle Velocity

7m

Introduction to Particle Physics

29m

Using the + Operator to Add Vectors

3m

Clamping Invalid DeltaTime Values

3m

Controlling our Framerate

26m

Framerate Independent Movement

23m

Moving in a Constant Velocity

15m

Keeping the Particle Inside the Window

12m

Constant Acceleration

9m

Changing the Particle's Velocity

16m

Particle Integrate Function

4m

Discrete vs. Continuous

31m

Different Integration Methods

22m

Integration & Movement Simulation

36m

Applying Forces to Particles

31m

Function to Add Force

8m

Particles with Different Mass

12m

The Weight Force

17m

Inverse of the Mass

4m

Applying Forces with the Keyboard

5m

Drag Force Function

13m

Drag Force

35m

Unexpected Drag Behavior

2m

Handling Mouse Clicks with SDL

4m

Friction Force

20m

Friction Force Function

8m

Gravitational Attraction Force Function

16m

Gravitational Attraction Force

31m

Spring Force

35m

Spring Force Function

18m

Exercise Spring Forces

15m

Multiple Particles Chain

17m

Multiple Particles Soft body

13m

Soft Bodies & Verlet Integration

21m

Rigid-Bodies

20m

Shapes

15m

Shape Class

6m

Shape Class Implementation

16m

Angular Velocity & Angular Acceleration

22m

Circle Shape

11m

Torque & Moment of Inertia

36m

Circle Shape Angular Motion

20m

Box Vertices

24m

Local Space vs. World Space

21m

Body Update Function

4m

Why Not a Shape Draw Function

7m

No Draw Method in the Shape Class

5m

Circle-Circle Collision Detection

23m

Circle-Circle Collision Class

15m

Circle-Circle Collision Implementation

10m

Collision Contact Information

22m

Implementing the Projection Method

5m

Collision Information Code

29m

Broad Phase & Narrow Phase

28m

Objects with Infinite Mass

14m

The Projection Method

29m

Impulse Method & Momentum

20m

Impulse

21m

Simplifying the Impulse Method Formula

28m

Is Linear Collision Response Enough

14m

Coding the Linear Impulse Method

16m

Deriving the Linear Impulse Formula

54m

AABB Collision Detection

26m

Polygon-Polygon Collision Code

15m

Finding Minimum Separation with SAT

29m

SAT Separating Axis Theorem

39m

Code to Find SAT Minimum Separation

28m

Refactoring the SAT Separation Function

7m

Finding Extra Collision Information with SAT

13m

Polygon-Polygon Collision Information

14m

Linear & Angular Velocity At Point

28m

Computing Linear & Angular Impulse

26m

Post-Collision Velocity At Point

33m

Collision Distance Vectors Ra-Rb

18m

D Cross Product Simplification

15m

Coding the Impulse Along Normal

15m

Friction Impulse Along Tangent

13m

Exercise Impulse Along Tangent

23m

Removing Window Boundaries Check

6m

Circle-Polygon Collision Detection

14m

Finding Polygon's Nearest Edge with Circle

6m

Exercise Circle-Polygon Edge Regions

8m

Circle-Polygon Collision Information

26m

Circle-Polygon Collision Resolution

11m

Polygon with Multiple Vertices

6m

Exercise Polygons with Multiple Vertices

23m

Rendering Circle Texture

11m

Loading SDL Textures

14m

World Class

15m

Implementing World Functions

20m

Refactoring Function to Update Vertices

10m

Local Solvers vs. Global Solvers

17m

A Naive Iterative Positional Correction

26m

Constrained Rigid-Body Physics

40m

Example Velocity Constraint & Bias Factor

12m

Position vs. Velocity Constraints

33m

Example Distance Constraint & Bias Factor

8m

The Constraint Class

6m

Constraint Forces & Constrained Movement

33m

VecN Class

17m

Force-Based vs. Impulse-Based Constraints

39m

Implementing VecN Functions

8m

VecN Operator Overloading

9m

Matrices

18m

MatMN Class

9m

Matrix Transpose

10m

Matrix Multiplication

24m

Matrix Multiplication Function

4m

Seeing Beyond the Matrix

10m

Constraint Class Inheritance

7m

Generalized Velocity Constraint

42m

Solving Violated Velocity Constraints

36m

Distance Constraint

39m

Joint Constraint Class

8m

Converting World Space to Local Space

6m

World List of Constraints

15m

Refactoring Body Update

27m

Populating the Distance Jacobian

13m

Deriving the Distance Jacobian

46m

Gauss-Seidel Method

6m

Constrained Pendulum

13m

Solving System of Equations (Ax=b)

28m

Solving System of Constraints Iteratively

24m

Adding the Bias Term

8m

Warm Starting

29m

Ragdoll with Joint Constraints

16m

Preventing NaN Errors

4m

Penetration Constraint

26m

Deriving the Penetration Jacobian

20m

Solving Penetration Constraints

7m

Penetration Constraint Class

31m

Penetration Warm Starting

6m

Penetration Constraint Friction

16m

Clamping Friction Magnitude Values

8m

Penetration Constraint Bounciness

11m

Unstable Stack of Boxes

20m

Allowing for Multiple Contact Points

22m

Reference & Incident Edges

17m

Finding Incident Edge

25m

Getting Ready for Clipping

22m

Clipping Function

18m

Testing Multi-Contact Boxes

5m

Testing Multiple Objects & Constraints

20m

Broad & Narrow Split

6m

Continuous Collision Detection

14m

Contact Caching

28m

Euler Integration Review

47m

MidPoint & RK4 Integrators

30m

Stick Constraints

44m

Verlet Integration

39m

Conclusion & Next Steps

27m