MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Step

Method Step

ogsr_engine/xrGame/PHWorld.cpp:186–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184// static dReal frame_time=0.f;
185static u32 start_time = 0;
186void CPHWorld::Step()
187{
188#ifdef DEBUG
189 dbg_reused_queries_per_step = 0;
190 dbg_new_queries_per_step = 0;
191#endif
192
193 VERIFY(b_processing || IsFreezed());
194
195 PH_OBJECT_I i_object;
196 PH_UPDATE_OBJECT_I i_update_object;
197
198 if (disable_count == 0)
199 {
200 disable_count = worldDisablingParams.objects_params.L2frames;
201 for (i_object = m_recently_disabled_objects.begin(); m_recently_disabled_objects.end() != i_object;)
202 {
203 CPHObject* obj = (*i_object);
204 obj->check_recently_deactivated();
205 ++i_object;
206 }
207 }
208 --disable_count;
209
210 ++m_steps_num;
211 Device.Statistic->ph_collision.Begin();
212
213 for (i_object = m_objects.begin(); m_objects.end() != i_object;)
214 {
215 CPHObject* obj = (*i_object);
216 obj->Collide();
217
218 ++i_object;
219 }
220 Device.Statistic->ph_collision.End();
221
222#ifdef DEBUG
223 for (i_object = m_objects.begin(); m_objects.end() != i_object;)
224 {
225 CPHObject* obj = (*i_object);
226 DBG_DrawPHObject(obj);
227 ++i_object;
228 }
229#endif
230
231 for (i_object = m_objects.begin(); m_objects.end() != i_object;)
232 {
233 CPHObject* obj = (*i_object);
234 ++i_object;
235 obj->PhTune(fixed_step);
236 }
237
238 for (i_update_object = m_update_objects.begin(); m_update_objects.end() != i_update_object;)
239 {
240 CPHUpdateObject* obj = (*i_update_object);
241 ++i_update_object;
242 obj->PhTune(fixed_step);
243 }

Callers 7

ActivateBoxDynamicMethod · 0.45
IslandStepMethod · 0.45
ActivateMethod · 0.45
PhDataUpdateMethod · 0.45
UpdateRestrictionTypeMethod · 0.45
FlyToMethod · 0.45
ImGui_ListBoxFunction · 0.45

Calls 15

DBG_DrawPHObjectFunction · 0.85
dJointGroupEmptyFunction · 0.85
IslandStepMethod · 0.80
IslandReinitMethod · 0.80
u32Enum · 0.70
beginMethod · 0.45
endMethod · 0.45
BeginMethod · 0.45
CollideMethod · 0.45
EndMethod · 0.45
PhTuneMethod · 0.45

Tested by

no test coverage detected