










(**************************************************************************)
(* $Id: world.ml,v 1.2 1997/04/24 17:59:31 doub Exp $                     *)
(* Creation and manipulation of VRML worlds                               *)
(**************************************************************************)

open Compatibility;;
open Types;;
open Default;;
open Exceptions;;
open Basic_types;;
open Font;;
open Fonts;;
open Colors;;
open Vrml_objects_pre;;
open Calc_3D;;
open Vrml_objects_post;;
open Positionables;;
open Geometrics;;
open Geometric_properties;;
open Map;;
open Complex_geometrics;;
open Map_complex;;
open Lights;;
open Map_light;;
open Sound;;
open Frame_manipulations;;
open Specials;;


(**************************************************************************)
(* VRML world                                                             *)
(**************************************************************************)

(* new_vrml_world :
   string list -> string -> vrml_object -> vrml_special list
-> animation list -> vrml_world *)
let new_vrml_world info title tree specials animations =
    { info       = info ;
      title      = title ;
      tree       = tree ;
      specials   = specials ;
      animations = animations }
;;

(* set_info : vrml_world -> string list -> vrml_world *)
let set_info world info =
    new_vrml_world info world.title world.tree
                   world.specials world.animations
;;

(* set_title : vrml_world -> string -> vrml_world *)
let set_title world title =
    new_vrml_world world.info title world.tree
                   world.specials world.animations
;;

(* set_tree : vrml_world -> vrml_object -> vrml_world *)
let set_tree world tree =
    new_vrml_world world.info world.title tree
                   world.specials world.animations
;;

(* set_specials : vrml_world -> vrml_special list -> vrml_world *)
let set_specials world specials =
    new_vrml_world world.info world.title world.tree
                   specials world.animations
;;

(* add_special : vrml_world -> vrml_special -> vrml_world *)
let add_special world special =
    new_vrml_world world.info world.title world.tree
                   (special::(world.specials)) world.animations
;;

(* set_animations : vrml_world -> animation list -> vrml_world *)
let set_animations world animations =
    new_vrml_world world.info world.title world.tree
                   world.specials animations
;;

(* add_animation : vrml_world -> animation -> vrml_world *)
let add_animation world animation =
    new_vrml_world world.info world.title world.tree world.specials
                   (animation::(world.animations))
;;

