2.1 Manual Errata

Please post any errors or feedback on the 2.1 C++ manual in this thread.
Under "Pulley Joint" in the 2.1.0 manual, it should read:

jointDef.maxLengthA = 18.0f;

jointDef.maxLengthB = 20.0f;

instead of:

jointDef.maxLength1 = 18.0f;

jointDef.maxLength2 = 20.0f;

Thanks,

Cameron
🙂
Under title "Exploring the world", the example (and parts of the example under it):

for (b2Body* b = myWorld->GetBodyList(); b; b = b->GetNext())
{
b->WakeUp();
}

Is out-of-date as "WakeUp()" has been replaced with the effect "awake = true" and is associated b2BodyDef and no longer b2Body*.

Thanks,

Cameron
6.2 Fixture Creation
> Density
"The mass of a body is automatically adjusted when you "

The phrase is incomplete...
b2Body::CreateFixture wont take a shape object without a mass argument. Section 2.2 "Creating a ground box"

Code:
b2PolygonShape groundBox;
groundBox.SetAsBox(50.0f, 10.0f);
groundBody->CreateFixture(&groundBox);


P.S. Great work on the new version!

Cheers
Compiling with gcc 😮

/Box2D/Dynamics/b2Body.cpp:470:2: warning: no newline at end of file

./Box2D/Dynamics/Contacts/b2TOISolver.cpp: In constructor ‘b2TOISolver::b2TOISolver(b2StackAllocator*)’:
./Box2D/Dynamics/Contacts/b2TOISolver.cpp:41: warning: converting to non-pointer type ‘int’ from NULL
In section 9.5 Contact Filtering

Code:
bool b2ContactFilter::ShouldCollide(b2Shape* shape1, b2Shape* shape2)
{
   const b2FilterData& filter1 = shape1->GetFilterData();
   const b2FilterData& filter2 = shape2->GetFilterData();
   ...
}


should be

Code:
bool b2ContactFilter::ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB)
{
   const b2Filter& filter1 = fixtureA->GetFilterData();
   const b2Filter& filter2 = fixtureB->GetFilterData();
   ...
}
inline b2Shape* b2Fixture::GetShape()
{
return m_shape;
}

sometimes tries to return m_shape when m_shape's address is NULL
dTwizy wrote:
inline b2Shape* b2Fixture::GetShape()
{
return m_shape;
}

sometimes tries to return m_shape when m_shape's address is NULL


Is this an error in the manual or a bug in the library? This topic is for errors in the manual.

If you found a bug, please file an issue here: http://code.google.com/p/box2d/issues/list
Under 8.4 Using Joints:

Quote:
First of all, you can get the bodies, anchor points, and user data from a joint.
b2Body* GetBody1();
b2Body* GetBody2();
b2Vec2 GetAnchor1();
b2Vec2 GetAnchor2();

should be
Quote:
First of all, you can get the bodies, anchor points, and user data from a joint.
b2Body* GetBodyA();
b2Body* GetBodyB();
b2Vec2 GetAnchorA();
b2Vec2 GetAnchorB();

Original thread: https://box2d.org/forum/viewtopic.php?t=4767