Ball and Spring Toy
Ian Parberry's "Introduction to Game Physics"
Functions
Point.cpp File Reference

Code for the point class CPoint. More...

#include "Point.h"
#include "Renderer.h"
#include "ComponentIncludes.h"

Functions

void VerletBounce (float &oldpos, float &pos, float d)
 

Function Documentation

◆ VerletBounce()

void VerletBounce ( float &  oldpos,
float &  pos,
float  d 
)

One-dimensional Verlet bounce. This function moves the point to its position at TOI and reflects its velocity by reflecting the old position.

Parameters
oldposOld position.
posCurrent position.
dSigned distance to move to position at TOI.