Hiya all,
I am back from vacations, tanned and relaxed :)
And now... more programming, i think. 
Someone of you may remember my past struggles to extend the
SkyBackground class via inlines and Base files. Now, due to some project
changes, i was wondering whether is it possible to c++ extend the class
via the usual 


//start the *code*
class  MySkyBackground : public osg::SkyBackground
{
private:

        MFVec2f             m_TopTexCoord;
    MFVec2f             m_BottomTexCoord;
    MFVec2f             m_RightTexCoord;
    MFVec2f             m_LeftTexCoord;
    MFVec2f             m_FrontTexCoord;
    MFVec2f             m_BackTexCoord;

    /*==========================  PUBLIC 
=================================*/
  public:

   
/*---------------------------------------------------------------------*/
    /*! \name                     
Sync                                    */
    /*!
\{                                                                 */

    virtual void changed(BitVector whichField, 
                         UInt32    origin    );

    /*!
\}                                                                 */
   
/*---------------------------------------------------------------------*/
    /*! \name                    
Background                               */
    /*!
\{                                                                 */

        virtual void clear(osg::DrawActionBase *action, osg::Viewport *port);

    /*!
\}                                                                 */
   
/*---------------------------------------------------------------------*/
    /*! \name                    
Output                                   */
    /*!
\{                                                                 */

    virtual void dump(      UInt32     uiIndent = 0, 
                      const BitVector  bvFlags  = 0) const;


        /*Function added by Davide for compatibility*/

    inline MFVec2f &getFrontTexCoord  (void)
        {
                return m_FrontTexCoord;
        }
        inline MFVec2f &getBackTexCoord   (void)
        {
                return m_BackTexCoord;
        }
        inline MFVec2f &getLeftTexCoord   (void)
        {
                return m_LeftTexCoord;
        }
        inline MFVec2f &getRightTexCoord  (void)
        {
                return m_RightTexCoord;
        }
        inline MFVec2f &getBottomTexCoord  (void)
        {
                return m_BottomTexCoord;
        }
        inline MFVec2f &getTopTexCoord    (void)
        {
                return m_TopTexCoord;
        }
        



    /*!
\}                                                                 */
    /*=========================  PROTECTED 
===============================*/
  protected:

    // Variables should all be in SkyBackgroundBase.

   
/*---------------------------------------------------------------------*/
    /*! \name                 
Constructors                                */
    /*!
\{                                                                 */

    MySkyBackground(void);
    MySkyBackground(const SkyBackground &source);

    /*!
\}                                                                 */
   
/*---------------------------------------------------------------------*/
    /*! \name                  
Destructors                                */
    /*!
\{                                                                 */

    virtual ~MySkyBackground(void); 

    /*!
\}                                                                 */
   
/*---------------------------------------------------------------------*/
    /*! \name                   Draw
Helper                                */
    /*!
\{                                                                 */

    virtual void drawFace(DrawActionBase *action, 
                  TextureChunkPtr tex, StateChunk *&oldtex, 
                  const Pnt3f &p1, const Pnt3f &p2, 
                  const Pnt3f &p3, const Pnt3f &p4,  MField <osg::Vec2f,
0> texCoord);

    /*!
\}                                                                 */
    
    /*==========================  PRIVATE 
================================*/
  private:


    friend class FieldContainer;
    friend class SkyBackgroundBase;

    static void initMethod(void);

    // prohibit default functions (move to 'public' if you need one)

    void operator =(const SkyBackground &source);
};


typedef MySkyBackground *MySkyBackgroundP;

typedef  FCPtr<SkyBackgroundPtr, MySkyBackground> MySkyBackgroundPtr;


//#include <OpenSG/OSGSkyBackgroundBase.inl>
//#include <OpenSG/OSGSkyBackground.inl>


#endif /* _OSGSKYBACKGROUND_H_ */
//end of the *code*


stuff or not. My experiments so far failed miserably. 
I guess i am missing the inline files, but i was hoping to leave my
opensg distribution unchanged, putting all the changes in my
application.
Any ideas? Thank you,
enrico



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to