Changeset 7561

Show
Ignore:
Timestamp:
10/04/07 13:20:18
Author:
robert
Message:

Added asView() method to GUIActionAdapter to help out with .NET wrappers. Updated wrappers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OpenSceneGraph/trunk/include/osgGA/GUIActionAdapter

    r5328 r7561  
    1616 
    1717#include <osgGA/Export> 
     18#include <osg/View> 
    1819 
    1920namespace osgGA{ 
     
    5758        virtual ~GUIActionAdapter() {} 
    5859         
     60        /** Provide a mechanism for getting the osg::View assocaited with this GUIActionAdapter. 
     61          * One would use this to case view to osgViewer::View(er) if supported by the subclass.*/ 
     62        virtual osg::View* asView() { return 0; } 
     63         
    5964        /** 
    6065        requestRedraw() requests a single redraw. 
  • OpenSceneGraph/trunk/include/osgViewer/View

    r7507 r7561  
    4242        META_Object(osgViewer,View); 
    4343         
     44        /** Provide a mechanism for getting the osg::View assocaited from the GUIActionAdapter. 
     45          * One would use this to case view to osgViewer::View(er) if supported by the subclass.*/ 
     46        virtual osg::View* asView() { return this; } 
     47         
     48        /** Provide a mechanism for getting the viewer object from this osgViewer::View. 
     49          * In the case of a osgViewer::Viewer the ViewerBase will effectively point to this object as Viewer subclasses from View. 
     50          * In the case of a osgViewer::CompsoiteViewer the ViewerBase will point to the CompositeViewer that owns this View. */ 
    4451        ViewerBase* getViewerBase() { return _viewerBase.get(); } 
    4552 
  • OpenSceneGraph/trunk/src/osgWrappers/osgGA/GUIActionAdapter.cpp

    r7212 r7561  
    1111#include <osgIntrospection/Attributes> 
    1212 
     13#include <osg/View> 
    1314#include <osgGA/GUIActionAdapter> 
    1415 
     
    2627                       "", 
    2728                       ""); 
     29        I_Method0(osg::View *, asView, 
     30                  Properties::VIRTUAL, 
     31                  __osg_View_P1__asView, 
     32                  "Provide a mechanism for getting the osg::View assocaited with this GUIActionAdapter. ", 
     33                  "One would use this to case view to osgViewer::View(er) if supported by the subclass. "); 
    2834        I_Method0(void, requestRedraw, 
    2935                  Properties::PURE_VIRTUAL, 
  • OpenSceneGraph/trunk/src/osgWrappers/osgViewer/View.cpp

    r7507 r7561  
    7676                  "return the name of the object's class type. ", 
    7777                  "Must be defined by derived classes. "); 
     78        I_Method0(osg::View *, asView, 
     79                  Properties::VIRTUAL, 
     80                  __osg_View_P1__asView, 
     81                  "Provide a mechanism for getting the osg::View assocaited from the GUIActionAdapter. ", 
     82                  "One would use this to case view to osgViewer::View(er) if supported by the subclass. "); 
    7883        I_Method0(osgViewer::ViewerBase *, getViewerBase, 
    7984                  Properties::NON_VIRTUAL, 
    8085                  __ViewerBase_P1__getViewerBase, 
    81                   "", 
    82                   ""); 
     86                  "Provide a mechanism for getting the viewer object from this osgViewer::View. ", 
     87                  "In the case of a osgViewer::Viewer the ViewerBase will effectively point to this object as Viewer subclasses from View. In the case of a osgViewer::CompsoiteViewer the ViewerBase will point to the CompositeViewer that owns this View. "); 
    8388        I_Method1(void, take, IN, osg::View &, rhs, 
    8489                  Properties::VIRTUAL,