~ubuntu-branches/ubuntu/trusty/openscenegraph/trusty

« back to all changes in this revision

Viewing changes to OpenSceneGraph/include/osg/ProxyNode

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-07-29 04:34:38 UTC
  • mfrom: (1.1.6 upstream) (2.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20080729043438-no1h9h0dpsrlzp1y
* Non-maintainer upload.
* No longer try to detect (using /proc/cpuinfo when available) how many
  CPUs are available, fixing the FTBFS (due to -j0) on various platforms
  (Closes: #477353). The right way to do it is to support parallel=n in
  DEB_BUILD_OPTIONS (see Debian Policy §4.9.1), and adequate support has
  been implemented.
* Add patch to fix FTBFS due to the build system now refusing to handle
  whitespaces (Policy CMP0004 say the logs), thanks to Andreas Putzo who
  provided it (Closes: #482239):
   - debian/patches/fix-cmp0004-build-failure.dpatch
* Remove myself from Uploaders, as requested a while ago, done by Luk in
  his 2.2.0-2.1 NMU, which was never acknowledged.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
        META_Node(osg, ProxyNode);
33
33
        
 
34
        typedef osg::BoundingSphere::vec_type vec_type;
 
35
        typedef osg::BoundingSphere::value_type value_type;
 
36
 
34
37
        virtual void traverse(NodeVisitor& nv);
35
38
       
36
39
        virtual bool addChild(Node *child);
61
64
 
62
65
        /** Get how the center of object should be determined when computed which child is active.*/
63
66
        CenterMode getCenterMode() const { return _centerMode; }
 
67
        
 
68
        /** Modes which control how the proxynode external reference are loaded.*/
 
69
        enum LoadingExternalReferenceMode
 
70
        {
 
71
            LOAD_IMMEDIATELY,
 
72
            DEFER_LOADING_TO_DATABASE_PAGER,
 
73
            NO_AUTOMATIC_LOADING
 
74
        };
 
75
 
 
76
        /** Set how the child loading is done.*/
 
77
        void setLoadingExternalReferenceMode(LoadingExternalReferenceMode mode) { _loadingExtReference=mode; }
 
78
 
 
79
        /** Get the setted mode of loading.*/
 
80
        LoadingExternalReferenceMode getLoadingExternalReferenceMode() const { return _loadingExtReference; }
64
81
 
65
82
        /** Sets the object-space point which defines the center of the osg::ProxyNode.  
66
83
            center is affected by any transforms in the hierarchy above the osg::ProxyNode.*/
67
84
        inline void setCenter(const Vec3& center) { _centerMode=USER_DEFINED_CENTER; _userDefinedCenter = center; }
68
85
        
69
86
        /** return the ProxyNode center point. */
70
 
        inline const Vec3& getCenter() const { if (_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else return getBound().center(); }
 
87
        inline const vec_type& getCenter() const { if (_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else return getBound().center(); }
71
88
 
72
89
 
73
90
        /** Set the object-space reference radius of the volume enclosed by the ProxyNode. 
74
 
          * Used to detmine the bounding sphere of the ProxyNode in the absense of any children.*/
75
 
        inline void setRadius(float radius) { _radius = radius; }
 
91
          * Used to determine the bounding sphere of the ProxyNode in the absence of any children.*/
 
92
        inline void setRadius(value_type radius) { _radius = radius; }
76
93
        
77
94
        /** Get the object-space radius of the volume enclosed by the ProxyNode.*/
78
 
        inline float getRadius() const { return _radius; }
 
95
        inline value_type getRadius() const { return _radius; }
79
96
 
80
97
        virtual BoundingSphere computeBound() const;
81
98
 
88
105
        FileNameList        _filenameList;
89
106
        std::string         _databasePath;
90
107
        
 
108
        LoadingExternalReferenceMode _loadingExtReference;
 
109
        
91
110
        CenterMode          _centerMode;
92
 
        Vec3                _userDefinedCenter;
93
 
        float               _radius;
 
111
        vec_type            _userDefinedCenter;
 
112
        value_type          _radius;
94
113
        
95
114
};
96
115