










(*****************************************************************************)
(* $Id: animations.ml,v 1.2 1997/05/01 13:58:18 doub Exp $                       *)
(* Basic creation and manipulation functions for animations                  *)
(*****************************************************************************)

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;;
open World;;
open Translate;;

(* new_animation :
   vrml_object -> trigger list -> trigger list -> bool -> float -> bool
-> changing list -> animation *)
let new_animation target starts stops loop duration memory movie =
  { target        = target ;
    start_trigger = starts ;
    stop_trigger  = stops ;
    loop          = loop ;
    duration      = duration ;
    memory        = memory ;
    movie         = movie }
;;

(* setf_animation_target : animation -> vrml_object -> animation *)    
let setf_animation_target animation target =
    new_animation target animation.start_trigger
                  animation.stop_trigger animation.loop
                  animation.duration animation.memory
                  animation.movie
;;

(* setf_animation_start_trigger :
   animation -> trigger list -> animation *)
let setf_animation_start_trigger animation starts =
    new_animation animation.target starts
                  animation.stop_trigger animation.loop
                  animation.duration animation.memory
                  animation.movie
;;

(* setf_animation_stop_trigger :
   animation -> trigger list -> animation *)
let setf_animation_stop_trigger animation stops =
    new_animation animation.target animation.start_trigger
                  stops animation.loop animation.duration
                  animation.memory animation.movie
;;

(* etf_animation_loop : animation -> bool -> animation *)
let setf_animation_loop animation loop =
    new_animation animation.target animation.start_trigger
                  animation.stop_trigger loop animation.duration
                  animation.memory animation.movie
;;

(* setf_animation_duration : animation -> float -> animation *)
let setf_animation_duration animation duration =
    new_animation animation.target animation.start_trigger
                  animation.stop_trigger animation.loop
                  duration animation.memory animation.movie
;;

(* setf_animation_memory : animation -> bool -> animation *)
let setf_animation_memory animation memory =
    new_animation animation.target animation.start_trigger
                  animation.stop_trigger animation.loop
                  animation.duration memory animation.movie
;;

(* setf_animation_movie : animation -> changing list -> animation *)
let setf_animation_movie animation movie =
    new_animation animation.target animation.start_trigger
                  animation.stop_trigger animation.loop
                  animation.duration animation.memory movie
;;
    
