Data structure for polyline in three dimensions.  
 More...
#include <JPolyline3D.hh>
Data structure for polyline in three dimensions. 
A polyline is a series of connected line segments. 
Definition at line 25 of file JPolyline3D.hh.
 
◆ JPolyline3D() [1/2]
  
  
      
        
          | JGEOMETRY3D::JPolyline3D::JPolyline3D  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JPolyline3D() [2/2]
  
  
      
        
          | JGEOMETRY3D::JPolyline3D::JPolyline3D  | 
          ( | 
          int |           size | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Constructor with given size. 
Definition at line 33 of file JPolyline3D.hh.
   33                            { 
   34      if(size>0) resize(size) ; 
   35    }
 
 
 
◆ getPolyline() [1/2]
  
  
      
        
          | const JPolyline3D & JGEOMETRY3D::JPolyline3D::getPolyline  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
Get polyline. 
- Returns
 - polyline 
 
Definition at line 43 of file JPolyline3D.hh.
   43                                           {
   45    }
JPolyline3D()
default constructor
 
 
 
 
◆ getPolyline() [2/2]
  
  
      
        
          | JPolyline3D & JGEOMETRY3D::JPolyline3D::getPolyline  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ transform() [1/2]
Transform all vertices. 
- Parameters
 - 
  
  
 
Definition at line 62 of file JPolyline3D.hh.
   62                                               {
   63      for( iterator it=begin(); it!=end() ; ++it ) it->transform(T) ;
   64      return *this;
   65    }
 
 
 
◆ rotate() [1/4]
Rotate all vertices. 
- Parameters
 - 
  
  
 
Definition at line 72 of file JPolyline3D.hh.
   73    {
   74      for( iterator it=begin(); it!=end() ; ++it ) it->rotate(R);
   75      return *this;
   76    }
 
 
 
◆ rotate_back() [1/4]
Rotate back all vertices. 
- Parameters
 - 
  
  
 
Definition at line 83 of file JPolyline3D.hh.
   83                                                   {
   84      for( iterator it=begin(); it!=end() ; ++it ) it->rotate_back(R) ;
   85      return *this;
   86    }
 
 
 
◆ rotate() [2/4]
Rotate all vertices around X-axis. 
- Parameters
 - 
  
  
 
Definition at line 93 of file JPolyline3D.hh.
   93                                              {
   94      for( iterator it=begin(); it!=end() ; ++it ) it->rotate(R);
   95      return *this;
   96    }
 
 
 
◆ rotate_back() [2/4]
Rotate all vertices back around X-axis. 
- Parameters
 - 
  
  
 
Definition at line 103 of file JPolyline3D.hh.
  103                                                   {      
  104      for( iterator it=begin(); it!=end() ; ++it ) it->rotate_back(R) ;
  105      return *this;
  106    }
 
 
 
◆ rotate() [3/4]
Rotate all vertices around Y-axis. 
- Parameters
 - 
  
  
 
Definition at line 114 of file JPolyline3D.hh.
  114                                              {
  115      for( iterator it=begin(); it!=end() ; ++it ) it->rotate(R);
  116      return *this;
  117    }
 
 
 
◆ rotate_back() [3/4]
Rotate all vertices back around Y-axis. 
- Parameters
 - 
  
  
 
Definition at line 125 of file JPolyline3D.hh.
  125                                                   {      
  126      for( iterator it=begin(); it!=end() ; ++it ) it->rotate_back(R) ;
  127      return *this;
  128    }
 
 
 
◆ rotate() [4/4]
Rotate all vertices around Z-axis. 
- Parameters
 - 
  
  
 
Definition at line 135 of file JPolyline3D.hh.
  135                                             {
  136      for( iterator it=begin(); it!=end() ; ++it ) it->rotate(R);
  137      return *this;
  138    }
 
 
 
◆ rotate_back() [4/4]
Rotate all vertices back around Z-axis. 
- Parameters
 - 
  
  
 
Definition at line 145 of file JPolyline3D.hh.
  145                                                   {      
  146      for( iterator it=begin(); it!=end() ; ++it ) it->rotate_back(R) ;
  147      return *this;
  148    }
 
 
 
◆ transform() [2/2]
Transform all vertices of the polyline with a rotation and offset. 
See the corresponding function in JPosition3D for more information
- Parameters
 - 
  
    | R | rotation matrix  | 
    | pos | position of origin (after rotation)  | 
  
   
Definition at line 157 of file JPolyline3D.hh.
  157                                                               {      
  158      for( iterator it=begin(); it!=end() ; ++it ) it->transform(R,pos) ;
  159    }
 
 
 
◆ transform_back()
Transform back all vertices of the polyline. 
- Parameters
 - 
  
    | R | rotation matrix  | 
    | pos | polyline of origin (before rotation)  | 
  
   
Definition at line 167 of file JPolyline3D.hh.
  167                                                                      {
  168      for( iterator it=begin(); it!=end() ; ++it ) it->transform_back(R,pos) ;
  169    }
 
 
 
◆ operator>>
  
  
      
        
          | std::istream & operator>>  | 
          ( | 
          std::istream & |           in,  | 
         
        
           | 
           | 
          JPolyline3D & |           polyline ) | 
         
       
   | 
  
friend   | 
  
 
Read polyline from input. 
- Parameters
 - 
  
    | in | input stream  | 
    | polyline | polyline  | 
  
   
- Returns
 - input stream 
 
Definition at line 179 of file JPolyline3D.hh.
  179                                                                                {
  182      polyline.resize(n) ;
  183      for( iterator it=polyline.begin(); it!=polyline.end() ; ++it ) {
  184        in >> *it ;
  185      }
  186      return in;
  187    }
 
 
 
◆ operator<<
  
  
      
        
          | std::ostream & operator<<  | 
          ( | 
          std::ostream & |           out,  | 
         
        
           | 
           | 
          const JPolyline3D & |           polyline ) | 
         
       
   | 
  
friend   | 
  
 
Write polyline to output. 
- Parameters
 - 
  
    | out | output stream  | 
    | polyline | polyline  | 
  
   
- Returns
 - output stream 
 
Definition at line 196 of file JPolyline3D.hh.
  197    {
  198      out << polyline.size() ;
  199      for( const_iterator it=polyline.begin(); it!=polyline.end() ; ++it ) {
  200        out << *it ;
  201      }
  202      return out;
  203    }
 
 
 
The documentation for this class was generated from the following file: