This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > September 2004 > send vrml scene through network





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author send vrml scene through network
juicy

2004-09-04, 4:19 am

Hi everybody,
i have done a simple EAI program (add and delete object, object
translation, change object's color). My question is , how to send vrml
scene through network? (by sending vrml nodes? events?)
I realy do not have any idea about that. Any help will be appreciated.

Joerg Scheurich aka MUFTI

2004-09-04, 4:19 am

> My question is , how to send vrml
> scene through network? (by sending vrml nodes? events?)
> I realy do not have any idea about that. Any help will be appreciated.


There are different ways. How about using createVrmlFromURL ?

so long
MUFTI
--
Wenn Ihr CD-ROM Antrieb Brief d nicht ist, tauschen Sie ihren CDROM Antrieb
fuer d in der Fuehrung aus.
(aus einem Softwarehandbuch, Stichworte: drive und letter)
juicy

2004-09-08, 12:17 pm


But CreateVrmlFromURL seem just load wrl files from harddisk..i still not
very sure how to implement it in my program. Lets say i have an add and
remove sphere program like below, then how to use the method in the
world?

public void init() {
add(new Button("Add Sphere"));
add(new Button("Remove Sphere"));
browser = Browser.getBrowser(this);

try {

root = browser.getNode("ROOT");
addChildren = (EventInMFNode) root.getEventIn("addChildren");
removeChildren = (EventInMFNode) root.getEventIn("removeChildren");

shape = browser.createVrmlFromString("Shape {\n" +
" appearance Appearance {\n" +
" material Material {\n" +
" diffuseColor 0.2 0.2 0.8\n" +
" }\n" +
" }\n" +
" geometry Sphere {}\n" +
"}\n");
}
finally{}
}

public boolean action(Event event, Object what) {
if (event.target instanceof Button) {
Button b = (Button) event.target;
if (b.getLabel() == "Add Sphere") {
addChildren.setValue(shape);

}
else if (b.getLabel() == "Remove Sphere") {
removeChildren.setValue(shape);
}
}
return true;
}

Thanks for your reply.

Muaddib

2004-09-19, 7:16 pm



juicy wrote:
> But CreateVrmlFromURL seem just load wrl files from harddisk.

No, it loads vrml from any url.


--
-------------------------------------------------------
VRSpace - An open source, modular, cross-platform,
multi-user vrml system with persistent shared objects.
Check out the Nexus at http://www.vrspace.org/
-------------------------------------------------------

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews