I recently started developing with the svn-version of box2d with xcode3 under osx 10.5 and I've been running into some problems. I've been trying to get ewjordans convex shape decomposition to work, but no success. This is what I have done:
- I created a folder in "Source" named "Contrib" and copied b2Polygon.cpp/h and b2Triangle.cpp/h into that folder
- I copied "ConvexDecomposition.h" into the "Tests" folder
- I edited "TestEntries" and added the needed entries for convex decomposition
When I try to build the whole project I get the following errors:
I can fix some of those errors by setting the right path for b2Shape.h (which is located in "Collision/Shapes" in box2d 2.0 but was located "Collision/" in box2d 1.4.3), renaming b2PolyDef to b2PolygonDef and removing the parentheses in the declaration of the connected-array in class b2PolyNode. Still 7 errors are remaining in b2Polygon.cpp:
I can uncomment the lines where localPosition/localRotation is used but I can't fix the last 3 errors because AddShape does not exist.
Hopefully I didn't forget something important that you guys need to know, this is my first posting. Thank you in advance...
- I created a folder in "Source" named "Contrib" and copied b2Polygon.cpp/h and b2Triangle.cpp/h into that folder
- I copied "ConvexDecomposition.h" into the "Tests" folder
- I edited "TestEntries" and added the needed entries for convex decomposition
When I try to build the whole project I get the following errors:
Code:
error: ../Collision/b2Shape.h: No such file or directory
error: expected constructor, destructor, or type conversion before '*' token
error: 'b2_maxPolyVertices' was not declared in this scope
error: 'b2PolyDef' has not been declared
error: expected `)' before '*' token
In member function 'bool b2Polygon::IsUsable(bool)':
error: 'b2_maxPolyVertices' was not declared in this scope
error: 'b2_maxPolyVertices' was not declared in this scope
At global scope:
error: variable or field 'AddTo' declared void
error: 'int b2Polygon::AddTo' is not a static member of 'class b2Polygon'
error: 'b2PolyDef' was not declared in this scope
error: 'pd' was not declared in this scope
error: expected ',' or ';' before '{' token
error: expected constructor, destructor, or type conversion before '*' token
In function 'b2Polygon TraceEdge(b2Polygon*)':
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
In member function 'void b2PolyNode::AddConnection(b2PolyNode&)':
error: 'connected' was not declared in this scope
In member function 'void b2PolyNode::RemoveConnection(b2PolyNode&)':
error: 'connected' was not declared in this scope
error: 'connected' was not declared in this scope
In member function 'void b2PolyNode::RemoveConnectionByIndex(int32)':
error: 'connected' was not declared in this scope
In member function 'bool b2PolyNode::IsConnectedTo(b2PolyNode&)':
error: 'connected' was not declared in this scope
In member function 'b2PolyNode* b2PolyNode::GetRightestConnection(b2PolyNode&)':
error: 'connected' was not declared in this scope
error: 'connected' was not declared in this scope
error: expected constructor, destructor, or type conversion before '*' token
error: 'b2_maxPolyVertices' was not declared in this scope
error: 'b2PolyDef' has not been declared
error: expected `)' before '*' token
In member function 'bool b2Polygon::IsUsable(bool)':
error: 'b2_maxPolyVertices' was not declared in this scope
error: 'b2_maxPolyVertices' was not declared in this scope
At global scope:
error: variable or field 'AddTo' declared void
error: 'int b2Polygon::AddTo' is not a static member of 'class b2Polygon'
error: 'b2PolyDef' was not declared in this scope
error: 'pd' was not declared in this scope
error: expected ',' or ';' before '{' token
error: expected constructor, destructor, or type conversion before '*' token
In function 'b2Polygon TraceEdge(b2Polygon*)':
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
error: 'class b2PolyNode' has no member named 'connected'
In member function 'void b2PolyNode::AddConnection(b2PolyNode&)':
error: 'connected' was not declared in this scope
In member function 'void b2PolyNode::RemoveConnection(b2PolyNode&)':
error: 'connected' was not declared in this scope
error: 'connected' was not declared in this scope
In member function 'void b2PolyNode::RemoveConnectionByIndex(int32)':
error: 'connected' was not declared in this scope
In member function 'bool b2PolyNode::IsConnectedTo(b2PolyNode&)':
error: 'connected' was not declared in this scope
In member function 'b2PolyNode* b2PolyNode::GetRightestConnection(b2PolyNode&)':
error: 'connected' was not declared in this scope
error: 'connected' was not declared in this scope
I can fix some of those errors by setting the right path for b2Shape.h (which is located in "Collision/Shapes" in box2d 2.0 but was located "Collision/" in box2d 1.4.3), renaming b2PolyDef to b2PolygonDef and removing the parentheses in the declaration of the connected-array in class b2PolyNode. Still 7 errors are remaining in b2Polygon.cpp:
Code:
error: 'struct b2PolygonDef' has no member named 'localPosition'
error: 'struct b2PolygonDef' has no member named 'localPosition'
error: 'struct b2PolygonDef' has no member named 'localRotation'
error: 'struct b2PolygonDef' has no member named 'localRotation'
error: 'struct b2BodyDef' has no member named 'AddShape'
error: 'struct b2BodyDef' has no member named 'AddShape'
error: 'struct b2BodyDef' has no member named 'AddShape'
error: 'struct b2PolygonDef' has no member named 'localPosition'
error: 'struct b2PolygonDef' has no member named 'localRotation'
error: 'struct b2PolygonDef' has no member named 'localRotation'
error: 'struct b2BodyDef' has no member named 'AddShape'
error: 'struct b2BodyDef' has no member named 'AddShape'
error: 'struct b2BodyDef' has no member named 'AddShape'
I can uncomment the lines where localPosition/localRotation is used but I can't fix the last 3 errors because AddShape does not exist.
Hopefully I didn't forget something important that you guys need to know, this is my first posting. Thank you in advance...