Show
Ignore:
Timestamp:
04/15/08 08:43:53 (8 months ago)
Author:
vossg
Message:

changed: adjusted the vtk mapper to the new fields

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/Contrib/VTK/OSGVTKMapper.cpp

    r1004 r1167  
    9898void VTKMapper::initGeometries(void) 
    9999{ 
    100     OSG::NodePtr pRoot = OSG::Node::create(); 
    101      
    102     pRoot->setCore(OSG::Group::create()); 
     100    NodeUnrecPtr pRoot = Node::create(); 
     101     
     102    pRoot->setCore(Group::create()); 
    103103 
    104104    setRoot(pRoot); 
     
    106106    for(UInt32 i = 0; i < 4; ++i) 
    107107    { 
    108         OSG::GeometryPtr          pGeo      = OSG::Geometry::create(); 
    109      
    110         OSG::ChunkMaterialPtr     pMat      = OSG::ChunkMaterial::create(); 
    111         OSG::MaterialChunkPtr     pMatChunk = OSG::MaterialChunk::create(); 
    112          
    113         OSG::GeoPnt3fPropertyPtr  pPoints  = OSG::GeoPnt3fProperty  ::create(); 
    114         OSG::GeoUInt32PropertyPtr pLengths = OSG::GeoUInt32Property ::create(); 
    115         OSG::GeoUInt8PropertyPtr  pTypes   = OSG::GeoUInt8Property  ::create(); 
    116         OSG::GeoColor4fPropertyPtr pColors = OSG::GeoColor4fProperty::create(); 
    117         OSG::GeoVec3fPropertyPtr  pNormals = OSG::GeoVec3fProperty  ::create(); 
     108        GeometryUnrecPtr           pGeo      = Geometry::create(); 
     109     
     110        ChunkMaterialUnrecPtr      pMat      = ChunkMaterial::create(); 
     111        MaterialChunkUnrecPtr      pMatChunk = MaterialChunk::create(); 
     112         
     113        GeoPnt3fPropertyUnrecPtr   pPoints   = GeoPnt3fProperty  ::create(); 
     114        GeoUInt32PropertyUnrecPtr  pLengths  = GeoUInt32Property ::create(); 
     115        GeoUInt8PropertyUnrecPtr   pTypes    = GeoUInt8Property  ::create(); 
     116        GeoColor4fPropertyUnrecPtr pColors   = GeoColor4fProperty::create(); 
     117        GeoVec3fPropertyUnrecPtr   pNormals  = GeoVec3fProperty  ::create(); 
    118118 
    119119        if(i < 2) 
     
    127127         
    128128        pMat->addChunk(pMatChunk); 
    129         pMat->addChunk(OSG::TwoSidedLightingChunk::create()); 
     129 
     130        TwoSidedLightingChunkUnrecPtr pTSLChunk =  
     131            TwoSidedLightingChunk::create(); 
     132             
     133        pMat->addChunk(pTSLChunk); 
    130134 
    131135        pGeo->setDlistCache(false   ); 
     
    142146        } 
    143147 
    144         OSG::NodePtr pGeoRoot = OSG::Node::create(); 
     148        OSG::NodeUnrecPtr pGeoRoot = OSG::Node::create(); 
    145149         
    146150        pGeoRoot->setCore    (pGeo);