eltopo3d/dynamicsurface.cpp
// ---------------------------------------------------------
///
/// Update the broadphase elements incident to the given vertex, using current and predicted vertex positions
///
// ---------------------------------------------------------
Update the broadphase elements incident to the given vertex, using current and predicted vertex positions
Update the broadphase elements incident to the given vertex using current and predicted vertex positions
void DynamicSurface::update_continuous_broad_phase( size_t vertex_index )
{
    assert( m_collision_safety );
    const std::vector<size_t>& incident_tris = m_mesh.m_vertex_to_triangle_map[ vertex_index ];
    const std::vector<size_t>& incident_edges = m_mesh.m_vertex_to_edge_map[ vertex_index ];
    Vec3d low, high;
    vertex_continuous_bounds( vertex_index, low, high );
    m_broad_phase->update_vertex( vertex_index, low, high, vertex_is_solid(vertex_index) );
    for ( size_t t = 0; t < incident_tris.size(); ++t )
    {
        triangle_continuous_bounds( incident_tris[t], low, high );
        m_broad_phase->update_triangle( incident_tris[t], low, high, triangle_is_solid(incident_tris[t]) );
    }
    for ( size_t e = 0; e < incident_edges.size(); ++e )
    {
        edge_continuous_bounds( incident_edges[e], low, high );
        m_broad_phase->update_edge( incident_edges[e], low, high, edge_is_solid(incident_edges[e]) );
    }
}
void DynamicSurface :: update_continuous_broad_phase ( size_t vertex_index ) { assert ( m_collision_safety ) ; const std :: vector < size_t > & incident_tris = m_mesh . m_vertex_to_triangle_map [ vertex_index ] ; const std :: vector < size_t > & incident_edges = m_mesh . m_vertex_to_edge_map [ vertex_index ] ; Vec3d low , high ; vertex_continuous_bounds ( vertex_index , low , high ) ; m_broad_phase -> update_vertex ( vertex_index , low , high , vertex_is_solid ( vertex_index ) ) ; for ( size_t t = 0 ; t < incident_tris . size ( ) ; ++ t ) { triangle_continuous_bounds ( incident_tris [ t ] , low , high ) ; m_broad_phase -> update_triangle ( incident_tris [ t ] , low , high , triangle_is_solid ( incident_tris [ t ] ) ) ; } for ( size_t e = 0 ; e < incident_edges . size ( ) ; ++ e ) { edge_continuous_bounds ( incident_edges [ e ] , low , high ) ; m_broad_phase -> update_edge ( incident_edges [ e ] , low , high , edge_is_solid ( incident_edges [ e ] ) ) ; } }
Update the broadphase elements incident to the given vertex, using current and predicted vertex positions
Update the broadphase elements incident to the given vertex using current and predicted vertex positions