Show
Ignore:
Timestamp:
10/24/04 16:31:18 (9 years ago)
Author:
robert
Message:

fixes to tabs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ive/DrawArrays.cpp

    r1980 r3525  
    11/********************************************************************** 
    22 * 
    3  *      FILE:                   DrawArrays.cpp 
     3 *    FILE:            DrawArrays.cpp 
    44 * 
    5  *      DESCRIPTION:    Read/Write osg::DrawArrays in binary format to disk. 
     5 *    DESCRIPTION:    Read/Write osg::DrawArrays in binary format to disk. 
    66 * 
    7  *      CREATED BY:             Auto generated by iveGenerated 
    8  *                                      and later modified by Rune Schmidt Jensen. 
     7 *    CREATED BY:        Auto generated by iveGenerated 
     8 *                    and later modified by Rune Schmidt Jensen. 
    99 * 
    10  *      HISTORY:                Created 18.3.2003 
     10 *    HISTORY:        Created 18.3.2003 
    1111 * 
    12  *      Copyright 2003 VR-C 
     12 *    Copyright 2003 VR-C 
    1313 **********************************************************************/ 
    1414 
     
    2020 
    2121void DrawArrays::write(DataOutputStream* out){ 
    22         // Write DrawArrays's identification. 
    23         out->writeInt(IVEDRAWARRAYS); 
    24         // If the osg class is inherited by any other class we should also write this to file. 
    25         osg::PrimitiveSet*  prim = dynamic_cast<osg::PrimitiveSet*>(this); 
    26         if(prim){ 
    27                 ((ive::PrimitiveSet*)(prim))->write(out); 
    28         } 
    29         else 
    30                 throw Exception("DrawArrays::write(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); 
     22    // Write DrawArrays's identification. 
     23    out->writeInt(IVEDRAWARRAYS); 
     24    // If the osg class is inherited by any other class we should also write this to file. 
     25    osg::PrimitiveSet*  prim = dynamic_cast<osg::PrimitiveSet*>(this); 
     26    if(prim){ 
     27        ((ive::PrimitiveSet*)(prim))->write(out); 
     28    } 
     29    else 
     30        throw Exception("DrawArrays::write(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); 
    3131 
    3232 
    33         // Write DrawArrays's properties. 
    34         out->writeInt(getFirst()); 
    35         out->writeInt(getCount()); 
     33    // Write DrawArrays's properties. 
     34    out->writeInt(getFirst()); 
     35    out->writeInt(getCount()); 
    3636} 
    3737 
    3838void DrawArrays::read(DataInputStream* in){ 
    39         // Read DrawArrays's identification. 
    40         int id = in->peekInt(); 
    41         if(id == IVEDRAWARRAYS){ 
    42                 // Code to read DrawArrays's properties. 
    43                 id = in->readInt(); 
    44                 // If the osg class is inherited by any other class we should also read this from file. 
    45                 osg::PrimitiveSet*  prim = dynamic_cast<osg::PrimitiveSet*>(this); 
    46                 if(prim){ 
    47                         ((ive::PrimitiveSet*)(prim))->read(in); 
    48                 } 
    49                 else 
    50                         throw Exception("DrawArrays::read(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); 
     39    // Read DrawArrays's identification. 
     40    int id = in->peekInt(); 
     41    if(id == IVEDRAWARRAYS){ 
     42        // Code to read DrawArrays's properties. 
     43        id = in->readInt(); 
     44        // If the osg class is inherited by any other class we should also read this from file. 
     45        osg::PrimitiveSet*  prim = dynamic_cast<osg::PrimitiveSet*>(this); 
     46        if(prim){ 
     47            ((ive::PrimitiveSet*)(prim))->read(in); 
     48        } 
     49        else 
     50            throw Exception("DrawArrays::read(): Could not cast this osg::DrawArrays to an osg::PrimitiveSet."); 
    5151 
    5252 
    53                 // Read DrawArrays properties 
    54                 setFirst(in->readInt()); 
    55                 setCount(in->readInt()); 
    56         } 
    57         else{ 
    58                 throw Exception("DrawArrays::read(): Expected DrawArrays identification."); 
    59         } 
     53        // Read DrawArrays properties 
     54        setFirst(in->readInt()); 
     55        setCount(in->readInt()); 
     56    } 
     57    else{ 
     58        throw Exception("DrawArrays::read(): Expected DrawArrays identification."); 
     59    } 
    6060}