Show
Ignore:
Timestamp:
03/21/12 18:36:20 (2 years ago)
Author:
robert
Message:

Ran script to remove trailing spaces and tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osg/Shape

    r11869 r13041  
    1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield  
     1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
    22 * 
    3  * This library is open source and may be redistributed and/or modified under   
    4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or  
     3 * This library is open source and may be redistributed and/or modified under 
     4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
    55 * (at your option) any later version.  The full license is in LICENSE file 
    66 * included with this distribution, and on the openscenegraph.org website. 
    7  *  
     7 * 
    88 * This library is distributed in the hope that it will be useful, 
    99 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
     10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1111 * OpenSceneGraph Public License for more details. 
    1212*/ 
     
    3030/** META_StateAttribute macro define the standard clone, isSameKindAs, 
    3131  * className and getType methods. 
    32   * Use when subclassing from Object to make it more convenient to define  
    33   * the standard pure virtual methods which are required for all Object  
     32  * Use when subclassing from Object to make it more convenient to define 
     33  * the standard pure virtual methods which are required for all Object 
    3434  * subclasses.*/ 
    3535#define META_Shape(library,name) \ 
     
    4242        virtual void accept(osg::ConstShapeVisitor& csv) const { csv.apply(*this); } 
    4343 
    44 /** Base class for all shape types.  
     44/** Base class for all shape types. 
    4545  * Shapes are used to either for culling and collision detection or 
    4646  * to define the geometric shape of procedurally generate Geometry. 
     
    5151 
    5252        Shape() {} 
    53          
    54         Shape(const Shape& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     53 
     54        Shape(const Shape& sa,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    5555            Object(sa,copyop) {} 
    56          
     56 
    5757        /** Clone the type of an attribute, with Object* return type. 
    5858            Must be defined by derived classes.*/ 
     
    8282 
    8383    protected: 
    84      
     84 
    8585        virtual ~Shape(); 
    8686}; 
     
    103103{ 
    104104    public: 
    105      
     105 
    106106        ShapeVisitor() {} 
    107107        virtual ~ShapeVisitor(); 
     
    125125{ 
    126126    public: 
    127      
     127 
    128128        ConstShapeVisitor() {} 
    129129        virtual ~ConstShapeVisitor(); 
     
    202202            _halfLengths(lengthX*0.5f,lengthY*0.5f,lengthZ*0.5f) {} 
    203203 
    204         Box(const Box& box,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     204        Box(const Box& box,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    205205            Shape(box,copyop), 
    206206            _center(box._center), 
     
    227227        inline const Quat&  getRotation() const { return _rotation; } 
    228228        inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } 
    229         inline bool zeroRotation() const { return _rotation.zeroRotation(); }  
    230  
    231     protected: 
    232      
     229        inline bool zeroRotation() const { return _rotation.zeroRotation(); } 
     230 
     231    protected: 
     232 
    233233        virtual ~Box(); 
    234      
     234 
    235235        Vec3    _center; 
    236236        Vec3    _halfLengths; 
     
    255255            _height(height) {} 
    256256 
    257         Cone(const Cone& cone,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     257        Cone(const Cone& cone,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    258258            Shape(cone,copyop), 
    259259            _center(cone._center), 
     
    285285        inline const Quat& getRotation() const { return _rotation; } 
    286286        inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } 
    287         inline bool zeroRotation() const { return _rotation.zeroRotation(); }  
    288  
    289         inline float getBaseOffsetFactor() const { return 0.25f; }  
    290         inline float getBaseOffset() const { return -getBaseOffsetFactor()*getHeight(); }  
    291  
    292     protected: 
    293      
     287        inline bool zeroRotation() const { return _rotation.zeroRotation(); } 
     288 
     289        inline float getBaseOffsetFactor() const { return 0.25f; } 
     290        inline float getBaseOffset() const { return -getBaseOffsetFactor()*getHeight(); } 
     291 
     292    protected: 
     293 
    294294        virtual ~Cone(); 
    295      
     295 
    296296        Vec3    _center; 
    297297        float   _radius; 
     
    315315            _height(height) {} 
    316316 
    317         Cylinder(const Cylinder& cylinder,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     317        Cylinder(const Cylinder& cylinder,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    318318            Shape(cylinder,copyop), 
    319319            _center(cylinder._center), 
     
    345345        inline const Quat& getRotation() const { return _rotation; } 
    346346        inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } 
    347         bool zeroRotation() const { return _rotation.zeroRotation(); }  
    348  
    349     protected: 
    350      
     347        bool zeroRotation() const { return _rotation.zeroRotation(); } 
     348 
     349    protected: 
     350 
    351351        virtual ~Cylinder(); 
    352352 
     
    371371            _height(height) {} 
    372372 
    373         Capsule(const Capsule& capsule,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     373        Capsule(const Capsule& capsule,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    374374            Shape(capsule,copyop), 
    375375            _center(capsule._center), 
     
    401401        inline const Quat& getRotation() const { return _rotation; } 
    402402        inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } 
    403         bool zeroRotation() const { return _rotation.zeroRotation(); }  
    404  
    405     protected: 
    406      
     403        bool zeroRotation() const { return _rotation.zeroRotation(); } 
     404 
     405    protected: 
     406 
    407407        virtual ~Capsule(); 
    408      
     408 
    409409        Vec3    _center; 
    410410        float   _radius; 
     
    418418        InfinitePlane() {} 
    419419 
    420         InfinitePlane(const InfinitePlane& plane,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     420        InfinitePlane(const InfinitePlane& plane,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    421421            Shape(plane,copyop), 
    422422            Plane(plane) {} 
     
    425425 
    426426     protected: 
    427       
     427 
    428428        virtual ~InfinitePlane(); 
    429429}; 
     
    434434{ 
    435435    public: 
    436      
     436 
    437437        TriangleMesh() {} 
    438438 
    439         TriangleMesh(const TriangleMesh& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     439        TriangleMesh(const TriangleMesh& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    440440            Shape(mesh,copyop), 
    441441            _vertices(mesh._vertices), 
     
    455455 
    456456    protected: 
    457      
     457 
    458458        virtual ~TriangleMesh(); 
    459459 
     
    466466{ 
    467467    public: 
    468      
     468 
    469469        ConvexHull() {} 
    470470 
    471         ConvexHull(const ConvexHull& hull,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     471        ConvexHull(const ConvexHull& hull,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    472472            TriangleMesh(hull,copyop) {} 
    473473 
     
    475475 
    476476    protected: 
    477      
     477 
    478478        virtual ~ConvexHull(); 
    479479}; 
     
    482482{ 
    483483    public: 
    484      
     484 
    485485        HeightField(); 
    486486 
    487487        HeightField(const HeightField& mesh,const CopyOp& copyop=CopyOp::SHALLOW_COPY); 
    488          
     488 
    489489        META_Shape(osg, HeightField); 
    490490 
     
    504504        inline void setYInterval(float dy) { _dy = dy; } 
    505505        inline float getYInterval() const { return _dy; } 
    506      
     506 
    507507        /** Get the FloatArray height data.*/ 
    508508        osg::FloatArray* getFloatArray() { return _heights.get(); } 
     
    516516 
    517517        /** Set the height of the skirt to render around the edge of HeightField. 
    518           * The skirt is used as a means of disguising edge boundaries between adjacent HeightField,  
     518          * The skirt is used as a means of disguising edge boundaries between adjacent HeightField, 
    519519          * particularly of ones with different resolutions.*/ 
    520520        void setSkirtHeight(float skirtHeight) { _skirtHeight = skirtHeight; } 
     
    534534        inline const Quat& getRotation() const { return _rotation; } 
    535535        inline Matrix computeRotationMatrix() const { return Matrix(_rotation); } 
    536         inline bool zeroRotation() const { return _rotation.zeroRotation(); }  
     536        inline bool zeroRotation() const { return _rotation.zeroRotation(); } 
    537537 
    538538        /* set a single height point in the height field */ 
     
    558558            return Vec3(_origin.x()+getXInterval()*(float)c, 
    559559                        _origin.y()+getYInterval()*(float)r, 
    560                         _origin.z()+(*_heights)[c+r*_columns]);   
     560                        _origin.z()+(*_heights)[c+r*_columns]); 
    561561        } 
    562562 
     
    566566 
    567567    protected: 
    568      
     568 
    569569        virtual ~HeightField(); 
    570570 
     
    591591 
    592592 
    593      
     593 
    594594        typedef std::vector< ref_ptr<Shape> > ChildList; 
    595595 
    596596        CompositeShape() {} 
    597597 
    598         CompositeShape(const CompositeShape& cs,const CopyOp& copyop=CopyOp::SHALLOW_COPY):  
     598        CompositeShape(const CompositeShape& cs,const CopyOp& copyop=CopyOp::SHALLOW_COPY): 
    599599            Shape(cs,copyop), 
    600600            _children(cs._children) {} 
     
    627627 
    628628        /** find the index number of child, if child is not found then it returns getNumChildren(), 
    629           * so should be used in similar style to STL's result!=end().*/  
     629          * so should be used in similar style to STL's result!=end().*/ 
    630630        unsigned int findChildNo(Shape* shape) const 
    631         {  
     631        { 
    632632            for (unsigned int childNo=0;childNo<_children.size();++childNo) 
    633633            { 
     
    639639 
    640640    protected: 
    641      
     641 
    642642        virtual ~CompositeShape(); 
    643643