Box2D Joint Toy
Ian Parberry's "Introduction to Game Physics"
Functions
Ramp.cpp File Reference

Code for the ramp class CRamp. More...

#include "Ramp.h"
#include "GameDefines.h"
#include "ObjectManager.h"
#include "Renderer.h"
#include "ComponentIncludes.h"

Functions

void RemapPoints (b2Vec2 p[], int n, int w, int h)
 Helper function to translate an array of points from Artist World (measured in pixels from top left) to Physics WOrld (measured in Physics World units from bottom left). More...
 

Detailed Description

Code for the ramp class CRamp.

Function Documentation

◆ RemapPoints()

void RemapPoints ( b2Vec2  p[],
int  n,
int  w,
int  h 
)

Helper function to translate an array of points from Artist World (measured in pixels from top left) to Physics WOrld (measured in Physics World units from bottom left).

Parameters
pArray of 2D points.
nNumber of points in a.
wDouble the distance to move the points in X direction.
hDouble the distance to move the points in Y direction.