Posted By

smithy on 03/02/16


Tagged


Versions (?)

X3D to X3DV conversion


 / Published in: XML
 

I'm making an app in Java that loads and displays X3DV files, I have a testing class that loads a file called test.x3dv which is a rotating red cube, and I'm using Xj3D to import it into Java. However, I have about 90 different X3D files that I want to display and it wont load in the test class as they aren't X3DV files. I was wondering if there's a way of changing X3D files into X3DV files.

  1. The code for the test.x3dv is as follows:
  2.  
  3. #X3D V3.0 utf8
  4.  
  5. PROFILE Interactive
  6.  
  7. DEF TS TimeSensor {
  8. cycleInterval 3
  9. loop TRUE
  10. }
  11.  
  12. DEF TG Transform {
  13. rotation 0 1 0 0
  14. children Shape {
  15. geometry Box {}
  16. appearance Appearance {
  17. material DEF MAT Material {
  18. diffuseColor 1 0 0
  19. }
  20. }
  21. }
  22. }
  23.  
  24. DEF OI OrientationInterpolator {
  25. key [ 0 0.5 1 ]
  26. keyValue [
  27. 0 1 0 0
  28. 0 1 0 3.14
  29. 0 1 0 6.28
  30. ]
  31. }
  32.  
  33. ROUTE TS.fraction_changed TO OI.set_fraction
  34. ROUTE OI.value_changed TO TG.rotation

Report this snippet  

You need to login to post a comment.