Newton .NET wrapper

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

Moderator: Alain

Postby Quimbly » Wed Dec 22, 2004 12:09 pm

What happened to _vlad?! :shock:

Sorry for the confusion; it was my code that was the problem, not the wrapper. Applogies.
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby The unProfessional » Wed Dec 22, 2004 1:39 pm

He's around. He's having some problems with his computer so he may not be able to access the forum. He'll be back I'm sure.
The unProfessional
 
Posts: 131
Joined: Sun May 02, 2004 9:08 pm
Location: Southern California

Postby Quimbly » Thu Dec 23, 2004 1:07 pm

The unProfessional wrote:He's around. He's having some problems with his computer so he may not be able to access the forum. He'll be back I'm sure.


I just found it confusing that that he changed to uvlad from _vlad!

Anyway... :D


You know what would be really good to go with this Newton.NET download? A re-write of the Tutorials from the Newton download. I'm slowly working my way through them, but it would be much easier if I had some examples to go on.

Just a thought. Thanks.
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby uvlad » Thu Dec 23, 2004 1:46 pm

I am _vlad
"u" stands for "_" in uvlad
I couldn't log with _vlad, maybe I think I forgot the password, strange.
Anyway I created a new account with uvlad.

Yes a simple exemple of how to use my wrapper would be cool for beginning to use the wrapper. Something like a cube falling on a plane.
I cannot develop actually and for quite some time (hdd crashed+relocation+work). All I have now is a P150.

I have put 2 demos of the wrapper in the showcase but they're not so simple.

PS : I'll start working in january on a sdk for 3d chips for mobile phones and PDAs near london. cool. 1st work.
uvlad
 
Posts: 4
Joined: Mon Dec 20, 2004 2:07 pm

Postby Quimbly » Thu Dec 23, 2004 2:06 pm

Thanks very much for all the hard work, by the way. I'm starting to love Newton thanks to you.

Ok, next question. I notice that Newton. BodyGetMassMatrix uses pointers?! What's with that?

I've never used pointers in C# before. I'm a C++ programmer, so I understand what to do with them, but when I try to use them in C#, I get a compiler error:
Pointers may only be used in an unsafe context


I'm sure there's a reason why you're passing these variables as pointers rather than by C# reference. Can you explain it?

Also, how do I switch to unsafe mode?! What implications are there about using pointers in unsafe mode in C#?
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby Sascha Willems » Thu Dec 23, 2004 2:13 pm

To get into unsafe mode in C# :
- Tell your compiler that you want to allow unsafe-code in the project's settings (VC# 2005 : Project Settings->Build->Allow unsafe code)
- You can only use unsfae code in an unsafe namespace class, or whatever. So when defining your namespace, write e.g. unsafe partial class MyClass.

But it's also possible to use pointers in C# without the need for unsafe sections. AFAIK you need to use the Marshal to to that.
User avatar
Sascha Willems
Moderator
Moderator
 
Posts: 346
Joined: Fri Aug 27, 2004 10:18 am
Location: Germany

Postby uvlad » Fri Dec 24, 2004 9:32 am

Yep, I was a little lazy with Newton.BodyGetMassMatrix()
You have to surround the function call with the
Code: Select all
unsafe {
}
statement (no need to define a whole class or namespace unsafe)
and tell your compiler to accept unsafecode (like said Sascha).
If you fail look at my demos.

I'm sure there is a way to wrap this function better though.
uvlad
 
Posts: 4
Joined: Mon Dec 20, 2004 2:07 pm

Postby Quimbly » Tue Jan 04, 2005 5:31 pm

Where can I find your demos?
Quimbly
 
Posts: 35
Joined: Wed Nov 03, 2004 6:45 pm

Postby Robert Lettan » Tue Jan 11, 2005 6:33 am

Vlad you seem to be using .NET 1.1 Compatibility, which means it actually uses MSIL Old-CLR (1.0), but compatible with each version.

