import jnius_config
jnius_config.set_classpath('.', '../../../jars/X3DJSAIL.3.3.full.jar')
from jnius import autoclass
from X3Dautoclass import *
X3D0 = X3D() \
   .setProfile("Interchange") \
   .setVersion("3.0") \
   .setHead(head() \
    .addMeta(meta() \
     .setContent("material.x3d") \
     .setName("title") \
    ) \
    .addMeta(meta() \
     .setContent("material-front.jpg") \
     .setName("Image") \
    ) \
    .addMeta(meta() \
     .setContent("http://www.nist.gov/vrml.html") \
     .setName("reference") \
    ) \
    .addMeta(meta() \
     .setContent("http://www.itl.nist.gov/div897/ctg/vrml/vrml.html") \
     .setName("reference") \
    ) \
    .addMeta(meta() \
     .setContent("http://www.itl.nist.gov/div897/ctg/vrml/members.html") \
     .setName("creator") \
    ) \
    .addMeta(meta() \
     .setContent("This file was provided by the National Institute of Standards and Technology, and is part of the X3D Conformance Test Suite, available at http://www.nist.gov/vrml.html The information contained within this file is provided for use in establishing conformance to the ISO VRML97 Specification. Conformance to this test does not imply recommendation or endorsement by the National Institute of Standards and Technology. This software can be redistributed and/or modified freely provided that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified.") \
     .setName("disclaimer") \
    ) \
    .addMeta(meta() \
     .setContent("Correct definition and compliance of this conformance scene is maintained by the X3D Working Group, http://www.web3d.org/working-groups/x3d") \
     .setName("info") \
    ) \
    .addMeta(meta() \
     .setContent("Michael Kass NIST, Don Brutzman NPS") \
     .setName("translator") \
    ) \
    .addMeta(meta() \
     .setContent("21 January 2001") \
     .setName("translated") \
    ) \
    .addMeta(meta() \
     .setContent("14 January 2014") \
     .setName("modified") \
    ) \
    .addMeta(meta() \
     .setContent("Test of Appearance node ability to accept a Material node as an argument for the material field. Browser should generate thee Sphere geometry, with the top Sphere receiving a red diffuseColor, the bottom-right Sphere receiving a yellow emissiveColor, and the bottom-left sphere having a 0.57 transparency value.") \
     .setName("description") \
    ) \
    .addMeta(meta() \
     .setContent("http://www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/Appearance/material.x3d") \
     .setName("identifier") \
    ) \
    .addMeta(meta() \
     .setContent("Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html") \
     .setName("generator") \
    ) \
    .addMeta(meta() \
     .setContent("X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit") \
     .setName("generator") \
    ) \
    .addMeta(meta() \
     .setContent("../../license.html") \
     .setName("license") \
    ) \
   ) \
   .setScene(Scene() \
    .addChild(Group() \
     .addChild(Viewpoint() \
      .setDescription("Front View") \
      .setPosition([0,0,15]) \
     ) \
     .addChild(Viewpoint() \
      .setDescription("Rear View") \
      .setOrientation([0,1,0,3.14]) \
      .setPosition([0,0,-15]) \
     ) \
     .addChild(Viewpoint() \
      .setDescription("Top View") \
      .setOrientation([1,0,0,-1.57]) \
      .setPosition([0,15,0]) \
     ) \
     .addChild(Viewpoint() \
      .setDescription("Bottom View") \
      .setOrientation([1,0,0,1.57]) \
      .setPosition([0,-15,0]) \
     ) \
     .addChild(Viewpoint() \
      .setDescription("Right View") \
      .setOrientation([0,1,0,1.57]) \
      .setPosition([15,0,0]) \
     ) \
     .addChild(Viewpoint() \
      .setDescription("Left View") \
      .setOrientation([0,1,0,-1.57]) \
      .setPosition([-15,0,0]) \
     ) \
    ) \
    .addChild(Transform() \
     .setTranslation([0,2,0]) \
     .addChild(Shape() \
      .setAppearance(Appearance() \
       .setMaterial(Material() \
        .setAmbientIntensity(0.25) \
        .setDiffuseColor([0.748016,0,0.0400871]) \
        .setShininess(0) \
       ) \
      ) \
      .setGeometry(Sphere() \
      ) \
     ) \
    ) \
    .addChild(Transform() \
     .setTranslation([-2,0,0]) \
     .addChild(Shape() \
      .setAppearance(Appearance() \
       .setMaterial(Material() \
        .setAmbientIntensity(0.25) \
        .setDiffuseColor([0.748016,0.748016,0.748016]) \
        .setShininess(1) \
        .setSpecularColor([0.89697,0.89697,0.89697]) \
        .setTransparency(0.574468) \
       ) \
      ) \
      .setGeometry(Sphere() \
      ) \
     ) \
    ) \
    .addChild(Transform() \
     .setTranslation([2,0,0]) \
     .addChild(Shape() \
      .setAppearance(Appearance() \
       .setMaterial(Material() \
        .setAmbientIntensity(0) \
        .setDiffuseColor([0,0,0]) \
        .setEmissiveColor([0.957447,0.916761,0.102624]) \
        .setShininess(0) \
       ) \
      ) \
      .setGeometry(Sphere() \
      ) \
     ) \
    ) \
   ) \

X3D0.toFileX3D("/x3d-code/www.web3d.org/x3d/content/examples/ConformanceNist/Appearance/Appearance/material.newf.x3d")
