IrrNewt irrlicht\newton framework >> SVN access
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
IrrNewt irrlicht\newton framework >> SVN access
I wrote an open source irrlicht\newton framework independently. Its name is IrrNewt. it is OOP. It not only contains functions wrpped from newton but also functions wrote by me. It's a full framework designed to easily integrate physics in your projects.
Links
IrrNewt home page
Features
Latest source: svn update https://aresfps.svn.sourceforge.net/svn ... ps/IrrNewt (online browsing works too)
Media folder for the examples:
Media folder
important: in IrrNewt 0.4 SDK you can find IrrNewt.dll and IrrNewt.lib\.a ONLY for irrlicht 1.1. If you are using a different version of irrlicht (eg. 1.3) you need to recompile IrrNewt and link the recompiled version in order to run your applications correctly
(thanks to TheGameMaker for this logo)
Outdated binary won't compile with irrlicht > 1.5:
IrrNewt 0.4 sdk IrrNewt 0.4 SDK download - platform indipendent size: ~4.7 mb
Links
IrrNewt home page
Features
Latest source: svn update https://aresfps.svn.sourceforge.net/svn ... ps/IrrNewt (online browsing works too)
Media folder for the examples:
Media folder
important: in IrrNewt 0.4 SDK you can find IrrNewt.dll and IrrNewt.lib\.a ONLY for irrlicht 1.1. If you are using a different version of irrlicht (eg. 1.3) you need to recompile IrrNewt and link the recompiled version in order to run your applications correctly
(thanks to TheGameMaker for this logo)
Outdated binary won't compile with irrlicht > 1.5:
IrrNewt 0.4 sdk IrrNewt 0.4 SDK download - platform indipendent size: ~4.7 mb
Last edited by white tiger on Fri Jan 23, 2009 4:05 pm, edited 34 times in total.
wow! quit a good work dude
just one point: why does noone stick to the irrlicht code-rules in his addons?
e.g. why did you name it "Body" instead of "IBody" ?
Why didnt you use interfaces really? ^^
would be very nice to use the same coding-style in an application with irrlicht and your addon.
just my 2 cents
just one point: why does noone stick to the irrlicht code-rules in his addons?
e.g. why did you name it "Body" instead of "IBody" ?
Why didnt you use interfaces really? ^^
would be very nice to use the same coding-style in an application with irrlicht and your addon.
just my 2 cents
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
Thanks for downlading.
Generally I use irrlicht coding style (e.g. addForce and not AddForce or add_force) and irrlicht types (e.g. irr::f32 and not float, core::vector3df and not a float* wich point to the first element of a 3 floats array). I also insert classes in irr::newton namespace.
The only irrlicht coding style rules that I didn't follow is the "I" before the name of the class interface and the "S" before the name of a struct, but if there will be an other release (I have many free time but I noticed that the interested persons are little and releasing an other version of a non downloaded library has no sense in my hopinion, sorry), I implemented these things.
Bye
Generally I use irrlicht coding style (e.g. addForce and not AddForce or add_force) and irrlicht types (e.g. irr::f32 and not float, core::vector3df and not a float* wich point to the first element of a 3 floats array). I also insert classes in irr::newton namespace.
The only irrlicht coding style rules that I didn't follow is the "I" before the name of the class interface and the "S" before the name of a struct, but if there will be an other release (I have many free time but I noticed that the interested persons are little and releasing an other version of a non downloaded library has no sense in my hopinion, sorry), I implemented these things.
Sorry but I don't understand your question. Every class has got its interface in the header file and its implementation in the source file. For example the interface fo the class Body is in the file include\body.hpp and its implementation is in the file source\irrnewt_src\body.cppWhy didnt you use interfaces really?
Bye
pure virtual base class
i think what he means is that irrlicht uses abstract base classes. there is an IMesh.h(interface class)->CMesh.h(imp. class derived from interface)->CMesh.cpp(imp. of methods in imp. class) or whatever all broken out into separate files. this is part of a general standing "best practice" of c++ design, to separate interface completely from implementation, including any data structures or value members used in implementation.
in small to medium scale projects it's probably OK to ignore this idea, but when you have multiple implementations of an interface, say for cross platform projects, it becomes a necessity. in irrlicht for instance there is a linux device, and a windows device, both derived from the same interface. it chooses which to instantiate depending on what platform you are on.
in small to medium scale projects it's probably OK to ignore this idea, but when you have multiple implementations of an interface, say for cross platform projects, it becomes a necessity. in irrlicht for instance there is a linux device, and a windows device, both derived from the same interface. it chooses which to instantiate depending on what platform you are on.
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
-
- Posts: 58
- Joined: Thu Apr 06, 2006 11:54 pm
Hi, I'm going to be starting a project soon with Newton, using either this or IPhysics, but I haven't decided which one. What does IrrNewt have that IPhysics doesn't (and vice versa)? Any testimony from anyone who's tried both (if there's anyone who has yet...)? I'm pretty new to Irrlicht, so learning and trying them both myself right off the bat might be a bit much.
=D
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
@buhatkj: ah ok. I didn't undestrand
abstract base class require declaration of all mebember functions as virtual. Normally you use virtual function if you re implement a method of a class in one of its sub classes and upcast the sub class to its super class, but you want to call the sub class re-implemented method and not the super class method. with "abstract base class method" all functions must be virtual. as buhatkj said this is profit when the same interface require multiple implementation. But in irrnewt I use one implementation for every interface. Moreover i didn't do any performance test, but if you define a function as "virtual", when you call it the compiler don't generate a simply "call ..." assembly code, but 2 more complicated lines of assembly code. So I am inclined to avoid abstract base class
@FriendlyWarlord: Sorry but I do not want to speak badly about other wrappers (and I would like that ohter wrappers' author do the same), because I want to stay away from libraries comparison since they tend to bring passionate discussions ending in flame wars.
You can find IPhysics feature list here and IrrNewt feature list in the first post. Please look at both feature list and choose your wrapper ("static meshes" and "tree collision bodies" indicate the same thing)
The decision to use a particular wrapper is ultimately yours.
News:
I implemented rotation constraint and improve joint class with new functions.
abstract base class require declaration of all mebember functions as virtual. Normally you use virtual function if you re implement a method of a class in one of its sub classes and upcast the sub class to its super class, but you want to call the sub class re-implemented method and not the super class method. with "abstract base class method" all functions must be virtual. as buhatkj said this is profit when the same interface require multiple implementation. But in irrnewt I use one implementation for every interface. Moreover i didn't do any performance test, but if you define a function as "virtual", when you call it the compiler don't generate a simply "call ..." assembly code, but 2 more complicated lines of assembly code. So I am inclined to avoid abstract base class
@FriendlyWarlord: Sorry but I do not want to speak badly about other wrappers (and I would like that ohter wrappers' author do the same), because I want to stay away from libraries comparison since they tend to bring passionate discussions ending in flame wars.
You can find IPhysics feature list here and IrrNewt feature list in the first post. Please look at both feature list and choose your wrapper ("static meshes" and "tree collision bodies" indicate the same thing)
The decision to use a particular wrapper is ultimately yours.
News:
I implemented rotation constraint and improve joint class with new functions.
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
@whitetiger: Really really gud work there dude! I mean u hav almost everything in newton in your wrapper! The only problem is, that u havent simplified it as much as u cud hav! I like IPhysics structure tho it has very few features its structure makes it very easy to use! I love the amount of flexibility u give to the user, but just try making the interfrace simpler and userfriendly and making the examples simple and using irrlicht style in samples too! The coding of your project is great, its just that its not user friendly!
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
@RapchikProgrammer: I would like to improve my project most possible. For simpler examples I agree with you. Examples source code are a bit unordered. it will be in the next release. But for class interface user unfriendly I don't understand. in IrrNewt you simply pass the scene node and the shape type (assume box for default) and IrrNewt calculate automatically body offset(if in your model file the model is not centered) and body shape type (from bounding box and node scale). If you use createbodyAuto instead of createBody irrnewt gets automatically also the body shape type if you use addCubeSceneNode or addSphereSceneNode to create the node
i tried to make all interfaces as user friendly as possible. Can you provide me an example of a user unfriendly function\intreface, please? maybe i didn't notice it
i tried to make all interfaces as user friendly as possible. Can you provide me an example of a user unfriendly function\intreface, please? maybe i didn't notice it
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
hehe, well gud 2 c that u r working on the examples! Neway, what i mean by simpler is instead of all coding being managed by namespaces as in ur case, instead how bout some classes and structures! What i basically mean is that in ur framework we have to declare several variables about a car's info before making one, how bout we make one structure and setting some necessary variables and leaving some in default and passing it to ur function which can easily understand it! That way we have control + simplicity!
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
I must complain with white tiger, no offence meant!
This code (and ares-fps is worse) is quite a mess.
Programming has conventions, and C++ has ITS conventions for
naming files, using tabs, naming #ifdef.
1) why do you use defines so long?
#define RAFFAELE_MANCUSO_IRRLICHT_HELP_LIBRERY_VERSIONE_1_00_00_PHISICS_COD_1230658498479584162168479846320168479849651306849
84762056265065419820ASREADFASC
it's really not usual.
2) sometime you use tabs and sometime not, somewhere else you put a lot of tabs;
3) you don't use white spaces instead they are "really" important;
4) it's really not good using a lot of global variables;
5) in a C++ framework you should'n use C functions;
6) it's important to add comments to a public library (see doxygen)
7) it's not so good declaring variables in the middle of functions.
in ares-fps there are comments in italian?
I have to counsel you to read a some good code and some C/C++ manuals
Talking about 3d library and C++ you can just open irrlicht or ogre C++
files and see the difference
Good work!
This code (and ares-fps is worse) is quite a mess.
Programming has conventions, and C++ has ITS conventions for
naming files, using tabs, naming #ifdef.
1) why do you use defines so long?
#define RAFFAELE_MANCUSO_IRRLICHT_HELP_LIBRERY_VERSIONE_1_00_00_PHISICS_COD_1230658498479584162168479846320168479849651306849
84762056265065419820ASREADFASC
it's really not usual.
2) sometime you use tabs and sometime not, somewhere else you put a lot of tabs;
3) you don't use white spaces instead they are "really" important;
4) it's really not good using a lot of global variables;
5) in a C++ framework you should'n use C functions;
6) it's important to add comments to a public library (see doxygen)
7) it's not so good declaring variables in the middle of functions.
in ares-fps there are comments in italian?
I have to counsel you to read a some good code and some C/C++ manuals
Talking about 3d library and C++ you can just open irrlicht or ogre C++
files and see the difference
Good work!
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
What im saying is not for a default vehicle, the user must enter some variables that are necessary but you set some default value to some variables it can make it easier for new programmers to grasp ur library! And i am not trying to fight with you here or compare your library with neone else's all i am saying is if u make ur library with classes and structures increasing user friendliness and the amount of functionality u r already adding to ur library ur library can be ten times more useful for other ppl!
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
@stef_:
1)i use so long define to avoid that the user defines a his constant identical to my constant. How about if I write #define _BODY_ and the user wrote a his class (MyBody) and in its intercace write also #define _BODY_? i'm not the only one that uses so long defines. for example mfc uses it
2)if somewhere there is some missing tabs, there wasn't my intenction. I will re-read the code and insert missing tabs
3)Can you tell me where I would put white spaces, please? i use xxxYyyy convention for function and xxx_yyy convention for variables. when a line ends (;) i enter in a new line. Where I would put white spaces, exactly?
4)i use gloabal variables only in the examples. Global variables (in real they are global constants) allow you to modify physical aspects without search the line that you need to modify. For example in the example "car" we want to improve linear damping. simply modify the parameter of "chassis_p_node_linear_damping" without search the part of the code that create car. But I use it only in the examples. If you would like you can write your sources as you want.
5)I use C function 1 or 2 times altogether and only in the examples. For example I use a c function to convert a const char* to a w_chart*. There is not ANY class to do this, only this c function.
irrlicht's examples use printf to print a text out. printf is a c function and there isn't class to print out a text (printf("Please select the driver you want for this example:\n"\-- quake 3 map example)
6)yes, if there will be another release I will improve the comments to the examples and documentation. i didn't do that because I should be see if someone is intersted to my library.
7)irrlicht examples doesn't use global variables, it declares its variables in main(). and main is a function. i don't see what's wrong with declaring a variable in the middle of a function. i also thing that this point is opposite to the 4th point (don't declare global variables)
with maybe you would write 8 ). Yes, in ares fps i use italian comments. sorry (but also it isn't a library)
and yes, i need to make the samples and the source code a bit more ordered (i don't know if this is the exact word wich i look for) and I will improve documentation. but obviously if someone needs help (or don't understand some thing) I will help he\she surely
thanks for posting claims, it qould be helful for improving a library
@RapchikProgrammer: in World::createVehicleSimple the 2nd parameter is 0,1,0 for default and in VehicleSimple::createTire the last 4 parametrs (body_scene_node_offset, supension shock,spring and lenght) are setted for default. i will insert also a default value for pin parameter (0,0,1). if you would like some other default value tell me please what parameter you would like to set by dafault.
bye
1)i use so long define to avoid that the user defines a his constant identical to my constant. How about if I write #define _BODY_ and the user wrote a his class (MyBody) and in its intercace write also #define _BODY_? i'm not the only one that uses so long defines. for example mfc uses it
2)if somewhere there is some missing tabs, there wasn't my intenction. I will re-read the code and insert missing tabs
3)Can you tell me where I would put white spaces, please? i use xxxYyyy convention for function and xxx_yyy convention for variables. when a line ends (;) i enter in a new line. Where I would put white spaces, exactly?
4)i use gloabal variables only in the examples. Global variables (in real they are global constants) allow you to modify physical aspects without search the line that you need to modify. For example in the example "car" we want to improve linear damping. simply modify the parameter of "chassis_p_node_linear_damping" without search the part of the code that create car. But I use it only in the examples. If you would like you can write your sources as you want.
5)I use C function 1 or 2 times altogether and only in the examples. For example I use a c function to convert a const char* to a w_chart*. There is not ANY class to do this, only this c function.
irrlicht's examples use printf to print a text out. printf is a c function and there isn't class to print out a text (printf("Please select the driver you want for this example:\n"\-- quake 3 map example)
6)yes, if there will be another release I will improve the comments to the examples and documentation. i didn't do that because I should be see if someone is intersted to my library.
7)irrlicht examples doesn't use global variables, it declares its variables in main(). and main is a function. i don't see what's wrong with declaring a variable in the middle of a function. i also thing that this point is opposite to the 4th point (don't declare global variables)
with maybe you would write 8 ). Yes, in ares fps i use italian comments. sorry (but also it isn't a library)
and yes, i need to make the samples and the source code a bit more ordered (i don't know if this is the exact word wich i look for) and I will improve documentation. but obviously if someone needs help (or don't understand some thing) I will help he\she surely
thanks for posting claims, it qould be helful for improving a library
@RapchikProgrammer: in World::createVehicleSimple the 2nd parameter is 0,1,0 for default and in VehicleSimple::createTire the last 4 parametrs (body_scene_node_offset, supension shock,spring and lenght) are setted for default. i will insert also a default value for pin parameter (0,0,1). if you would like some other default value tell me please what parameter you would like to set by dafault.
i would like to say some things. first off, what part of what i wrote say that i'm offense with you for some thing? if i wrote this directly or indirectly sorry, but this is not the truth. second you don't saied "your library is bad", but if you or someone will say this, i respect this hopinion and i'm not offense. everyone MUST BE free to say what he\she things (but without offense with bad words). third, if you say "this library doesn't have this feature" you make me very very happy because you help me to improve my library, and I will thank you 4th i'm happy that some body post claims because this help to improve a libraryAnd i am not trying to fight with you here or compare your library with neone else's all i am saying
bye
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
Im glad to see we are on the same page here and i just meant to clear myself out in the previous post! Neways, all i am saying here is that the code that is interacting with newton is great, u give us all the features we need and some even more then we need but the problem is the user acessing ur library! Its too much into namespaces, in my opinion classes are considered more feasable then namespaces! I am not the best programmer in the world, so i dont know what is better and what is not, its just my opinion that if u wud make it more into structures and classes then it wud make working with your library a lot easier and it will a lot more userfriendly! I am not trying to offend u or anything but as an example dnld iphysics and look at its source to know what i mean, even tho ur library has far far more features then iphysics, the way iphysics is made it feels user friendly! And this definetly doesnot mean that iphysics has the best structure, but a more classses and structures aproach could get u a far better feedback from newbies and make ur library very very useful for everyone!third, if you say "this library doesn't have this feature" you make me very very happy because you help me to improve my library, and I will thank you Very Happy 4th i'm happy that some body post claims because this help to improve a library