Newton .NET wrapper

Share with us how are you using the powerrrr of the force

Moderator: Alain

Postby The unProfessional » Wed Mar 16, 2005 10:12 pm

The interface and outside calls to the wrapper are all executed under a managed context and the actual newton calls are executed under an unmanaged context.


Yes, but when I mentioned that MDX isn't completely "managed", i meant that it's still necessary for you to free up hardware-data, such as textures, shaders, the device itself, etc. Don't depend on the gc to do it for you.
The unProfessional
 
Posts: 131
Joined: Sun May 02, 2004 9:08 pm
Location: Southern California

Postby SnprBoB86 » Thu Mar 17, 2005 2:45 pm

Actually, the GC will clean up hardware resources for you by calling the Dispose method during the finalizer. The finalizer is suppressed if you call Dispose manually. However, it is certainly optimal to call dispose manually for hardware resources just as it is optimal to close network connections or file handles manually.
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Postby Quimbly » Mon May 30, 2005 11:31 am

How about this .NET wrapper? Is work continuing on this or not?
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby SnprBoB86 » Mon May 30, 2005 1:07 pm

Yes, work WILL eventually continue. I ran into a MAJOR stumbling block: Beta 2. My .net install is horribly currupted and VC# does not run at all.

I certainly plan to finish the wrapper as I was enjoying writing it, had a need for it, and was learning a lot about Managed C++.

When I originally posted about it, there did not seem to be much interest. I'm not sure what the case is now, but if there is interest, I will put up what I have so far on source forge.

I also promise that I will get back to working on it soon.
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Postby Quimbly » Mon May 30, 2005 8:19 pm

I can't speak for the rest of the board, but I'm definitely interested in this.

I recently moved to the .NET 2.0 F/W and Whidbey Beta2 at work. There are a lot of changes. Good luck!

Keep us posted, when you make some good progress, if you would.

Thanks!
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby SnprBoB86 » Mon May 30, 2005 10:23 pm

Check this post: http://newtondynamics.com/forum/viewtopic.php?t=1264

Those files are still hosted, although I think they are a bit out of date. Let me know what you think (ie: Does it meet your expectations in terms of interface? Am I on the right track to making the defacto standard Newton Wrapper?)
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Postby Technium » Wed Jun 01, 2005 9:40 am

This managed wrapper is exactly what I'm after. What are the chances of adding the missing functionality? I'm thinking especially materials.

Although I haven't looked into it very much - am I right in thinking the wrapper is dependant on DirectX Mesh at the moment? Or is that just the tutorial?

One minor suggestion: if you're going for a nice OO layer then why rely on float[] all over the place? As far as I know it's just as quick to make a struct with properly named parameters inside. This would certainly make things like AngularVelocity, etc, more readable.

Using beta 2.0 is not a problem for me as I use the SDK with SharpDevelop.
--
Steve
Technium
 
Posts: 2
Joined: Wed Jun 01, 2005 9:27 am

Postby SnprBoB86 » Wed Jun 01, 2005 11:14 am

Technium == Quimbly ?

Aside from the .NET framework and Newton itself. I am building the wrapper to have no additional dependancies. D3D is only used in the tutorials.

The float array thing really bothers me also. I didn't want to use DirectX.Matrix and DirectX.Vector3 because I didn't want the dependancy on the DirectX library, but in the same respect I didn't want to create my own classes because the last thing the 3D programming world needs is ANOTHER set of vector and matrix classes. I need to investigate this further, but for now I am going with the float array technique because it works well for the original .NET wrapper (the non-OO version). Ultimately, I want a fast, implicit casting from the Newton types to any user type, but a fast, easy, explicit method is acceptable also. I'm open to suggestions.
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Postby Technium » Fri Jun 03, 2005 5:47 am

SnprBoB86 wrote:Technium == Quimbly ?

Now, but I was Quimby in another life so you had me confused for a moment!

SnprBoB86 wrote:The float array thing really bothers me also. I didn't want to use DirectX.Matrix and DirectX.Vector3 because I didn't want the dependancy on the DirectX library, but in the same respect I didn't want to create my own classes because the last thing the 3D programming world needs is ANOTHER set of vector and matrix classes.

After thinking about it, is seems the library will have to be made 3d-engine specific at some point for it to be truely useful. This is even more annoying as I haven't decided on a 3D engine to use yet :roll:

In the updated C# in beta 2.0 there is support for splitting class definitions into multiple files, but I can't remember the name of the technique. Basically it would allow you to define a simple NewtonVector3D class or struct and then later in another (3D engine specific) file, add implicit type conversions as if they were always part of the class.

I know you've done it in C++, but it's something to consider.
--
Steve
Technium
 
Posts: 2
Joined: Wed Jun 01, 2005 9:27 am

Postby SnprBoB86 » Fri Jun 03, 2005 8:11 am

I don't agree that the library needs to be engine specific to be useful. The original flat function collection managed newton wrapper was/is very useful to my home brew 3d engine.

The feature/technique you are thinking of is called partial classes, but it does not help me here as it simply allows a class to be coded in two separate files, not compiled in two separate assemblies are different times.

Another option, is to replace all the float[]'s and instead require ValueType parameters. This would allow any vector/matrix struct to be passed in and, assuming the struct has the appropriate field layout, would work fine. Unfortunately, this looses even more compile time checks than the float[] solution.

And still another option would to make my wrapper a source-based distribution. Something that would be "statically" linked (really meaning that you would set some #define or typedef and compile it yourself). This maybe the best solution, but there is something that fundamentally annoys me about this idea.
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Postby Quimbly » Fri Jun 03, 2005 11:26 am

SnprBoB86 wrote:Technium == Quimbly ?


:o
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby doknoise » Thu Nov 17, 2005 5:51 am

Can аnybody provide complete sample(c# or vb.net) how to create and controling vehicles using this wrapper. Help Please
doknoise
 
Posts: 2
Joined: Thu Nov 17, 2005 5:36 am

Postby SnprBoB86 » Thu Nov 17, 2005 9:40 pm

You can't, the wrapper is no where near complete. It is simply a preview of the ".NET-style" of the wrapper and really, could be completed in a short amount of time....that I don't have. I haven't been able to work on this wrapper, my 3d engine, or pretty much any other project I have at all since starting school this semester (plus work, and social life, it's really tiring).
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Postby doknoise » Fri Nov 18, 2005 8:41 am

thanks
doknoise
 
Posts: 2
Joined: Thu Nov 17, 2005 5:36 am

Postby jj, » Mon Nov 21, 2005 9:20 pm

I’ve tried dotNet version of Newton, and I guess it works. 8)

I’m would like to know is there any notNet version of toolbox (dMatrix, dVector etc.) :?:

Btw. I’m using Tao frame framework (http://www.mono-project.com/Tao) to support OpenGL in dotNet.

Way to go NewtonWrapper :D
jj,
 
Posts: 8
Joined: Mon Nov 21, 2005 9:10 pm

PreviousNext

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 13 guests