eltopo3d/dynamicsurface.cpp
// ---------------------------------------------------------
///
/// Update the broadphase elements incident to the given vertex
///
// ---------------------------------------------------------
Update the broadphase elements incident to the given vertex
Update the broadphase elements incident to the given vertex
void DynamicSurface::update_static_broad_phase( size_t vertex_index )
{
    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_static_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_static_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_static_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_static_broad_phase ( size_t vertex_index ) { 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_static_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_static_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_static_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
Update the broadphase elements incident to the given vertex