Brief  Description of  MFACTORY  PROTO.
 

    1. What is it?

         It is a black box that generate mover(s) that you can use in your world.
         It is defined in 'mfactory.wrl' file.

         There are several fields, or let say parameters, that you can designate the values:
           - initially_running:     decides whether mfactory should starts automatically or not.
           - name:    name of the mfactory to be displayed on the screen.
           - position:     place where you want the mfactory to be.
           - howMany:    the number of movers to be generated.
           - interval:    time between each generated movers.
           - vizMode:    make the mover visible or not.
           - viz:    use defined geometry which will be used for the mover.
 

    2. How do we use it?

           1) You need the following files  in your directory.
               -  mfactory.wrl : defines the MFACTORY  PROTO.
               -  forms.wrl : defines the REDMAN  PROTO. You can define your own mover geometries here.
               -  label.wrl : defines the LABEL PROTO.

           2) Declare the EXTERNPROTO MFACTORY and the REDMAN  PROTO in your world:

                                EXTERNPROTO MFACTORY
                                [
                                    field        SFBool      initially_running
                                    field        MFString   name
                                    field        SFVec3f     position
                                    field        SFInt32     howMany
                                    field        SFTime     interval
                                    field        SFInt32     vizMode
                                    field        SFNode     viz
                                    field        SFInt32     basenum
                                    field        SFNode     vizprotostgnode
                                    eventIn    SFBool     start
                                    eventIn    SFTime    setMoverPace
                                    eventOut  SFNode    aMover
                                    eventOut  SFBool     stop
                               ] "mfactory.wrl#MFACTORY"

                               EXTERNPROTO REDMAN
                               [
                                    field    SFVec3f    toledo
                               ] "forms.wrl#REDMAN"

           3) Use it in your world as follows:

                        DEF  mGenerator MFACTORY { initially_running  FALSE     name   ""
                                                                                 position  -3.5  1  12               howMany  1
                                                                                 interval  1                             vizMode     0
                                                                                 viz  REDMAN {} }
                          ...

                        ROUTE    Switch.state_changed    TO   mGenerator.start

               - Above code will generate a mover when a Boolean value is passed to the eventIn start.
                  No name will be shown on the screen and the REDMAN PROTO is used for the
                  geometry of the mover.               .

               - The vizMode value 0 is used to make the mover visible and 2 is used to make it invisible.

               - If you want to make the mfactory to generate mover(s) automatically, the value of the field
                 'initially_running' should be set to TRUE.
 

    3. Sample worlds with the MFACTORY PROTO implemented.

             Functional Block Model (FBM):

                - ...FBM World with one function...............files used for the world

                - ...FBM World with three functions........files used for the world