Problem in using Xj3D loader
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, May 23, 2002 08:59 PM

Hi all I am using the Xj3D Loader class to load VRML 2.0 3D models to the Java3D world. After the Canvas3D is displayed in the screen, I can only see a blank screen but I haven't seen any error msg in the console. So, I have tried clicking and draging the mouse and I found there is a very small object in the Canvas3D moving and I know that the 3D model has actually been imported to the Java3D but just don't know where it is loaded. My question is how to make the loaded object face to the viewer and also how to set the viewing distance that is suitable for the viewer to view loaded object. I believe the possible reason could be either the loaded object is too big or too small. Anyway it is just my guess and any suggestion   More>>

Hi all



I am using the Xj3D Loader class to load VRML 2.0 3D models to the Java3D world. After the Canvas3D is displayed in the screen, I can only see a blank screen but I haven't seen any error msg in the console. So, I have tried clicking and draging the mouse and I found there is a very small object in the Canvas3D moving and I know that the 3D model has actually been imported to the Java3D but just don't know where it is loaded.




My question is how to make the loaded object face to the viewer and also how to set the viewing distance that is suitable for the viewer to view loaded object. I believe the possible reason could be either the loaded object is too big or too small. Anyway it is just my guess and any suggestion is very very welcome because I need to solve that problem as soon as possible otherwise I could become jobless :-(.




Thank you very much !!



Kind Regards



Edmond




VRML file I have used (Hopefully linebreak is not neccessary)



#VRML V2.0 utf8

# This file is converted using vrml1to2 version 1.6
# This converter is based on Final VRML2.0 - August 4, 1996.
# This converter is provided by Sony.

Transform {
children [
Transform {
translation 1077 650.928 425.997
rotation -0.577317 0.577317 0.577417 2.09429
children [
DEF filecab Transform {
children [
Shape {
appearance Appearance {
material Material {
ambientIntensity 0.0941175
diffuseColor 0.196078 0.0823529 0.0235294
specularColor 0.560784 0.490196 0.435294
shininess 0.17
}
}
geometry IndexedFaceSet {
coord Coordinate {
point [
399.375 678 -3.40027e-005,
418 678 -3.40027e-005,
418 678 53,
399.375 678 53,
399.375 678 53,
419 678 53,
419 678 54,
399.375 678 54,
399.375 720 54,
399.375 720 -3.76745e-005,
399.375 678 -3.40027e-005,
399.375 678 54,
419 720 54,
419 720 53,
399.375 720 53,
399.375 720 54,
418 720 53,
418 720 -3.76745e-005,
399.375 720 -3.76745e-005,
399.375 720 53,
419 678 53,
419 720 53,
419 720 54,
419 678 54,
419 678 54,
419 720 54,
399.375 720 54,
399.375 678 54,
418 678 -3.40027e-005,
418 720 -3.76745e-005,
418 720 0.999966,
418 678 0.99997,
419 678 13.625,
419 720 13.625,
418 720 13.625,
418 678 13.625,
419.01 697 11.75,
419.01 701 11.75,
419.01 701 12.75,
419.01 697 12.75,
419 678 26.75,
419 720 26.75,
418 720 26.75,
418 678 26.75,
419.01 697 24.875,
419.01 701 24.875,
419.01 701 25.875,
419.01 697 25.875,
419.01 697 37.875,
419.01 701 37.875,
419.01 701 38.875,
419.01 697 38.875,
419 678 39.75,
419 720 39.75,
418 720 39.75,
418 678 39.75,
419 678 52.75,
419 720 52.75,
418 720 52.75,
418 678 52.75,
419.01 697 50.875,
419.01 701 50.875,
419.01 701 51.875,
419.01 697 51.875,
398.625 720 -3.76745e-005,
380 720 -3.76745e-005,
380 720 53,
398.625 720 53,
398.625 720 53,
379 720 53,
379 720 54,
398.625 720 54,
398.625 678 54,
398.625 678 -3.40027e-005,
398.625 720 -3.76745e-005,
398.625 720 54,
379 678 54,
379 678 53,
398.625 678 53,
398.625 678 54,
380 678 53,
380 678 -3.40027e-005,
398.625 678 -3.40027e-005,
398.625 678 53,
379 720 53,
379 678 53,
379 678 54,
379 720 54,
379 720 54,
379 678 54,
398.625 678 54,
398.625 720 54,
380 720 -3.76745e-005,
380 678 -3.40027e-005,
380 678 0.99997,
380 720 0.999966,
379 720 13.625,
379 678 13.625,
380 678 13.625,
380 720 13.625,
378.99 701 11.75,
378.99 697 11.75,
378.99 697 12.75,
378.99 701 12.75,
379 720 26.75,
379 678 26.75,
380 678 26.75,
380 720 26.75,
378.99 701 24.875,
378.99 697 24.875,
378.99 697 25.875,
378.99 701 25.875,
378.99 701 37.875,
378.99 697 37.875,
378.99 697 38.875,
378.99 701 38.875,
379 720 39.75,
379 678 39.75,
380 678 39.75,
380 720 39.75,
379 720 52.75,
379 678 52.75,
380 678 52.75,
380 720 52.75,
378.99 701 50.875,
378.99 697 50.875,
378.99 697 51.875,
378.99 701 51.875,
398.625 678 -3.40027e-005,
380 678 -3.40027e-005,
380 678 53,
398.625 678 53,
398.625 678 53,
379 678 53,
379 678 54,
398.625 678 54,
398.625 636 54,
398.625 636 -3.03309e-005,
398.625 678 -3.40027e-005,
398.625 678 54,
379 636 54,
379 636 53,
398.625 636 53,
398.625 636 54,
380 636 53,
380 636 -3.03309e-005,
398.625 636 -3.03309e-005,
398.625 636 53,
379 678 53,
379 636 53,
379 636 54,
379 678 54,
379 678 54,
379 636 54,
398.625 636 54,
398.625 678 54,
380 678 -3.40027e-005,
380 636 -3.03309e-005,
380 636 0.99997,
380 678 0.99997,
379 678 13.625,
379 636 13.625,
380 636 13.625,
380 678 13.625,
378.99 659 11.75,
378.99 655 11.75,
378.99 655 12.75,
378.99 659 12.75,
379 678 26.75,
379 636 26.75,
380 636 26.75,
380 678 26.75,
378.99 659 24.875,
378.99 655 24.875,
378.99 655 25.875,
378.99 659 25.875,
378.99 659 37.875,
378.99 655 37.875,
378.99 655 38.875,
378.99 659 38.875,
379 678 39.75,
379 636 39.75,
380 636 39.75,
380 678 39.75,
379 678 52.75,
379 636 52.75,
380 636 52.75,
380 678 52.75,
378.99 659 50.875,
378.99 655 50.875,
378.99 655 51.875,
378.99 659 51.875,
399.375 636 -3.03309e-005,
418 636 -3.03309e-005,
418 636 53,
399.375 636 53,
399.375 636 53,
419 636 53,
419 636 54,
399.375 636 54,
399.375 678 54,
399.375 678 -3.40027e-005,
399.375 636 -3.03309e-005,
399.375 636 54,
419 678 54,
419 678 53,
399.375 678 53,
399.375 678 54,
418 678 53,
418 678 -3.40027e-005,
399.375 678 -3.40027e-005,
399.375 678 53,
419 636 53,
419 678 53,
419 678 54,
419 636 54,
419 636 54,
419 678 54,
399.375 678 54,
399.375 636 54,
418 636 -3.03309e-005,
418 678 -3.40027e-005,
418 678 0.99997,
418 636 0.99997,
419 636 13.625,
419 678 13.625,
418 678 13.625,
418 636 13.625,
419.01 655 11.75,
419.01 659 11.75,
419.01 659 12.75,
419.01 655 12.75,
419 636 26.75,
419 678 26.75,
418 678 26.75,
418 636 26.75,
419.01 655 24.875,
419.01 659 24.875,
419.01 659 25.875,
419.01 655 25.875,
419.01 655 37.875,
419.01 659 37.875,
419.01 659 38.875,
419.01 655 38.875,
419 636 39.75,
419 678 39.75,
418 678 39.75,
418 636 39.75,
419 636 52.75,
419 678 52.75,
418 678 52.75,
418 636 52.75,
419.01 655 50.875,
419.01 659 50.875,
419.01 659 51.875,
419.01 655 51.875
]
}
coordIndex [
0, 1, 2, -1,
2, 3, 0, -1,
4, 5, 6, -1,
6, 7, 4, -1,
8, 9, 10, -1,
10, 11, 8, -1,
12, 13, 14, -1,
14, 15, 12, -1,
16, 17, 18, -1,
18, 19, 16, -1,
20, 21, 22, -1,
22, 23, 20, -1,
24, 25, 26, -1,
26, 27, 24, -1,
28, 29, 30, -1,
30, 31, 28, -1,
32, 33, 34, -1,
34, 35, 32, -1,
36, 37, 38, -1,
38, 39, 36, -1,
40, 41, 42, -1,
42, 43, 40, -1,
44, 45, 46, -1,
46, 47, 44, -1,
48, 49, 50, -1,
50, 51, 48, -1,
52, 53, 54, -1,
54, 55, 52, -1,
56, 57, 58, -1,
58, 59, 56, -1,
60, 61, 62, -1,
62, 63, 60, -1,
64, 65, 66, -1,
66, 67, 64, -1,
68, 69, 70, -1,
70, 71, 68, -1,
72, 73, 74, -1,
74, 75, 72, -1,
76, 77, 78, -1,
78, 79, 76, -1,
80, 81, 82, -1,
82, 83, 80, -1,
84, 85, 86, -1,
86, 87, 84, -1,
88, 89, 90, -1,
90, 91, 88, -1,
92, 93, 94, -1,
94, 95, 92, -1,
96, 97, 98, -1,
98, 99, 96, -1,
100, 101, 102, -1,
102, 103, 100, -1,
104, 105, 106, -1,
106, 107, 104, -1,
108, 109, 110, -1,
110, 111, 108, -1,
112, 113, 114, -1,
114, 115, 112, -1,
116, 117, 118, -1,
118, 119, 116, -1,
120, 121, 122, -1,
122, 123, 120, -1,
124, 125, 126, -1,
126, 127, 124, -1,
128, 129, 130, -1,
130, 131, 128, -1,
132, 133, 134, -1,
134, 135, 132, -1,
136, 137, 138, -1,
138, 139, 136, -1,
140, 141, 142, -1,
142, 143, 140, -1,
144, 145, 146, -1,
146, 147, 144, -1,
148, 149, 150, -1,
150, 151, 148, -1,
152, 153, 154, -1,
154, 155, 152, -1,
156, 157, 158, -1,
158, 159, 156, -1,
160, 161, 162, -1,
162, 163, 160, -1,
164, 165, 166, -1,
166, 167, 164, -1,
168, 169, 170, -1,
170, 171, 168, -1,
172, 173, 174, -1,
174, 175, 172, -1,
176, 177, 178, -1,
178, 179, 176, -1,
180, 181, 182, -1,
182, 183, 180, -1,
184, 185, 186, -1,
186, 187, 184, -1,
188, 189, 190, -1,
190, 191, 188, -1,
192, 193, 194, -1,
194, 195, 192, -1,
196, 197, 198, -1,
198, 199, 196, -1,
200, 201, 202, -1,
202, 203, 200, -1,
204, 205, 206, -1,
206, 207, 204, -1,
208, 209, 210, -1,
210, 211, 208, -1,
212, 213, 214, -1,
214, 215, 212, -1,
216, 217, 218, -1,
218, 219, 216, -1,
220, 221, 222, -1,
222, 223, 220, -1,
224, 225, 226, -1,
226, 227, 224, -1,
228, 229, 230, -1,
230, 231, 228, -1,
232, 233, 234, -1,
234, 235, 232, -1,
236, 237, 238, -1,
238, 239, 236, -1,
240, 241, 242, -1,
242, 243, 240, -1,
244, 245, 246, -1,
246, 247, 244, -1,
248, 249, 250, -1,
250, 251, 248, -1,
252, 253, 254, -1,
254, 255, 252, -1
]
normalPerVertex FALSE
solid FALSE
creaseAngle 3.14159
}
}
Shape {
appearance Appearance {
material Material {
ambientIntensity 0
diffuseColor 1 1 1
specularColor 1 1 1
shininess 0.44
}
}
geometry IndexedFaceSet {
coord Coordinate {
point [
419 720 27,
418 720 27,
418 720 39.75,
419 720 39.75,
419 678 27,
419 720 27,
419 720 39.75,
419 678 39.75,
418 678 39.75,
418 678 27,
419 678 27,
419 678 39.75,
419 720 13.875,
418 720 13.875,
418 720 26.75,
419 720 26.75,
419 678 13.875,
419 720 13.875,
419 720 26.75,
419 678 26.75,
418 678 26.75,
418 678 13.875,
419 678 13.875,
419 678 26.75,
419 720 0.999966,
418 720 0.999966,
418 720 13.625,
419 720 13.625,
418 678 13.625,
418 678 0.99997,
419 678 0.99997,
419 678 13.625,
419 678 0.99997,
419 720 0.999966,
419 720 13.625,
419 678 13.625,
418 678 52.75,
418 678 40,
419 678 40,
419 678 52.75,
419 678 40,
419 720 40,
419 720 52.75,
419 678 52.75,
419 720 40,
418 720 40,
418 720 52.75,
419 720 52.75,
379 678 27,
380 678 27,
380 678 39.75,
379 678 39.75,
379 720 27,
379 678 27,
379 678 39.75,
379 720 39.75,
380 720 39.75,
380 720 27,
379 720 27,
379 720 39.75,
379 678 13.875,
380 678 13.875,
380 678 26.75,
379 678 26.75,
379 720 13.875,
379 678 13.875,
379 678 26.75,
379 720 26.75,
380 720 26.75,
380 720 13.875,
379 720 13.875,
379 720 26.75,
379 678 0.99997,
380 678 0.99997,
380 678 13.625,
379 678 13.625,
380 720 13.625,
380 720 0.999966,
379 720 0.999966,
379 720 13.625,
379 720 0.999966,
379 678 0.99997,
379 678 13.625,
379 720 13.625,
380 720 52.75,
380 720 40,
379 720 40,
379 720 52.75,
379 720 40,
379 678 40,
379 678 52.75,
379 720 52.75,
379 678 40,
380 678 40,
380 678 52.75,
379 678 52.75,
379 636 27,
380 636 27,
380 636 39.75,
379 636 39.75,
379 678 27,
379 636 27,
379 636 39.75,
379 678 39.75,
380 678 39.75,
380 678 27,
379 678 27,
379 678 39.75,
379 636 13.875,
380 636 13.875,
380 636 26.75,
379 636 26.75,
379 678 13.875,
379 636 13.875,
379 636 26.75,
379 678 26.75,
380 678 26.75,
380 678 13.875,
379 678 13.875,
379 678 26.75,
379 636 0.99997,
380 636 0.99997,
380 636 13.625,
379 636 13.625,
380 678 13.625,
380 678 0.99997,
379 678 0.99997,
379 678 13.625,
379 678 0.99997,
379 636 0.99997,
379 636 13.625,
379 678 13.625,
380 678 52.75,
380 678 40,
379 678 40,
379 678 52.75,
379 678 40,
379 636 40,
379 636 52.75,
379 678 52.75,
379 636 40,
380 636 40,
380 636 52.75,
379 636 52.75,
418 636 13.625,
418 636 0.99997,
419 636 0.99997,
419 636 13.625,
419 678 27,
418 678 27,
418 678 39.75,
419 678 39.75,
419 636 27,
419 678 27,
419 678 39.75,
419 636 39.75,
418 636 39.75,
418 636 27,
419 636 27,
419 636 39.75,
419 678 13.875,
418 678 13.875,
418 678 26.75,
419 678 26.75,
419 636 13.875,
419 678 13.875,
419 678 26.75,
419 636 26.75,
418 636 26.75,
418 636 13.875,
419 636 13.875,
419 636 26.75,
419 678 0.99997,
418 678 0.99997,
418 678 13.625,
419 678 13.625,
419 636 0.99997,
419 678 0.99997,
419 678 13.625,
419 636 13.625,
418 636 52.75,
418 636 40,
419 636 40,
419 636 52.75,
419 636 40,
419 678 40,
419 678 52.75,
419 636 52.75,
419 678 40,
418 678 40,
418 678 52.75,
419 678 52.75
]
}
coordIndex [
0, 1, 2, -1,
2, 3, 0, -1,
4, 5, 6, -1,
6, 7, 4, -1,
8, 9, 10, -1,
10, 11, 8, -1,
12, 13, 14, -1,
14, 15, 12, -1,
16, 17, 18, -1,
18, 19, 16, -1,
20, 21, 22, -1,
22, 23, 20, -1,
24, 25, 26, -1,
26, 27, 24, -1,
28, 29, 30, -1,
30, 31, 28, -1,
32, 33, 34, -1,
34, 35, 32, -1,
36, 37, 38, -1,
38, 39, 36, -1,
40, 41, 42, -1,
42, 43, 40, -1,
44, 45, 46, -1,
46, 47, 44, -1,
48, 49, 50, -1,
50, 51, 48, -1,
52, 53, 54, -1,
54, 55, 52, -1,
56, 57, 58, -1,
58, 59, 56, -1,
60, 61, 62, -1,
62, 63, 60, -1,
64, 65, 66, -1,
66, 67, 64, -1,
68, 69, 70, -1,
70, 71, 68, -1,
72, 73, 74, -1,
74, 75, 72, -1,
76, 77, 78, -1,
78, 79, 76, -1,
80, 81, 82, -1,
82, 83, 80, -1,
84, 85, 86, -1,
86, 87, 84, -1,
88, 89, 90, -1,
90, 91, 88, -1,
92, 93, 94, -1,
94, 95, 92, -1,
96, 97, 98, -1,
98, 99, 96, -1,
100, 101, 102, -1,
102, 103, 100, -1,
104, 105, 106, -1,
106, 107, 104, -1,
108, 109, 110, -1,
110, 111, 108, -1,
112, 113, 114, -1,
114, 115, 112, -1,
116, 117, 118, -1,
118, 119, 116, -1,
120, 121, 122, -1,
122, 123, 120, -1,
124, 125, 126, -1,
126, 127, 124, -1,
128, 129, 130, -1,
130, 131, 128, -1,
132, 133, 134, -1,
134, 135, 132, -1,
136, 137, 138, -1,
138, 139, 136, -1,
140, 141, 142, -1,
142, 143, 140, -1,
144, 145, 146, -1,
146, 147, 144, -1,
148, 149, 150, -1,
150, 151, 148, -1,
152, 153, 154, -1,
154, 155, 152, -1,
156, 157, 158, -1,
158, 159, 156, -1,
160, 161, 162, -1,
162, 163, 160, -1,
164, 165, 166, -1,
166, 167, 164, -1,
168, 169, 170, -1,
170, 171, 168, -1,
172, 173, 174, -1,
174, 175, 172, -1,
176, 177, 178, -1,
178, 179, 176, -1,
180, 181, 182, -1,
182, 183, 180, -1,
184, 185, 186, -1,
186, 187, 184, -1,
188, 189, 190, -1,
190, 191, 188, -1
]
normalPerVertex FALSE
solid FALSE
creaseAngle 3.14159
}
}
]
}
]
}
]
}    <<Less
About | Sitemap | Contact