IrrNewt irrlicht\newton framework >> SVN access

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Hey,

it is done, the Spring is now useble as a class. I would have made it a IJoint class, but I don't get how they are actually working.

Windows Binary & Source
http://www.freetimestudio.de/IrrNewt_Springs.zip

CSpring.h

Code: Select all

#ifndef CSPRING_H_INCLUDED
#define CSPRING_H_INCLUDED

#include <IrrNewt.hpp>
#include <irrlicht.h>
using namespace irr;

class CSpring{
private:
    newton::IBody *Body_Parent;
    newton::IBody *Body_Child;
    f32 Strength;
    f32 Length;
public:
    CSpring();
    CSpring(newton::IBody *parent,newton::IBody *child,f32 strength=1,f32 length = -1);
    ~CSpring();
    void update();
    void setStrength(f32 pstrength);
    f32 getStrength();
    void setLength(f32 plength);
    f32 getLength();
    void setParent(newton::IBody *pparent);
    newton::IBody *getParent();
    void setChild(newton::IBody *pchild);
    newton::IBody *getChild();
    void drawDebugData(video::IVideoDriver *driver);

};

#endif // CSPRING_H_INCLUDED
CSpring.cpp

Code: Select all

#include "CSpring.h"

CSpring::CSpring(){
    Body_Parent = 0;
    Body_Child = 0;
    Strength = 1;
    Length = 0;
}

CSpring::CSpring(newton::IBody *parent,newton::IBody *child,f32 strength,f32 length){
    Body_Parent = parent;
    Body_Child = child;
    Strength = strength;
    Length = length;
    if(Length<0){
        if(Body_Parent!=0 && Body_Child!=0){
            core::line3d<f32> line;
            line.start = Body_Parent->getNode()->getAbsolutePosition();
            line.end = Body_Child->getNode()->getAbsolutePosition();
            Length = line.getLength();
        }
    }
}

CSpring::~CSpring(){
    Body_Parent = 0;
    Body_Child = 0;
}

void CSpring::update(){
    if(Body_Child!=0 && Body_Parent!=0){
        core::line3d<f32> line;
        line.start = Body_Parent->getNode()->getAbsolutePosition();
        line.end = Body_Child->getNode()->getAbsolutePosition();
        core::vector3df force_direction = line.getVector().normalize();
        f32 curlength = line.getLength();
        f32 factor = curlength-Length;
        core::vector3df force = force_direction*factor;

        Body_Parent->addGlobalForce(Strength*force,line.end);
        Body_Child->addGlobalForce(-Strength*force,line.end);
    }
}

void CSpring::setStrength(f32 pstrength){
    Strength = pstrength;
}

f32 CSpring::getStrength(){
    return Strength;
}

void CSpring::setLength(f32 plength){
    Length = plength;
}

f32 CSpring::getLength(){
    return Length;
}

void CSpring::setParent(newton::IBody *pparent){
    Body_Parent = pparent;
}

newton::IBody *CSpring::getParent(){
    return Body_Parent;
}

void CSpring::setChild(newton::IBody *pchild){
    Body_Child = pchild;
}

newton::IBody *CSpring::getChild(){
    return Body_Child;
}

void CSpring::drawDebugData(video::IVideoDriver *driver){
    if(Body_Child!=0 && Body_Parent!=0){
        video::SMaterial material;
        material.Lighting = false;
        material.Thickness = 3;
        driver->setMaterial(material);
        driver->setTransform(video::ETS_WORLD,core::matrix4());
        driver->draw3DLine(Body_Parent->getNode()->getAbsolutePosition(),Body_Child->getNode()->getAbsolutePosition(),video::SColor(255,255,255,0));
    }
}
sample.cpp

Code: Select all

//include haders and link libraries
#include <IrrNewt.hpp>
#include <irrlicht.h>

using namespace irr;

#include "CSpring.h"


//irrlicht variables
IrrlichtDevice* device;
video::IVideoDriver* driver;
scene::ISceneManager* smgr;
scene::ICameraSceneNode* camera;

//level body
irr::newton::IBody* level_body;
//physics world
irr::newton::IWorld* p_world;

f32 idlelength;
f32 Strength;

