public static float sol_test_vert(float dt, float[] T, s_ball up, s_vert vp, float[] o, float[] w) { return(v_vert(T, o, vp.m_p, w, up.m_p, up.m_v, up.m_r)); }
public static float sol_test_lump(float dt, float[] T, s_ball up, s_file fp, s_lump lp, float[] o, float[] w) { float[] U = new float[3] { 0.0f, 0.0f, 0.0f }; float u, t = dt; int i; /* Short circuit a non-solid lump. */ if ((lp.m_fl & Solid.L_DETAIL) != 0) { return(t); } /* Test all verts */ if (up.m_r > 0.0f) { for (i = 0; i < lp.m_vc; i++) { s_vert vp = fp.m_vv[fp.m_iv[lp.m_v0 + i]]; if ((u = sol_test_vert(t, U, up, vp, o, w)) < t) { Vec3.v_cpy(T, U); t = u; } } } /* Test all edges */ if (up.m_r > 0.0f) { for (i = 0; i < lp.m_ec; i++) { s_edge ep = fp.m_ev[fp.m_iv[lp.m_e0 + i]]; if ((u = sol_test_edge(t, U, up, fp, ep, o, w)) < t) { Vec3.v_cpy(T, U); t = u; } } } /* Test all sides */ for (i = 0; i < lp.m_sc; i++) { s_side sp = fp.m_sv[fp.m_iv[lp.m_s0 + i]]; if ((u = sol_test_side(t, U, up, fp, lp, sp, o, w)) < t) { Vec3.v_cpy(T, U); t = u; } } return(t); }
public static void sol_load_vert(IntPtr fin, s_vert vp) { Binary.get_array(fin, vp.m_p, 3); }