Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Flocking.Bird"/> class.
 /// </summary>
 /// <param name='l'>
 /// L. the initial position of this bird
 /// </param>
 /// <param name='ms'>
 /// Ms. max speed this bird can attain
 /// </param>
 /// <param name='mf'>
 /// Mf. max force / acceleration this bird can extert
 /// </param>
 public Bird(string id, FlockingModel model, FlowMap flowMap)
 {
     m_id = id;
     m_acc = Vector3.Zero;
     m_vel = new Vector3 (m_rndnums.Next (-1, 1), m_rndnums.Next (-1, 1), m_rndnums.Next (-1, 1));
     m_model = model;
     m_flowMap = flowMap;
     m_regionX = m_flowMap.LengthX;
     m_regionY = m_flowMap.LengthY;
     m_regionZ = m_flowMap.LengthZ;
     m_regionBorder = m_flowMap.Border;
 }
 public void Initialise(int num, FlowMap flowMap)
 {
     m_flowMap = flowMap;
       			for (int i = 0; i < num; i++) {
         AddBird (m_name + i );
       			}
 }
Beispiel #3
0
 public void Initialise(int num, FlowMap flowMap)
 {
     m_flowMap = flowMap;
       			for (int i = 0; i < num; i++) {
         AddBoid ("boid"+i );
       			}
 }
        public void FlockInitialise()
        {
            //make a flow map for this scene
            FlowMap flowMap = new FlowMap(m_scene, m_maxHeight, m_borderSize);
            flowMap.Initialise();

            // Generate initial flock values
            m_model.Initialise(m_flockSize, flowMap);

            // who is the owner for the flock in this region
            m_owner = m_scene.RegionInfo.EstateSettings.EstateOwner;
            m_view.PostInitialize(m_owner);
        }