MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetStateID

Function GetStateID

Source/Objects/movementobject.cpp:315–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315int GetStateID(std::vector<MovementObject::OcclusionState>& occlusion_states, int cam_id) {
316 int state_id = -1;
317 for (int state_index = 0, state_len = occlusion_states.size();
318 state_index < state_len;
319 ++state_index) {
320 if (occlusion_states[state_index].cam_id == cam_id) {
321 state_id = state_index;
322 break;
323 }
324 }
325 if (state_id == -1) {
326 state_id = occlusion_states.size();
327 occlusion_states.resize(occlusion_states.size() + 1);
328 occlusion_states[state_id].cam_id = cam_id;
329 }
330 return state_id;
331}
332
333void MovementObject::DrawDepthMap(const mat4& proj_view_matrix, const vec4* cull_planes, int num_cull_planes, Object::DrawType draw_type) {
334 if (g_debug_runtime_disable_movement_object_draw_depth_map) {

Callers 1

PreDrawCameraMethod · 0.85

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected