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
|
|
|
| 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-01, 12:17 pm |
| > 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)
| |
|
|
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.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|