![]() |
Box2D Joint Toy
Ian Parberry's "Introduction to Game Physics"
|
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... | |
Code for the ramp class CRamp.
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).
p | Array of 2D points. |
n | Number of points in a. |
w | Double the distance to move the points in X direction. |
h | Double the distance to move the points in Y direction. |