If you could work on a .NET 2.0 version Sasha that would be great. I started one in C# but there are a few things that without using unsafe seem be unobtainable currently. Difference with using unsafe in C# and C++ is that the C# version must be unsafe in the end-user code as well which can cause problems.

Not tried to use C++ as C# has spoilt me heh, it seems hard to go back to something that feels so limiting and messy.

:) Thanks for the update to Newton 1.30 Vlad, look forward to getting stuck into it. Should really help my current project.
User avatar
Robert Lettan
 
Posts: 8
Joined: Sat Nov 20, 2004 1:51 am
Location: England

Postby SnprBoB86 » Thu Feb 03, 2005 5:00 pm

Has development stopped?

I see uvlad has had some troubles with his computer, but I would like to know the state of development with the .NET wrapper. The wrapper has been working quite well for me so far, thank you!

I am moving forward very quickly with my NGD integration and the lack of basic functions such as NewtonJointDestroy is hurting me.

Is development going to continue? And if so, at what pace?

I really would not like to have to wrap the functions I need myself, but it would give me an excuse to finally learn MC++
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

Me too

Postby Haddd » Wed Mar 16, 2005 5:39 am

hi, we are developing a 3d engine focused on shaders 2.0 and .Net 2.0. I want to include a physics engine bit i want a .net . the sourceforge option looks promissing, but if it has no continuity.

If someone is working on it, sure i will give a try, and check the bugs!!!

And by now, let's me to introduce the engine:

All you can see was started at november 2004. And it's all Managed
Code and C# Express!!! It's great, MDX is fantastic

The first one in Spanish, but...graphics it's an universal language


http://www.funmangames.com/haddd/video.avi

The second one, very different

http://www.telefonica.net/web/haddd/sh/ ... h_demo.avi
Haddd
 
Posts: 35
Joined: Wed Mar 16, 2005 5:06 am

Postby BigB » Wed Mar 16, 2005 1:29 pm

Very nice man :)
Looking very good
BigB
 
Posts: 78
Joined: Sun Mar 21, 2004 8:08 pm

Postby Sury » Wed Mar 16, 2005 4:11 pm

All you can see was started at november 2004. And it's all Managed
Code and C# Express!!! It's great, MDX is fantastic


I can see you are doing a great job with C# and MDX :!:
Congrats man, this is looking outstanding !!

Do you know what's the performance like compared to unmanaged C++/ DX9 ?
I heard MDX is a bit slow and undocumented, but from what i can see it definately rocks either way!
Last edited by Sury on Wed Mar 16, 2005 4:30 pm, edited 1 time in total.
User avatar
Sury
 
Posts: 193
Joined: Sat Aug 14, 2004 5:32 am
Location: Bulgaria

Postby The unProfessional » Wed Mar 16, 2005 4:27 pm

From what I can tell, it isn't really slow because it's basically just a wrapper. And it's not "managed" in the sense that regular windows C# is. As far as I can tell, it's just a .NET wrapper for DX. In terms of rendering and so forth, it should be just as fast, as that's really just the gfx hardware. However, complex algorithms running on the CPU through .Net would undoubtedly be faster in C++ (but studies have shown that the speed differences aren't all that significant).
The unProfessional
 
Posts: 131
Joined: Sun May 02, 2004 9:08 pm
Location: Southern California

Postby SnprBoB86 » Wed Mar 16, 2005 6:23 pm

The wrapper is most certainly "managed". It is written with Managed C++ which makes it mixed mode managed and unmanaged. 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.

There should be little to no performance hit for using the wrapper.
Managed C++ is exactly what Managed DX was written with, and it achieves 98% to 99% performance on a call for call basis.
SnprBoB86
 
Posts: 26
Joined: Mon Jan 24, 2005 5:53 pm

PreviousNext

Return to User Gallery

Who is online

Users browsing this forum: No registered users and 2 guests

cron