//-----------------------------------------------------------------
//the event receiver
class MyEventReceiver:public IEventReceiver {
public:
	virtual bool OnEvent(const SEvent& event) {
	if(event.EventType == EET_KEY_INPUT_EVENT) {
        if(event.KeyInput.PressedDown == false) { //pressed down false

			if(event.KeyInput.Key==KEY_KEY_W){
				idlelength++;
				printf("Idle Length: %i\n",(int)idlelength);
			}

			if(event.KeyInput.Key==KEY_KEY_S){
				idlelength--;
				printf("Idle Length: %i\n",(int)idlelength);
			}


			if(event.KeyInput.Key==KEY_KEY_Q){
				Strength+=0.1;
				printf("Strength: %f\n",Strength);
			}

			if(event.KeyInput.Key==KEY_KEY_A){
				Strength-=0.1;
				printf("Strength: %f\n",Strength);
			}


			//exit
			if(event.KeyInput.Key==KEY_ESCAPE)
				device->closeDevice();


		}//else if(event.KeyInput.PressedDown == false) {
	}
	return false;
	}
}my_event_receiver;


int main(int argc, char** argv) {

    //Get all the framework running
	device = createDevice(video::EDT_OPENGL, core::dimension2d<u32>(800,600), 32,false,false,true);
	smgr=device->getSceneManager();
	driver=device->getVideoDriver();
	p_world=irr::newton::createPhysicsWorld(device);
	device->setEventReceiver(&my_event_receiver);

    //Scene stuff
	camera=smgr->addCameraSceneNodeFPS();
	camera->setPosition(core::vector3df(0,55,-50));
    smgr->addLightSceneNode(0,core::vector3df(0,100,-100));

	//Some ground
	scene::ISceneNode* world_node = smgr->addCubeSceneNode(2);
	world_node->setScale(core::vector3df(102,1,102));
	world_node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS,true);
	world_node->setAutomaticCulling(scene::EAC_OFF);
	irr::newton::SBodyFromNode levelData;
	levelData.Node = world_node;
	levelData.Mass = 0;
	levelData.Type = newton::EBT_PRIMITIVE_BOX;
	level_body = p_world->createBody(levelData);
	irr::newton::IMaterial* ground_material= p_world->createMaterial();
	level_body->setMaterial(ground_material);



    //Hooks for the net
	irr::newton::IMaterial* hook_material= p_world->createMaterial();

    //First hook
	scene::ISceneNode* hook_node = smgr->addCubeSceneNode(2);
	hook_node->setPosition(core::vector3df(-20,60,0));
	irr::newton::SBodyFromNode hook_data1;
	hook_data1.Node = hook_node;
	hook_data1.Mass = 0;
	hook_data1.Type = newton::EBT_PRIMITIVE_BOX;
	irr::newton::IBody* hook_body1 = p_world->createBody(hook_data1);
	hook_body1->setMaterial(hook_material);

    //Second hook
	scene::ISceneNode* hook_node2 = smgr->addCubeSceneNode(2);
	hook_node2->setPosition(core::vector3df(20,60,0));
	irr::newton::SBodyFromNode hook_data2;
	hook_data2.Node = hook_node2;
	hook_data2.Mass = 0;
	hook_data2.Type = newton::EBT_PRIMITIVE_BOX;
	irr::newton::IBody* hook_body2 = p_world->createBody(hook_data2);
	hook_body2->setMaterial(hook_material);


    //Spheres in the net
    irr::newton::IMaterial* sphere_material;
	sphere_material= p_world->createMaterial();
	sphere_material->setElasticity(ground_material, 1);

    //Sphere 1
    scene::ISceneNode* sphere_node1;
	irr::newton::SBodyFromNode sphereData;
    irr::newton::IBody *sphere_body;

	sphere_node1 = smgr->addSphereSceneNode(2);
    sphere_node1->setPosition(core::vector3df(-20,20,0));
	sphereData.Node = sphere_node1;
	sphereData.Type = newton::EBT_PRIMITIVE_ELLIPSOID;
    sphereData.Mass=10;
    sphere_body = p_world->createBody(sphereData);
	sphere_body->addForceContinuous(core::vector3df(0,-9.81,0));//gravity
	sphere_body->addForce(core::vector3df(5,0,5));  //give it a little push
	sphere_body->setMaterial(sphere_material);

    //Sphere 2
    scene::ISceneNode* sphere_node2;
	irr::newton::SBodyFromNode sphereData2;
    irr::newton::IBody *sphere_body2;
	sphere_node2 = smgr->addSphereSceneNode(2);
    sphere_node2->setPosition(core::vector3df(20,20,0));
	sphereData2.Node = sphere_node2;
    sphereData2.Mass=10;
	sphereData2.Type = newton::EBT_PRIMITIVE_ELLIPSOID;
    sphere_body2 = p_world->createBody(sphereData2);
	sphere_body2->addForceContinuous(core::vector3df(0,-9.81,0));   //gravity
	sphere_material= p_world->createMaterial();
	sphere_body2->setMaterial(sphere_material);


    //Set up the spring system
    core::list<CSpring*> list_springs = core::list<CSpring*>();

    //Connect everything with everything
    idlelength = 40.0f;
    Strength = 1;
	CSpring *spring = new CSpring(sphere_body,sphere_body2);
	list_springs.push_back(spring);

	CSpring *spring2 = new CSpring(sphere_body,hook_body2);
	spring2->setLength(20);
	list_springs.push_back(spring2);

	CSpring *spring3 = new CSpring(sphere_body2,hook_body1);
	spring3->setLength(20);
	list_springs.push_back(spring3);

	CSpring *spring4 = new CSpring(sphere_body,hook_body1);
	spring4->setLength(20);
	list_springs.push_back(spring4);

	CSpring *spring5 = new CSpring(sphere_body2,hook_body2);
	spring5->setLength(20);
	list_springs.push_back(spring5);

    printf("\n\n\nChange the middle spring's idle length with W and S. Current Length is: 20\n");
    printf("Change the middle spring's strength with Q and A. Current Strength is: 1\n");

    //Here we go
	while(device->run()) {


        driver->beginScene(true,true,video::SColor(0,0,0,0));

        video::SMaterial material;
        material.Lighting = false;
        material.Thickness = 3;
        driver->setMaterial(material);
        driver->setTransform(video::ETS_WORLD,core::matrix4());
        video::SColor drawcolor=video::SColor(255,200,100,0);
        driver->draw3DLine(hook_node->getPosition(),sphere_node1->getPosition(),drawcolor);
        driver->draw3DLine(hook_node2->getPosition(),sphere_node2->getPosition(),drawcolor);


        spring->setStrength(Strength);
        spring->setLength(idlelength);

        core::list<CSpring*>::Iterator it_spring = list_springs.begin();
        for(;it_spring!=list_springs.end();it_spring++){
            (*it_spring)->update();
            (*it_spring)->drawDebugData(driver);
        }
        p_world->update();


        smgr->drawAll();

        driver->endScene();

}

	device->drop();
	return 0;
}

