Show
Ignore:
Timestamp:
09/25/06 18:25:53 (8 years ago)
Author:
robert
Message:

Added bare bones osgGA::SimpleViewer? class to help simplify OSG setup when embedding the OSG
into existing GUI applications, and for one one a single camera, single window is required.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgcluster/osgcluster.cpp

    r5381 r5592  
    301301            writeUInt(event.getKey()); 
    302302            writeUInt(event.getButton()); 
     303            writeInt(event.getWindowX()); 
     304            writeInt(event.getWindowY()); 
     305            writeUInt(event.getWindowWidth()); 
     306            writeUInt(event.getWindowHeight()); 
    303307            writeFloat(event.getXmin()); 
     308            writeFloat(event.getYmin()); 
    304309            writeFloat(event.getXmax()); 
    305             writeFloat(event.getYmin()); 
    306310            writeFloat(event.getYmax()); 
    307311            writeFloat(event.getX()); 
     
    317321            event.setKey(readUInt()); 
    318322            event.setButton(readUInt()); 
    319             event.setXmin(readFloat()); 
    320             event.setXmax(readFloat()); 
    321             event.setYmin(readFloat()); 
    322             event.setYmax(readFloat()); 
     323            int x = readInt(); 
     324            int y = readInt(); 
     325            int width = readUInt(); 
     326            int height = readUInt(); 
     327            event.setWindowRectangle(x,y,width,height); 
     328            float xmin = readFloat(); 
     329            float ymin = readFloat(); 
     330            float xmax = readFloat(); 
     331            float ymax = readFloat(); 
     332            event.setInputRange(xmin,ymin,xmax,ymax); 
    323333            event.setX(readFloat()); 
    324334            event.setY(readFloat());