equal
deleted
inserted
replaced
67 MobilityModel::DoDispose (); |
67 MobilityModel::DoDispose (); |
68 } |
68 } |
69 void |
69 void |
70 RandomDirection2dMobilityModel::Start (void) |
70 RandomDirection2dMobilityModel::Start (void) |
71 { |
71 { |
72 double direction = UniformVariable::GetSingleValue (0, 2 * PI); |
72 double direction = UniformVariable().GetValue (0, 2 * PI); |
73 SetDirectionAndSpeed (direction); |
73 SetDirectionAndSpeed (direction); |
74 } |
74 } |
75 |
75 |
76 void |
76 void |
77 RandomDirection2dMobilityModel::BeginPause (void) |
77 RandomDirection2dMobilityModel::BeginPause (void) |
102 NotifyCourseChange (); |
102 NotifyCourseChange (); |
103 } |
103 } |
104 void |
104 void |
105 RandomDirection2dMobilityModel::ResetDirectionAndSpeed (void) |
105 RandomDirection2dMobilityModel::ResetDirectionAndSpeed (void) |
106 { |
106 { |
107 double direction = UniformVariable::GetSingleValue (0, PI); |
107 double direction = UniformVariable().GetValue (0, PI); |
108 |
108 |
109 m_helper.UpdateWithBounds (m_bounds); |
109 m_helper.UpdateWithBounds (m_bounds); |
110 Vector position = m_helper.GetCurrentPosition (); |
110 Vector position = m_helper.GetCurrentPosition (); |
111 switch (m_bounds.GetClosestSide (position)) |
111 switch (m_bounds.GetClosestSide (position)) |
112 { |
112 { |