Have fun.


I also have a question. I want to create a vehicle, but I don't want to use the inbuild ICar class (because it can just handle "simple" vehicles), so I started to create an own Car as a basis. Problem is, it does barely move. I tried every possible friction configuration and set different masses for the cassis/tires or torque, but it either does not change much or the car gets totally out of control and spins around like crazy. Any ideas what could be wrong?
exe and media: http://www.freetimestudio.de/Car.zip

Code: Select all

//include haders and link libraries
#include <IrrNewt.hpp>
#include <irrlicht.h>
using namespace irr;

//irrlicht variables
IrrlichtDevice* device;
video::IVideoDriver* driver;
scene::ISceneManager* smgr;
scene::ICameraSceneNode* camera;

//level body
irr::newton::IBody* level_body;
//physics world
irr::newton::IWorld* p_world;

int main(int argc, char** argv) {

    //Get all the framework running
	device = createDevice(video::EDT_OPENGL, core::dimension2d<u32>(800,600), 32,false,false,true);
	smgr=device->getSceneManager();
	driver=device->getVideoDriver();
	p_world=irr::newton::createPhysicsWorld(device);

    //Scene stuff
	camera=smgr->addCameraSceneNodeFPS(0,100,0.1);
	camera->setPosition(core::vector3df(-50,20,0));
	camera->setRotation(core::vector3df(0,90,0));
    smgr->addLightSceneNode(0,core::vector3df(0,100,-100));

	//Some ground
	scene::ISceneNode* world_node = smgr->addCubeSceneNode(2);
	world_node->setScale(core::vector3df(50,3,50));
	world_node->setPosition(core::vector3df(0,-15,0));
	world_node->setMaterialFlag(video::EMF_NORMALIZE_NORMALS,true);
	world_node->setAutomaticCulling(scene::EAC_OFF);
	irr::newton::SBodyFromNode levelData;
	levelData.Node = world_node;
	levelData.Mass = 0;
	levelData.Type = newton::EBT_PRIMITIVE_BOX;
	level_body = p_world->createBody(levelData);
	irr::newton::IMaterial* ground_material= p_world->createMaterial();
	level_body->setMaterial(ground_material);


    scene::IMeshSceneNode *node_cassis = smgr->addMeshSceneNode(smgr->getMesh("media/car.b3d"));
    node_cassis->setScale(core::vector3df(10,10,10));
    node_cassis->setMaterialFlag(video::EMF_NORMALIZE_NORMALS,true);
    newton::SBodyFromNode data_cassis;
    data_cassis.Node = node_cassis;
    data_cassis.Mass =1;
    data_cassis.Mesh = node_cassis->getMesh();
    data_cassis.Type = newton::EBT_CONVEX_HULL;
    newton::IBody *body_cassis = p_world->createBody(data_cassis);
    body_cassis->addForceContinuous(core::vector3df(0,-9.81,0));


    //Creating four wheels

	irr::newton::IMaterial* material_wheel= p_world->createMaterial();
    material_wheel->setFriction(ground_material,1,0.1);

    scene::IMeshSceneNode *node_wheel[4];
    newton::IBody *body_wheel[4];
    for(int i = 0;i<4;i++){
        node_wheel[i] = smgr->addMeshSceneNode(smgr->getMesh("media/tire.b3d"));
        node_wheel[i]->setScale(core::vector3df(10,10,10));
        node_wheel[i]->setRotation(core::vector3df(0,0,90));
        node_wheel[i]->setPosition(core::vector3df(0,10,0));
        node_wheel[i]->setMaterialFlag(video::EMF_NORMALIZE_NORMALS,true);
        newton::SBodyFromNode data_wheel;
        data_wheel.Node = node_wheel[i];
        data_wheel.Mesh = node_wheel[i]->getMesh();
        data_wheel.Type = newton::EBT_PRIMITIVE_CYLINDER;
        body_wheel[i] = p_world->createBody(data_wheel);
        body_wheel[i]->addForceContinuous(core::vector3df(0,-9.81,0));
        body_wheel[i]->setMaterial(material_wheel);
    }


    body_wheel[0]->setPosition(core::vector3df(4,-1.3,5.5));
    body_wheel[0]->setRotation(core::vector3df(180,00,90));

    body_wheel[1]->setPosition(core::vector3df(-4,-1.3,5.5));

    body_wheel[2]->setPosition(core::vector3df(4,-1.3,-5.5));
    body_wheel[2]->setRotation(core::vector3df(180,00,90));

    body_wheel[3]->setPosition(core::vector3df(-4,-1.3,-5.5));

    //Connecting them with the cassis
    for(int i=0;i<4;i++){
        core::vector3df pivot,pin0,pin1;
        pivot=body_wheel[i]->getPosition();
        pin0.set(0.0f,0.0f,0.0f);

        irr::newton::SJointHinge joint;
        joint.PinDir.set(1.0f,0.0f,0.0f);
        joint.ParentBody=body_cassis;
        joint.ChildBody=body_wheel[i];
        joint.Pivot=pivot;
        newton::IJointHinge* bjoint=p_world->createJoint(joint);
        bjoint->setCollisionState(false);
    }

    body_cassis->setPosition(core::vector3df(0,8,0));


    //Here we go
	while(device->run()) {

        //"Motor"
         for(int i=2;i<4;i++){
             body_wheel[i]->setTorque(core::vector3df(3,0,0));
         }

        driver->beginScene(true,true,video::SColor(0,0,0,0));

        p_world->update();


        smgr->drawAll();

        p_world->drawAllDebugInfos();
        driver->endScene();

}

	device->drop();
	return 0;
}
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Ok, I found out that I can use IVehicleSimple for my project. But how can I tell the tires to not collide with the car body? Setting the material does not work, since I cannot access the joints, can I?

