| 86 | } |
| 87 | |
| 88 | size_t Scene::select( Selector::Mode mode, const Imath::Box2f ®ion, std::vector<HitRecord> &hits ) const |
| 89 | { |
| 90 | if( m_camera ) |
| 91 | { |
| 92 | m_camera->render( const_cast<State *>( State::defaultState() ) ); |
| 93 | } |
| 94 | |
| 95 | Selector selector( region, mode, hits ); |
| 96 | |
| 97 | State::bindBaseState(); |
| 98 | selector.baseState()->bind(); |
| 99 | root()->render( selector.baseState() ); |
| 100 | |
| 101 | return hits.size(); |
| 102 | } |
| 103 | |
| 104 | void Scene::setCamera( CameraPtr camera ) |
| 105 | { |