Square

#VRML V2.0 utf8

PROTO Square [ field SFRotation rotation 0 0 1 0
	       field SFVec3f size 1 1 1
	       field SFVec3f position 0 0 0
	       field SFColor color 1 1 1
	       eventIn SFRotation set_rotation
	     ]
{
   Transform {
      translation IS position
      rotation IS rotation
      set_rotation IS set_rotation
      scale IS size
      children Shape {
	 appearance Appearance {
	    material Material {
	       diffuseColor IS color
	    }
	 }
	 geometry IndexedFaceSet {
	    coord Coordinate {
	       point [ 1 1 0, -1 1 0, -1 -1 0, 1 -1 0 ]
	    }
	    coordIndex [ 0 1 2 3 ]
	 }
      }
   }
}



mrl