greetings
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

Found that one out, too. I works with vechicle->setCollisionState(false). Next question, how can I add friction to the tires? Since the tires are no body objects I cannot set a material. Can I access the tire's body somehow? I have not found any method returning an IBody.

Would really help if someone would actually answer my questions :P ;) Talking to myself so much cannot be healthy.

greetings
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Post by Seven »

have you guys fixed the issues with the terrainscenenode and IrrNewt with the latest version of Irrlicht? If you have,we would be VERY interested in seeing code for it as we have not been able to get past it..
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

How can I add friction to the tires?
Setting friction to the cassis material makes the tires respond in the proper way. Still I have no direct acces to the bodies, but I guess it does not help to ask further questions, since I have to answer them myself, anyway.

greetings
Eigen
Competition winner
Posts: 375
Joined: Fri Jan 27, 2006 2:01 pm
Location: Estonia
Contact:

Post by Eigen »

Will IrrNewt be updated to Newton 2.x? I gave it a go myself, and with a lot of code commented out it worked, but it's quite unstable and the raycast (which I use a lot) is not working right.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

does anyone still maintaining this project?
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Post by Granyte »

does not look like sad the project was abandoned
newleon
Posts: 19
Joined: Mon Jan 10, 2011 7:59 am
Location: Pohang, South Korea
Contact:

newton vehicle

Post by newleon »

Hi
I am trying to recompile IrrNewt (downloaded from svn) with Irrlicht 1.7.2 and Newton 1.5.3 under VS2008. First I make a new Win32 Console Application project, then choose Static library and add all .h(hpp) files within IrrNewt include directory to Header files part and all .cpp files from IrrNewt source to Source files. Then I add required directories in Additional Include Directories and finally build the project. After solving the errors, IrrNewt.lib is made. Then I try to compile the hello_world example and I got these linking error:

Code: Select all

1>------ Rebuild All started: Project: myIrrNewt03, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'myIrrNewt03', configuration 'Debug|Win32'
1>Compiling...
1>main.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall irr::newton::IWorld::drawAllDebugInfos(void)" (__imp_?drawAllDebugInfos@IWorld@newton@irr@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall irr::newton::IWorld::update(void)" (__imp_?update@IWorld@newton@irr@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall irr::newton::IBody::addForceContinuous(class irr::core::vector3d<float>)" (__imp_?addForceContinuous@IBody@newton@irr@@QAEXV?$vector3d@M@core@3@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class irr::newton::IBody * __thiscall irr::newton::IWorld::createBody(struct irr::newton::SBodyFromNode)" (__imp_?createBody@IWorld@newton@irr@@QAEPAVIBody@23@USBodyFromNode@23@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class irr::newton::IWorld * __cdecl irr::newton::createPhysicsWorld(class irr::IrrlichtDevice *)" (__imp_?createPhysicsWorld@newton@irr@@YAPAVIWorld@12@PAVIrrlichtDevice@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class irr::newton::IBody * __thiscall irr::newton::IUtils::launchCube(void)" (__imp_?launchCube@IUtils@newton@irr@@QAEPAVIBody@23@XZ) referenced in function "public: virtual bool __thiscall MyeventReceiver::OnEvent(struct irr::SEvent const &)" (?OnEvent@MyeventReceiver@@UAE_NABUSEvent@irr@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class irr::newton::IUtils * __thiscall irr::newton::IWorld::getUtils(void)" (__imp_?getUtils@IWorld@newton@irr@@QAEPAVIUtils@23@XZ) referenced in function "public: virtual bool __thiscall MyeventReceiver::OnEvent(struct irr::SEvent const &)" (?OnEvent@MyeventReceiver@@UAE_NABUSEvent@irr@@@Z)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall irr::newton::IBody::setScale(class irr::core::vector3d<float>)" (__imp_?setScale@IBody@newton@irr@@QAEXV?$vector3d@M@core@3@@Z) referenced in function "public: virtual bool __thiscall MyeventReceiver::OnEvent(struct irr::SEvent const &)" (?OnEvent@MyeventReceiver@@UAE_NABUSEvent@irr@@@Z)
1>C:\Users\newleon\Documents\Visual Studio 2008\Projects\myIrrNewt03\Debug\myIrrNewt03.exe : fatal error LNK1120: 8 unresolved externals
1>Build log was saved at "file://c:\Users\newleon\Documents\Visual Studio 2008\Projects\myIrrNewt03\myIrrNewt01\Debug\BuildLog.htm"
1>myIrrNewt03 - 9 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I already added Newton.lib Irrlicht.lib IrrNewt.lib (exactly in this order) and I don't have any idea about the origin of these linking errors. I am not sure making just IrrNewt.lib is enough or not, I mean should I make another new project to build IrrNewt.dll file? Is there any comment?
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

there should be no need to compile a dll if you will use static library.

since you are using msvc maybe you forgot:

Code: Select all

#pragma comment(lib, "IrrNewt.lib")
:roll:
Working on game: Marrbles (Currently stopped).
Barratator
Posts: 30
Joined: Fri Jan 08, 2010 3:30 pm

Post by Barratator »

Hello,
I'm trying to use IrrNewt. But when I include the "irrnewt.hpp" VS2010 gives me 168 Errors. Like:

Code: Select all

error C2039: 'newton_contact': Ist kein Element von 'irr::newton::IMaterialContact'	[...]\include\irrnewt\contact.hpp	Line24	1
('newton_contact' is not an element of 'irr::newton::IMaterialContact')

Code: Select all

error C2061: Syntaxfehler: Bezeichner 'NewtonContact'	[...]\include\irrnewt\contact.hpp	Line 21	1
(syntax error: identifier 'NewtonContact')

I'm using irrNewt 0.4 and Irrlicht 1.71. irrNewt is a part of the include path and the .lib is linked.

Does anyone have a solution?

Thanks!
DimonSE
Posts: 6
Joined: Tue Dec 06, 2011 3:46 pm

Re: IrrNewt irrlicht\newton framework >> SVN access

Post by DimonSE »

I compile irrNewt with Irrlicht 1.7.3 in Visual studio 2008 ---> http://irrlicht-newton-wrapper.googleco ... DK_0_4.zip

First, I change some parts of .cpp to get compatibility with Irrlicht 1.7.3 (just very small blocks of code)

I've change:
1.

Code: Select all

bool OnEvent(Event event)
change to

Code: Select all

bool OnEvent(const Event& event)
2.

Code: Select all

materials.Texture[0] = 0
change to

Code: Select all

materials.setTexture(0, 0)
3. in ragdoll.cpp

Code: Select all

for (list<ISceneNode*>::Iterator it = children.begin(); it != children.end(); ++it) 
change to

Code: Select all

for (list<ISceneNode*>::ConstIterator it = children.begin(); it != children.end(); ++it) 
Second, I have done little change in collision.cpp this function:

Code: Select all

NewtonCollision* CreateCollisionTreeTerrain(
                                 IWorld* world,
                                 scene::ISceneNode* node,
                                 irr::s32 LOD,
                                 unsigned int& PolyCount)
to adaptive with new virsion of Irrlicht

So in archive we found recompiled IrrNewt:

./lib/win32-msvs2008/IrrNewt.lib
./bin/visual_studio/IrrNewt.dll
./bin/include

debug version in:
./lib/win32-msvs2008/debug/IrrNewt.lib
./bin_debug/visual_studio/IrrNewt.dll

Also i add Visual studio 2008 .sln files in
./examples/IDE/visual studio
try compile example projects!

In ./libs/ you found Irrlicht 1.7.3 and Newton 1.53

PS: sorry for bad English, I am from Russia :D
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Re: IrrNewt irrlicht\newton framework >> SVN access

Post by white tiger »

HI guys,

Thanks you all for the support throught. Seeing my old project still here with someone using it, remembering the satisfaction to see it working and doing what was supposed to do.

Well, as you can see the project is abandoned now. A lot of time passed, and now i'm near my graduation :D

If someone want to continue this project, that would be very appreciated, and I will be thankful to him. I would give SVN write access to him.

Bye :mrgreen:
Post Reply