81 int32 actionCount =
b2Max(1, e_actorCount >> 2);
83 for (
int32 i = 0; i < actionCount; ++i)
278 int32 choice = rand() % 20;
322 Actor* bruteActor = NULL;
336 bruteOutput = output;
341 if (bruteActor != NULL)
bool MoveProxy(int32 proxyId, const b2AABB &aabb1, const b2Vec2 &displacement)
b2Vec2 lowerBound
the lower vertex
void DrawPoint(const b2Vec2 &p, float size, const b2Color &color) override
Draw a point.
void Keyboard(int key) override
B2_API bool b2TestOverlap(const b2Shape *shapeA, int32 indexA, const b2Shape *shapeB, int32 indexB, const b2Transform &xfA, const b2Transform &xfB)
Determine if two generic shapes overlap.
b2RayCastOutput m_rayCastOutput
float RayCastCallback(const b2RayCastInput &input, int32 proxyId)
float RandomFloat()
Random number in range [-1,1].
bool QueryCallback(int32 proxyId)
bool RayCast(b2RayCastOutput *output, const b2RayCastInput &input) const
b2Vec2 GetCenter() const
Get the center of the AABB.
Color for debug drawing. Each value has the range [0,1].
void DestroyProxy(int32 proxyId)
Destroy a proxy. This asserts if the id is invalid.
void RayCast(T *callback, const b2RayCastInput &input) const
void * GetUserData(int32 proxyId) const
void Set(float x_, float y_)
Set this vector to some specified coordinates.
Actor m_actors[e_actorCount]
void Set(float rIn, float gIn, float bIn, float aIn=1.0f)
int32 CreateProxy(const b2AABB &aabb, void *userData)
Create a proxy. Provide a tight fitting AABB and a userData pointer.
T b2Clamp(T a, T low, T high)
void Query(T *callback, const b2AABB &aabb) const
An axis aligned bounding box.
void GetRandomAABB(b2AABB *aabb)
void MoveAABB(b2AABB *aabb)
void Step(Settings &settings) override
int RegisterTest(const char *category, const char *name, TestCreateFcn *fcn)
static int min(int n1, int n2)
void DrawString(int x, int y, const char *string,...)
void DrawAABB(b2AABB *aabb, const b2Color &color)
double max(double a, double b)
b2RayCastInput m_rayCastInput
void DrawSegment(const b2Vec2 &p1, const b2Vec2 &p2, const b2Color &color) override
Draw a line segment.
b2Vec2 upperBound
the upper vertex