Bonjour;
Pour de charger un fichier VRML(.WRL) avec java3D, j'ai utlisé le code suivant :
et ça donne des erreurs :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import com.sun.j3d.loaders.vrml97.VrmlLoader; public class MyLoaderVRML extends JFrame { public MyLoaderVRML ( ) { BranchGroup scene = loadScene(); } public BranchGroup loadScene ( ) { BranchGroup rootBG = new BranchGroup ( ); VRML97Loader loaderVRML = new VRML97Loader(); Scene theScene = null; theScene = loaderVRML.load("test.WRL" ); Node forme = theScene.getSceneGroup(); root.addChild(forme); return root; } public static void main(String args[]) { new MyLoaderVRML (); } }
package com.sun.j3d.loaders.vrml97 does not exist
cannot find symbol class VRML97Loader
il parait qu'il ne retrouve pas le VRML97Loader, pourtant j'ai installé Xj3d et le ficchier 'VRML97Loader.jar' existe aussi.
je serai trés reconnaissante si vous pouvez m'aider
Partager