Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I think about physics and animation via plugin.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Plugins
View previous topic :: View next topic  
Author Message
D.J.Peters
Member


Joined: 11 Nov 2007
Posts: 8
Location: Germany

PostPosted: Sun Nov 11, 2007 4:12 pm    Post subject: I think about physics and animation via plugin. Reply with quote

First i'm new with DeleD 3D.

If we can move primitives (selected or all) in curent scene via PR_SETDATA request is there a draw scene or refresh view3D?

can you post a short *.xml sequence to move the curent selected primitive to a new position or how to change the curent orientation of an object?

thanx Joshy
_________________
Sorry about my bad English!
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Sun Nov 11, 2007 4:39 pm    Post subject: Reply with quote

The plugin API allows you to fetch data from DeleD, change it in your own plugin (for example, move the geometry as in your example) and then reload it back into DeleD. After it has been reloaded into DeleD, the 3D view(s) will get updated too. So, as updating geometry is done inside your plugin, you won't see the 3D view being updated until you send the modified data back to DeleD again.

I would create my own 3D view inside the plugin and show the changes in there. In the future, the plugin API might get enhanced but it has a low(er) priority at the moment.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
D.J.Peters
Member


Joined: 11 Nov 2007
Posts: 8
Location: Germany

PostPosted: Sun Nov 11, 2007 10:11 pm    Post subject: Reply with quote

Hello Jeroen where i can get the right xml string's to move or rotate an selected object. The two short plugin examples isn't a good help for this trivial task.

thanx Joshy
_________________
Sorry about my bad English!
Back to top
View user's profile Send private message Visit poster's website
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Sun Nov 11, 2007 10:22 pm    Post subject: Reply with quote

You cannot access DeleD commands via plugins (yet). You will have to write your own routines to modify the scene geometry.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
D.J.Peters
Member


Joined: 11 Nov 2007
Posts: 8
Location: Germany

PostPosted: Sun Nov 11, 2007 10:59 pm    Post subject: Reply with quote

Mr.Fletcher wrote:
...You will have to write your own routines to modify the scene geometry.
sure but how? where can i get an example to modify the scene via XML?

please post an short example (only the xml part)

thanx Joshy
_________________
Sorry about my bad English!
Back to top
View user's profile Send private message Visit poster's website
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Sun Nov 11, 2007 11:06 pm    Post subject: Reply with quote

You don't modify the scene in XML. You do it internally. XML is only used to read/write the scene data from/to DeleD.
This is what you would do:

1. Get the scene geometry (XML) from DeleD
2. Store the data in your own class structure
3. let the plugin modify the data in your scene data classes
4. convert the data stored in your classes back to XML and
5. parse the XML back to DeleD

1 and 5 are shown in the examples files.
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
D.J.Peters
Member


Joined: 11 Nov 2007
Posts: 8
Location: Germany

PostPosted: Mon Nov 12, 2007 11:39 am    Post subject: Reply with quote

ok thanx Mr.Fletcher

Joshy
_________________
Sorry about my bad English!
Back to top
View user's profile Send private message Visit poster's website
Il Buzzo
DeleD PRO user


Joined: 12 Aug 2004
Posts: 271
Location: Italy

PostPosted: Mon Nov 12, 2007 6:40 pm    Post subject: Reply with quote

Hi All,
As soon as I'll release Visual C++ Plugin wizard you'll access each DeleD object easily but remember it's necessary an object definition knowledge cause DeleD objects structure is reflected in my plugin. Just as sample let's say I have a simple cube in DeleD. I'll read with my plugin, so I'll have a scene class (in C++) that contain an object (the cube). Now I can access each vertex or face of object or everything you can imagine and eventually modiphy it and repass to DeleD (without thinking to xml that is handled to a lowest level by my plugin structure). But remember that you need to know xml fields (just say id of an object, vertex etc..) cause you need to know how DeleD handle objs (or your changes could eventually create an unusable object).
Bye Wink
Back to top
View user's profile Send private message Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Thu Nov 15, 2007 8:59 pm    Post subject: Reply with quote

You can also use the XML parser and DeleD scene graph that's used in NuXporter and LevelWalker. Both of them are available from GoogleCode.

http://code.google.com/p/nuxporter/source
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum