Documentation for edge chain?

I keep reading about edge chains, but i can't seem to find any documentation for it.The only stuff i find is about the flash port.
Is there an edge shape class for the c++ port?
Edges are currently just 2 vertex polygons:
http://box2d.org/manual.html#_Toc258082970

There are also several examples in the testbed.
Sorry, I'm not sure if i understood you correctly. Here is what i did that didn't work:
Code:
b2BodyDef edgedef;
edgedef.position.Set(0.f,10.f);
b2Body* edge = world->CreateBody(&edgedef);
b2PolygonDef edgeshapedef;
edgeshapedef.vertices[0]=b2Vec2(0.0f, 0.0f);
edgeshapedef.vertices[1]=b2Vec2(4.0f, 4.0f);
edgeshapedef.vertexCount=2;
edge->CreateShape(&edgeshapedef);

The particular problem i am trying to solve is how to make the ground for an action adventure. If i were able to just specify some points along the ground, and then have a function draw edges between them i would be very happy.
Making lots of rotated static boxes seems unsatisfying to me. There must be a better solution.
bobbaluba wrote:
Making lots of rotated static boxes seems unsatisfying to me.

There are no boxes involved.

What version of Box2D are you using?
Jesse wrote:
bobbaluba wrote:
Making lots of rotated static boxes seems unsatisfying to me.

There are no boxes involved.

What version of Box2D are you using?

I mean't that making lots of boxes is my backup solution. The code i posted compiles, although i get runtime errors.
I downloaded box2d about one or two months ago, so i think i have a pretty recent version (i'm not at my computer now, so i can't check).

Do you have any idea why it fails? Does the code look ok? Is this how it's done in box2d? Or do you usually create worlds in other ways?
bobbaluba wrote:
Do you have any idea why it fails? Does the code look ok? Is this how it's done in box2d? Or do you usually create worlds in other ways?

You might check the source code and see if you can find a function called SetAsEdge(). If this function doesn't exist, you're most likely using an older version of Box2D, and will need to upgrade to get access to the functionality to which Erin is referring (I think).
Yup, b2PolygonDef does not exist in 2.1.x.
You we're right, of course. I had the 2.0 version.

But, finally, after several hours of trouble migrating my project from 2.0 to 2.1 i got an edge working!

Here's the code if anyone is interested:
Code:
b2BodyDef edgedef;
edgedef.position.Set(0.f,10.f);
b2Body* edge = world->CreateBody(&edgedef);

b2Vec2 vertices[2];
vertices[0].Set(0.0f, 0.0f);
vertices[1].Set(10.0f, 0.0f);
int32 count = 2;

b2PolygonShape polygon;
polygon.Set(vertices, count);

b2FixtureDef edgefixtureDef;
edgefixtureDef.shape = &polygon;

edge->CreateFixture(&edgefixtureDef);
As you said it's just a polygon with two vertices

The new version is great actually, I'm glad i upgraded. Not having to specify worldAABB is great.

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