View previous topic :: View next topic |
Author |
Message |
D.J.Peters Member
Joined: 11 Nov 2007 Posts: 8 Location: Germany
|
Posted: Sun Nov 11, 2007 4:12 pm Post subject: I think about physics and animation via plugin. |
|
|
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 |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Sun Nov 11, 2007 4:39 pm Post subject: |
|
|
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 |
|
|
D.J.Peters Member
Joined: 11 Nov 2007 Posts: 8 Location: Germany
|
Posted: Sun Nov 11, 2007 10:11 pm Post subject: |
|
|
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 |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Sun Nov 11, 2007 10:22 pm Post subject: |
|
|
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
DeleD on IRC |
|
Back to top |
|
|
D.J.Peters Member
Joined: 11 Nov 2007 Posts: 8 Location: Germany
|
Posted: Sun Nov 11, 2007 10:59 pm Post subject: |
|
|
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 |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Sun Nov 11, 2007 11:06 pm Post subject: |
|
|
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
DeleD on IRC |
|
Back to top |
|
|
D.J.Peters Member
Joined: 11 Nov 2007 Posts: 8 Location: Germany
|
Posted: Mon Nov 12, 2007 11:39 am Post subject: |
|
|
ok thanx Mr.Fletcher
Joshy _________________ Sorry about my bad English! |
|
Back to top |
|
|
Il Buzzo DeleD PRO user
Joined: 12 Aug 2004 Posts: 271 Location: Italy
|
Posted: Mon Nov 12, 2007 6:40 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Thu Nov 15, 2007 8:59 pm Post subject: |
|
|
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 |
|
|
|