IrrNewt irrlicht\newton framework >> SVN access

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Dances
Posts: 454
Joined: Sat Jul 02, 2005 1:45 am
Location: Canada
Contact:

Post by Dances »

I compiled for 1.3 without OGL or DX libraries. You need to play with your Compiler's setup.
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

to compile for 1.3 you don't need dx or ogl. There are some includes for ogl and not only, but they are unecessary and they'll fixed in 0.4 by removing the maths newton part.

Here are a temporany fix for 0.3 :

in include/newton/maths.h find

Code: Select all

#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include <ctype.h>


#ifdef _MSC_VER
	#include <windows.h>
	#include <crtdbg.h>
	#include <gl/glut.h>
	#include <malloc.h>
#else
	#ifdef _MIPS_ARCH
		#include <Glut/glut.h>
	#else
	//	#include <glut.h>
	#endif
	#include <unistd.h>
#endif
and replace ALL the above code with:

Code: Select all

#include <math.h>
#include <stdio.h>
#include <assert.h>
then compile and you will get some errors regarding a not find _ASSERTE function. Replase all '_ASSERTE' with 'assert'

Now you don't need ogl to compile IrrNewt. There are no includes\libraries for dx.

If you get errors regarding dx, they don't depend by IrrNewt :wink:
Last edited by white tiger on Tue Jun 12, 2007 9:14 pm, edited 1 time in total.
beshrkayali
Posts: 85
Joined: Mon Jun 11, 2007 11:22 am
Location: Damascus - Syria
Contact:

answer

Post by beshrkayali »

thanx white tiger for the last post, but i'm having another problem.

it's about the M Matrix, or something i didn't understand, any way, here is what the compiler gives me:

Code: Select all

12 C:\IrrNewt-0.3\include\body.hpp:15,               from IrrNewt_src\body.cpp In file included from IrrNewt_src/../../include/body.hpp:15,               from IrrNewt_src/body.cpp 

12 C:\IrrNewt-0.3\source\IrrNewt_src\body.cpp                  from IrrNewt_src/body.cpp    C:\irrlicht-1.3\include\matrix4.h In function `irr::f32* irr::newton::Hidden::GetMatrixPointer(const irr::core::matrix4&)': 

265 C:\irrlicht-1.3\include\matrix4.h `irr::f32 irr::core::matrix4::M[16]' is private 

87 C:\IrrNewt-0.3\include\hidden.hpp within this context 


 C:\IrrNewt-0.3\source\Makefile.win [Build Error]  [IrrNewt_src/body.o] Error 1 



Tibo90
Posts: 1
Joined: Tue Jun 12, 2007 3:21 pm
Location: France

Post by Tibo90 »

hi all ! :D

@beshrkayali

view in Hidden.hpp

line 84, uncomment

Code: Select all

return const_cast<f32*>(&mat[0]);
and line 87, comment :

Code: Select all

return const_cast<f32*>(&mat.M[0]);
and it will work. :wink:
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

0.4 released :D

to compile for 1.3 you only need to uncomment a #define statement. a readme file is included

lots of changes. implemented collisions objects, ragdoll, compund collision, speed up and some clean ups. Two new examples: compund collisions and ragdolls. Enjoy :)
beshrkayali
Posts: 85
Joined: Mon Jun 11, 2007 11:22 am
Location: Damascus - Syria
Contact:

answer

Post by beshrkayali »

maaaan, take it easy
i didn't even had the time to recompile it for irrlicht 0.3 :oops:

i'm kiddin 8) keep the good work
i'm downloading it right now, hope it makes programmin my game more easy.

and by the way it's only 4.7 MB 8)

THAAANK YAAAO :wink:
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

wait a moment. I discovered a small bug :wink:
beshrkayali
Posts: 85
Joined: Mon Jun 11, 2007 11:22 am
Location: Damascus - Syria
Contact:

answer

Post by beshrkayali »

phew, i couldn't download it
i thought it's my fault
:P
Last edited by beshrkayali on Wed Jun 13, 2007 3:10 pm, edited 1 time in total.
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

All done. You can download it
beshrkayali
Posts: 85
Joined: Mon Jun 11, 2007 11:22 am
Location: Damascus - Syria
Contact:

answer

Post by beshrkayali »

Thank you :lol:
Dances
Posts: 454
Joined: Sat Jul 02, 2005 1:45 am
Location: Canada
Contact:

Post by Dances »

When I have time to put this in my program I'll let you know if my final movement code gets changed at all... because I don't think jump was working as it should... :) Thank you for the new version.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

so what is the diffrence between using newton or using this wrapper!!?(nooob qustion) :P
olivehehe_03
Posts: 157
Joined: Tue Mar 20, 2007 8:30 am

Post by olivehehe_03 »

omar shaaban wrote:so what is the diffrence between using newton or using this wrapper!!?(nooob qustion) :P


Newton is written for C++, IrrNewt is written for Irrlicht which means that it's (generally) easier to implement IrrNewt into an Irrlicht project than it is to implement Newton (even though it is possible).

PS: I noticed that there's a 0.4 now, hopefully there won't be too many troubles changing my project over from 0.3 :D

EDIT: I just tried to compile for Irrlicht 1.3 and I'm getting 17 errors, all of them are coming from this line:

Code: Select all

c:\stuff\irrnewt_sdk_0_4\include\utils.hpp(195) : error C2668: 'pow' : ambiguous call to overloaded function
I can fix it no problem, I'm just letting you know, and I'm using Visual C++ 2005 Express Edition

EDIT EDIT: Fixed, it problem line was in the round() function, which now looks like this:

Code: Select all

inline void irr::newton::IUtils::round(irr::f32& value, irr::u32 decimal) {

	int decimalInt = decimal; //added this line to change the u32 to an int so the pow() function will take it
	irr::f32 save=(irr::f32)pow(10.0f,decimalInt); //changed to 10.0f and the new int variable

	value*=save;
	
	if(value>0) 
		value=floorf(value);	
			
	else
		value=ceilf(value);
	
	value/=save;
}
Tell me what you cherish most. Give me the pleasure of taking it away.
white tiger
Posts: 269
Joined: Tue Oct 31, 2006 3:24 pm
Contact:

Post by white tiger »

because I don't think jump was working as it should...
What's the problem?
Newton is written for C++, IrrNewt is written for Irrlicht which means that it's (generally) easier to implement IrrNewt into an Irrlicht project than it is to implement Newton (even though it is possible).
That's right and also IrrNewt is OOP, Newton not and some fatures (like character controlling) isn't in Newton and you need to write them by yourself
and I'm using Visual C++ 2005 Express Edition
that's strange. It doesn't happen with vc++ 6 or dev-c++ 4. Thanks for the fix :D
beshrkayali
Posts: 85
Joined: Mon Jun 11, 2007 11:22 am
Location: Damascus - Syria
Contact:

answer

Post by beshrkayali »

thank you so much olivehehe_03, the same thing happend to me, i'm also using Visual C++ 2005 Express Edition.

I was going to ask the same question, but i couldn't fix it myself, so thank you
:lol:
Post Reply