SDK & Switching Between Scanners

Discussion in 'The Lounge' started by the_researcher, Nov 12, 2008.

  1. Hello there, it's me again with a new question regarding the SDK

    We have two projectors and I'm writing a little application that sends vector data to be written in both of them. Now I need to send different images to each projector at the same time.

    I tried:

    * changing "SetWorkingScanners" between 1 and 2 before sending point and frame information, but it doesn't work.
    * setting two projection zones (Read/WriteProejctionZone) and setting the 'scanner' field to 1 and 2 respectively, and later set the "preferred projection zone" inside the FRAMESTRUCTEX structure. Doesn't seem to do much either.
    * playing with the DisplayProjectionZones() function, but it's undocumented, so I don't know what it does or how to use it properly.

    Here's an idea of what I'm doing

    Code:
    <pre> 
    //prepare the projection zones 
    PROJECTIONZONE * pz = new PROJECTIONZONE;
    for(int i=0, pZone=1; i &lt; nProjectors; i++, pZone++)
    {
    	 ReadProjectionZone(pZone, pz); 
    	pz-&gt;Scanner = 1&lt;&lt;i; //1, 2, 4, 8, etc...
    	WriteProjectionZone(pZone, pz);
    }
    delete pz;
    
    //this would be the displaying part
    SetWorkingScanners (scannerNumber); //where scannerNumber is 1 or 2
    //...
    //add point information into a PTSRUCT structure array
    //..
    FRAMESTRUCTEX frame;
    frame.PreferredProjectionZone = pzNumber; //here I set the projection zone number
    WriteFrameStructEx(frameNumber, &frame);
    WriteFrameEx(&frame,  points);
    
    DisplayFrame(frameNumber);
    DisplayUpdateEx(1);
    </pre> 
    
    Any help would be greatly appreciated.

    Thanks in advance!
     
  2. [SOLVED] SDK & Switching Between Scanners

    Adding a SetWorkingTracks after each SetWorkingScanners and before any "Display..." commands seems do to the trick
    Something like...

    Code:
    <pre>
    SetWorkingTracks(scannerNumber);
    SetWorkingTracks(1);
    DisplayProjectionZones(pzNumber);
    DisplayUpdateEx(1);
    </pre>
    Then write all the point data and display as usual.
     
Tags:

Share This Page