diff --git a/libs/dragplanes.h b/libs/dragplanes.h index 27ea803b..f42c7174 100644 --- a/libs/dragplanes.h +++ b/libs/dragplanes.h @@ -143,7 +143,7 @@ void selectPlanes( const AABB& aabb, Selector& selector, SelectionTest& test, co } } } - if( test.getVolume().GetViewMatrix().xw() != 0 || test.getVolume().GetViewMatrix().yw() != 0 ) // select only plane in camera + if( test.getVolume().fill() ) // select only plane in camera selectable2 = 0; for ( std::size_t i = 0; i < 6; ++i ) if( &m_selectables[i] == selectable || &m_selectables[i] == selectable2 ){ diff --git a/radiant/brush.h b/radiant/brush.h index d2630028..a9b50d12 100644 --- a/radiant/brush.h +++ b/radiant/brush.h @@ -3570,11 +3570,10 @@ void selectPlanes( Selector& selector, SelectionTest& test, const PlaneCallback& FaceInstances_ptrs bestInstances; selectPlanes( test, bestInstances ); - const bool cam = test.getVolume().GetViewMatrix().xw() != 0 || test.getVolume().GetViewMatrix().yw() != 0; for ( FaceInstances_ptrs::iterator i = bestInstances.begin(); i != bestInstances.end(); ++i ){ ( *i )->addSelectable( selector ); selectedPlaneCallback( ( *i )->getFace().plane3() ); - if( cam ) + if( test.getVolume().fill() ) return; // select only plane in camera } } @@ -3590,7 +3589,7 @@ void selectVerticesOnPlanes( SelectionTest& test ){ FaceInstances_ptrs bestInstances; selectPlanes( test, bestInstances ); - if( ( test.getVolume().GetViewMatrix().xw() != 0 || test.getVolume().GetViewMatrix().yw() != 0 ) && !bestInstances.empty() ) // select only plane in camera + if( test.getVolume().fill() && !bestInstances.empty() ) // select only plane in camera for( FaceInstances_ptrs::iterator i = bestInstances.end() - 1; i != bestInstances.begin(); --i ) bestInstances.pop_back(); for ( VertexInstances::iterator i = m_vertexInstances.begin(); i != m_vertexInstances.end(); ++i ) diff --git a/radiant/selection.cpp b/radiant/selection.cpp index 586b1a31..777edaf5 100644 --- a/radiant/selection.cpp +++ b/radiant/selection.cpp @@ -2432,7 +2432,8 @@ public: } } } - if( view.GetViewMatrix().xw() != 0 || view.GetViewMatrix().yw() != 0 ) // select only plane in camera +// if( view.GetViewMatrix().xw() != 0 || view.GetViewMatrix().yw() != 0 ) + if( view.fill() ) // select only plane in camera selectable2 = 0; if( selectable ){ Vector3 origin = m_bounds.origin;