]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/patch.h
Merge branch 'master' into master-merge
[xonotic/netradiant.git] / radiant / patch.h
index 6e8742b0daf0c588b7d12aaa8c0c9387841fc389..45d53fa845b85676ae2a6e9b1558713a13544127 100644 (file)
@@ -880,6 +880,12 @@ const_iterator end() const {
 PatchControlArray& getControlPoints(){
        return m_ctrl;
 }
+
+// Same as above, just for const arguments
+const PatchControlArray& getControlPoints() const {
+       return m_ctrl;
+}
+
 PatchControlArray& getControlPointsTransformed(){
        return m_ctrlTransformed;
 }
@@ -916,6 +922,8 @@ void SetTextureRepeat( float s, float t ); // call with s=1 t=1 for FIT
 void CapTexture();
 void NaturalTexture();
 void ProjectTexture( int nAxis );
+void createThickenedOpposite(const Patch& sourcePatch, const float thickness, const int axis, bool& no12, bool& no34 );
+void createThickenedWall(const Patch& sourcePatch, const Patch& targetPatch, const int wallIndex);
 
 void undoSave(){
        if ( m_map != 0 ) {
@@ -1414,6 +1422,11 @@ void allocate( std::size_t size ){
 
 void setSelected( bool select ){
        m_selectable.setSelected( select );
+       if ( !select && parent() ){
+               Selectable* sel_parent = Instance_getSelectable( *parent() );
+               if ( sel_parent && sel_parent->isSelected() )
+                       sel_parent->setSelected( false );
+       }
 }
 bool isSelected() const {
        return m_selectable.isSelected();
@@ -1572,6 +1585,13 @@ void transformComponents( const Matrix4& matrix ){
        }
 }
 
+void invertComponentSelection(){
+       for ( PatchControlInstances::iterator i = m_ctrl_instances.begin(); i != m_ctrl_instances.end(); ++i )
+       {
+               ( *i ).m_selectable.setSelected( !( *i ).m_selectable.isSelected() );
+       }
+}
+
 
 void selectPlanes( Selector& selector, SelectionTest& test, const PlaneCallback& selectedPlaneCallback ){
        test.BeginMesh( localToWorld() );
@@ -1802,6 +1822,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        m_functor( *patch );
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };
@@ -1826,6 +1849,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        m_functor( *patch );
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };
@@ -1849,6 +1875,9 @@ bool pre( const scene::Path& path, scene::Instance& instance ) const {
                        m_functor( *patch );
                }
        }
+       else{
+               return false;
+       }
        return true;
 }
 };