But I didn't check everything, yet...
Report any bugs and suggestions to me, please !!!
Next I try to create a bone animated ragdoll with Newton !!!
Maybe this will cause some problems, but I don't think so....
CU, Acki




Code: Select all
static void PhysicsApplyForceAndTorque(const NewtonBody* body);
static void PhysicsSetTransform(const NewtonBody* body, const dFloat* matrix);
int main(){
initScene();
while(device->run()){
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
NewtonWorldForEachBodyDo(nWorld, DebugShowBodyCollision);
driver->endScene();
// updatePhysics(); // don't update
}
device->drop();
return 0;
}
void DebugShowBodyCollision(const NewtonBody* body){
dFloat Ixx;
dFloat Iyy;
dFloat Izz;
dFloat mass;
// only show collision for dynamics objects
NewtonBodyGetMassMatrix(body, &mass, &Ixx, &Iyy, &Izz);
if(mass > 0.0)
NewtonBodyForEachPolygonDo(body, DebugShowGeometryCollision);
}
void DebugShowGeometryCollision(const NewtonBody* body, int vertexCount, const dFloat* faceVertec, int id){
int i = vertexCount - 1;
vector3df os(10, -1.5, 0);
vector3df p0(faceVertec[i * 3 + 0], faceVertec[i * 3 + 1], faceVertec[i * 3 + 2]);
p0 += os;
for (i = 1; i < vertexCount; i ++) {
vector3df p1(faceVertec[i * 3 + 0], faceVertec[i * 3 + 1], faceVertec[i * 3 + 2]);
p1 += os;
driver->draw3DLine(p0, p1, SColor(255, 0, 0, 255));
p0 = p1;
}
}

Code: Select all
[thomas@localhost 01 - Simple Demo]$ g++ main.cpp -o test -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
main.cpp: In function »int main(int, char**)«:
main.cpp:34: Fehler: »class irr::scene::IAnimatedMeshSceneNode« hat kein Element namens »makeCustomBones«
main.cpp:35: Fehler: »class irr::scene::IAnimatedMeshSceneNode« hat kein Element namens »useCustomBones«
main.cpp:42: Fehler: »class irr::scene::IAnimatedMeshSceneNode« hat kein Element namens »makeCustomBones«
main.cpp:43: Fehler: »class irr::scene::IAnimatedMeshSceneNode« hat kein Element namens »useCustomBones«
main.cpp:53: Fehler: »Sleep« wurde in diesem Gültigkeitsbereich nicht definiertCode: Select all
cp libIrrlicht.a ../../lib/Linux/
cp: reguläre Datei „../../lib/Linux/libIrrlicht.a“ kann nicht angelegt werden: Datei oder Verzeichnis nicht gefunden
make: *** [staticlib] Fehler 1


Code: Select all
g++ -c CAnimatedMeshSceneNode.cpp -o CAnimatedMeshSceneNode.o -I"include/" -I"zlib/" -DIRRLICHT_EXPORTS=1
CAnimatedMeshSceneNode.cpp:27: Fehler: Prototyp für »void irr::scene::CAnimatedMeshSceneNode::useCustomBones(bool)« passt zu nichts in Klasse »irr::scene::CAnimatedMeshSceneNode«
CAnimatedMeshSceneNode.h:26: Fehler: candidate is: virtual const void irr::scene::CAnimatedMeshSceneNode::useCustomBones(bool)
CAnimatedMeshSceneNode.cpp:27: Fehler: »void irr::scene::CAnimatedMeshSceneNode::useCustomBones(bool)« cannot be overloaded
CAnimatedMeshSceneNode.h:26: Fehler: with »virtual const void irr::scene::CAnimatedMeshSceneNode::useCustomBones(bool)«
CAnimatedMeshSceneNode.cpp: In member function »virtual const irr::core::array<irr::core::matrix4>* irr::scene::CAnimatedMeshSceneNode::makeCustomBones()«:
CAnimatedMeshSceneNode.cpp:33: Fehler: »class irr::scene::IAnimatedMeshX« hat kein Element namens »getBones«
CAnimatedMeshSceneNode.cpp: In member function »virtual void irr::scene::CAnimatedMeshSceneNode::render()«:
CAnimatedMeshSceneNode.cpp:98: Fehler: »class irr::scene::IAnimatedMeshX« hat kein Element namens »useCMeshBones«
make: *** [CAnimatedMeshSceneNode.o] Fehler 1