Changeset 343

Show
Ignore:
Timestamp:
03/19/07 02:14:42 (1 year ago)
Author:
cweider2
Message:

ILDAImport: imports z coordinate

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/LaserLine_2.0/Src/FileImports/ILDAImport.m

    r323 r343  
    3636                        { 
    3737                        NSPoint pointLoc; 
    38                         NSColor *pointColor
     38                        float z
    3939                        BOOL isBlanked; 
    4040                        LZPoint *tmpPoint; 
    4141                         
    42                         pointLoc.x = sequence.frames[i].points[j].x/32767.; 
    43                         pointLoc.y = sequence.frames[i].points[j].y/32767.; 
     42                        pointLoc.x = sequence.frames[i].points[j].x/32768.; 
     43                        pointLoc.y = sequence.frames[i].points[j].y/32768.; 
     44                        z = sequence.frames[i].points[j].z/32768.; 
    4445                         
    4546                        ILDAColor ildaColor = myPalette->colors[ILDAPoint_color_index(&sequence.frames[i].points[j])]; 
     47                        isBlanked = ILDAPoint_blank_bit(&sequence.frames[i].points[j]); 
    4648                         
    47                         pointColor = [NSColor colorWithCalibratedRed:((float)ildaColor.r/255.) green:((float)ildaColor.g/255.) blue:((float)ildaColor.b)/255. alpha:1]; 
    48                          
    49                         isBlanked = ILDAPoint_blank_bit(&sequence.frames[i].points[j]); 
    50                                  
    51                          
    52                         tmpPoint = [[LZPoint alloc] initWithPoint:pointLoc color:pointColor blanked:isBlanked]; 
     49                        if(ILDAPoint_blank_bit(&sequence.frames[i].points[j])) 
     50                                tmpPoint = [[LZPoint alloc] initWithX:pointLoc.x y:pointLoc.y z:z r:0 g:0 b:0]; 
     51                        else 
     52                                tmpPoint = [[LZPoint alloc] initWithX:pointLoc.x y:pointLoc.y z:z r:(ildaColor.r/255.) g:(ildaColor.g/255.) b:(ildaColor.b/255.)]; 
    5353                         
    5454                    [polyline addPoint:tmpPoint];